Show "Bewertung abschliessen" when finished
This commit is contained in:
parent
d8ae598be1
commit
69e96391d9
|
|
@ -58,7 +58,7 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function exit() {
|
function close() {
|
||||||
router.push({
|
router.push({
|
||||||
path: `/course/${props.courseSlug}/cockpit/assignment`,
|
path: `/course/${props.courseSlug}/cockpit/assignment`,
|
||||||
});
|
});
|
||||||
|
|
@ -84,7 +84,7 @@ const assignmentCompletion = computed(() => assignmentStore.assignmentCompletion
|
||||||
type="button"
|
type="button"
|
||||||
class="absolute right-2 top-2 h-8 w-8 cursor-pointer lg:right-4 lg:top-4"
|
class="absolute right-2 top-2 h-8 w-8 cursor-pointer lg:right-4 lg:top-4"
|
||||||
data-cy="close-learning-content"
|
data-cy="close-learning-content"
|
||||||
@click="exit()"
|
@click="close()"
|
||||||
>
|
>
|
||||||
<it-icon-close></it-icon-close>
|
<it-icon-close></it-icon-close>
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -117,6 +117,7 @@ const assignmentCompletion = computed(() => assignmentStore.assignmentCompletion
|
||||||
:assignment-completion="assignmentCompletion"
|
:assignment-completion="assignmentCompletion"
|
||||||
:assignment-user="state.assignmentUser"
|
:assignment-user="state.assignmentUser"
|
||||||
:assignment="state.assignment"
|
:assignment="state.assignment"
|
||||||
|
@close="close()"
|
||||||
></EvaluationContainer>
|
></EvaluationContainer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ const props = defineProps<{
|
||||||
assignment: Assignment;
|
assignment: Assignment;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const emit = defineEmits(["close"]);
|
||||||
|
|
||||||
log.debug("UserEvaluation setup");
|
log.debug("UserEvaluation setup");
|
||||||
|
|
||||||
interface StateInterface {
|
interface StateInterface {
|
||||||
|
|
@ -95,6 +97,10 @@ function nextButtonEnabled() {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function finishButtonEnabled() {
|
||||||
|
return props.assignmentCompletion.completion_status === "evaluation_submitted";
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -114,6 +120,9 @@ function nextButtonEnabled() {
|
||||||
:assignment-user="props.assignmentUser"
|
:assignment-user="props.assignmentUser"
|
||||||
:assignment="props.assignment"
|
:assignment="props.assignment"
|
||||||
:task-index="state.pageIndex - 1"
|
:task-index="state.pageIndex - 1"
|
||||||
|
:allow-edit="
|
||||||
|
props.assignmentCompletion.completion_status !== 'evaluation_submitted'
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
<EvaluationSummary
|
<EvaluationSummary
|
||||||
v-else
|
v-else
|
||||||
|
|
@ -126,10 +135,7 @@ function nextButtonEnabled() {
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav
|
<nav v-if="state.pageIndex > 0" class="sticky bottom-0 border-t bg-gray-200 p-6">
|
||||||
v-if="state.pageIndex > 0 && !evaluationSubmitted"
|
|
||||||
class="sticky bottom-0 border-t bg-gray-200 p-6"
|
|
||||||
>
|
|
||||||
<div class="relative flex flex-row place-content-end">
|
<div class="relative flex flex-row place-content-end">
|
||||||
<button
|
<button
|
||||||
v-if="true"
|
v-if="true"
|
||||||
|
|
@ -142,6 +148,7 @@ function nextButtonEnabled() {
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
:disabled="!nextButtonEnabled()"
|
:disabled="!nextButtonEnabled()"
|
||||||
|
v-if="state.pageIndex <= numTasks"
|
||||||
class="btn-secondary z-10 flex items-center"
|
class="btn-secondary z-10 flex items-center"
|
||||||
data-cy="next-step"
|
data-cy="next-step"
|
||||||
@click="nextPage()"
|
@click="nextPage()"
|
||||||
|
|
@ -149,6 +156,17 @@ function nextButtonEnabled() {
|
||||||
{{ $t("general.next") }}
|
{{ $t("general.next") }}
|
||||||
<it-icon-arrow-right class="ml-2 h-6 w-6"></it-icon-arrow-right>
|
<it-icon-arrow-right class="ml-2 h-6 w-6"></it-icon-arrow-right>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
:disabled="!finishButtonEnabled()"
|
||||||
|
v-if="state.pageIndex > numTasks"
|
||||||
|
class="btn-secondary z-10 flex items-center"
|
||||||
|
data-cy="next-step"
|
||||||
|
@click="$emit('close')"
|
||||||
|
>
|
||||||
|
Bewertung abschliessen
|
||||||
|
<it-icon-check class="ml-2 h-6 w-6"></it-icon-check>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,18 @@ const assignmentStore = useAssignmentStore();
|
||||||
|
|
||||||
async function startEvaluation() {
|
async function startEvaluation() {
|
||||||
log.debug("startEvaluation");
|
log.debug("startEvaluation");
|
||||||
await assignmentStore.evaluateAssignmentCompletion({
|
if (props.assignmentCompletion.completion_status !== "evaluation_submitted") {
|
||||||
assignment_user_id: Number(props.assignmentUser.user_id),
|
await assignmentStore.evaluateAssignmentCompletion({
|
||||||
assignment_id: props.assignment.id,
|
assignment_user_id: Number(props.assignmentUser.user_id),
|
||||||
course_session_id: courseSessionsStore.currentCourseSession!.id,
|
assignment_id: props.assignment.id,
|
||||||
completion_data: {},
|
course_session_id: courseSessionsStore.currentCourseSession!.id,
|
||||||
completion_status: "evaluation_in_progress",
|
completion_data: {},
|
||||||
});
|
completion_status: "evaluation_in_progress",
|
||||||
emit("startEvaluation");
|
});
|
||||||
|
emit("startEvaluation");
|
||||||
|
} else {
|
||||||
|
emit("startEvaluation");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -54,7 +58,11 @@ async function startEvaluation() {
|
||||||
hinterlegeten Beurteilungsinstrument berechnet.
|
hinterlegeten Beurteilungsinstrument berechnet.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="my-4">TODO: Link zu Bewertungskriterium</p>
|
<p class="my-4">
|
||||||
|
<a :href="props.assignment.evaluation_document_url" class="link" target="_blank">
|
||||||
|
Beurteilungsinstrument anzeigen
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button class="btn-primary" @click="startEvaluation()">
|
<button class="btn-primary" @click="startEvaluation()">
|
||||||
|
|
@ -65,6 +73,11 @@ async function startEvaluation() {
|
||||||
>
|
>
|
||||||
Bewertung fortsetzen
|
Bewertung fortsetzen
|
||||||
</span>
|
</span>
|
||||||
|
<span
|
||||||
|
v-if="props.assignmentCompletion.completion_status === 'evaluation_submitted'"
|
||||||
|
>
|
||||||
|
Bewertung ansehen
|
||||||
|
</span>
|
||||||
<span v-else>Bewertung starten</span>
|
<span v-else>Bewertung starten</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ const props = defineProps<{
|
||||||
dueDate?: Dayjs;
|
dueDate?: Dayjs;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits(["submitEvaluation", "editTask"]);
|
const emit = defineEmits(["editTask"]);
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
showSuccessInfo: false,
|
showSuccessInfo: false,
|
||||||
|
|
@ -82,7 +82,17 @@ const grade = computed(() => pointsToGrade(userPoints.value, maxPoints.value));
|
||||||
|
|
||||||
<p class="my-4">
|
<p class="my-4">
|
||||||
Die Gesamtpunktzahl und die daraus resultierende Note wird auf Grund des
|
Die Gesamtpunktzahl und die daraus resultierende Note wird auf Grund des
|
||||||
hinterlegeten Beurteilungsinstrument berechnet. Willst du mehr dazu erfahren:
|
hinterlegeten Beurteilungsinstrument berechnet.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="my-4">
|
||||||
|
<a
|
||||||
|
:href="props.assignment.evaluation_document_url"
|
||||||
|
class="link"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
Beurteilungsinstrument anzeigen
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ const props = defineProps<{
|
||||||
assignmentUser: CourseSessionUser;
|
assignmentUser: CourseSessionUser;
|
||||||
assignment: Assignment;
|
assignment: Assignment;
|
||||||
taskIndex: number;
|
taskIndex: number;
|
||||||
|
allowEdit: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
log.debug("EvaluationTask setup", props.taskIndex);
|
log.debug("EvaluationTask setup", props.taskIndex);
|
||||||
|
|
@ -95,6 +96,7 @@ const evaluateAssignmentCompletionDebounced = useDebounceFn(
|
||||||
type="radio"
|
type="radio"
|
||||||
:value="subTask.points"
|
:value="subTask.points"
|
||||||
:checked="expertData.points === subTask.points"
|
:checked="expertData.points === subTask.points"
|
||||||
|
:disabled="!props.allowEdit"
|
||||||
class="focus:ring-indigo-900 h-4 w-4 border-gray-300 text-blue-900"
|
class="focus:ring-indigo-900 h-4 w-4 border-gray-300 text-blue-900"
|
||||||
@change="changePoints(subTask.points)"
|
@change="changePoints(subTask.points)"
|
||||||
/>
|
/>
|
||||||
|
|
@ -114,6 +116,7 @@ const evaluateAssignmentCompletionDebounced = useDebounceFn(
|
||||||
class="mt-8"
|
class="mt-8"
|
||||||
:model-value="expertData.text ?? ''"
|
:model-value="expertData.text ?? ''"
|
||||||
label="Begründung"
|
label="Begründung"
|
||||||
|
:disabled="!props.allowEdit"
|
||||||
placeholder="Hier muss zwingend eine Begründung erfasst werden."
|
placeholder="Hier muss zwingend eine Begründung erfasst werden."
|
||||||
@update:model-value="onUpdateText($event)"
|
@update:model-value="onUpdateText($event)"
|
||||||
></ItTextarea>
|
></ItTextarea>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
from wagtail.blocks import StreamValue
|
||||||
|
from wagtail.blocks.list_block import ListBlock, ListValue
|
||||||
|
from wagtail.rich_text import RichText
|
||||||
|
|
||||||
from vbv_lernwelt.assignment.models import (
|
from vbv_lernwelt.assignment.models import (
|
||||||
EvaluationSubTaskBlock,
|
EvaluationSubTaskBlock,
|
||||||
TaskContentStreamBlock,
|
TaskContentStreamBlock,
|
||||||
|
|
@ -15,9 +19,6 @@ from vbv_lernwelt.assignment.tests.assignment_factories import (
|
||||||
from vbv_lernwelt.core.utils import replace_whitespace
|
from vbv_lernwelt.core.utils import replace_whitespace
|
||||||
from vbv_lernwelt.course.consts import COURSE_TEST_ID, COURSE_UK
|
from vbv_lernwelt.course.consts import COURSE_TEST_ID, COURSE_UK
|
||||||
from vbv_lernwelt.course.models import CoursePage
|
from vbv_lernwelt.course.models import CoursePage
|
||||||
from wagtail.blocks import StreamValue
|
|
||||||
from wagtail.blocks.list_block import ListBlock, ListValue
|
|
||||||
from wagtail.rich_text import RichText
|
|
||||||
|
|
||||||
|
|
||||||
def create_uk_assignments(course_id=COURSE_UK):
|
def create_uk_assignments(course_id=COURSE_UK):
|
||||||
|
|
@ -53,7 +54,7 @@ def create_uk_assignments(course_id=COURSE_UK):
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
evaluation_document_url="https://www.vbv.ch",
|
evaluation_document_url="/static/media/assignments/UK_03_09_NACH_KN_Beurteilungsraster.pdf",
|
||||||
evaluation_description="Diese geleitete Fallarbeit wird auf Grund des folgenden Beurteilungsintrument bewertet.",
|
evaluation_description="Diese geleitete Fallarbeit wird auf Grund des folgenden Beurteilungsintrument bewertet.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -490,7 +491,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
evaluation_document_url="https://www.vbv.ch",
|
evaluation_document_url="/static/media/assignments/UK_03_09_NACH_KN_Beurteilungsraster.pdf",
|
||||||
evaluation_description="Diese geleitete Fallarbeit wird auf Grund des folgenden Beurteilungsintrument bewertet.",
|
evaluation_description="Diese geleitete Fallarbeit wird auf Grund des folgenden Beurteilungsintrument bewertet.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue