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({
|
||||
path: `/course/${props.courseSlug}/cockpit/assignment`,
|
||||
});
|
||||
|
|
@ -84,7 +84,7 @@ const assignmentCompletion = computed(() => assignmentStore.assignmentCompletion
|
|||
type="button"
|
||||
class="absolute right-2 top-2 h-8 w-8 cursor-pointer lg:right-4 lg:top-4"
|
||||
data-cy="close-learning-content"
|
||||
@click="exit()"
|
||||
@click="close()"
|
||||
>
|
||||
<it-icon-close></it-icon-close>
|
||||
</button>
|
||||
|
|
@ -117,6 +117,7 @@ const assignmentCompletion = computed(() => assignmentStore.assignmentCompletion
|
|||
:assignment-completion="assignmentCompletion"
|
||||
:assignment-user="state.assignmentUser"
|
||||
:assignment="state.assignment"
|
||||
@close="close()"
|
||||
></EvaluationContainer>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ const props = defineProps<{
|
|||
assignment: Assignment;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits(["close"]);
|
||||
|
||||
log.debug("UserEvaluation setup");
|
||||
|
||||
interface StateInterface {
|
||||
|
|
@ -95,6 +97,10 @@ function nextButtonEnabled() {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function finishButtonEnabled() {
|
||||
return props.assignmentCompletion.completion_status === "evaluation_submitted";
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -114,6 +120,9 @@ function nextButtonEnabled() {
|
|||
:assignment-user="props.assignmentUser"
|
||||
:assignment="props.assignment"
|
||||
:task-index="state.pageIndex - 1"
|
||||
:allow-edit="
|
||||
props.assignmentCompletion.completion_status !== 'evaluation_submitted'
|
||||
"
|
||||
/>
|
||||
<EvaluationSummary
|
||||
v-else
|
||||
|
|
@ -126,10 +135,7 @@ function nextButtonEnabled() {
|
|||
</section>
|
||||
</div>
|
||||
|
||||
<nav
|
||||
v-if="state.pageIndex > 0 && !evaluationSubmitted"
|
||||
class="sticky bottom-0 border-t bg-gray-200 p-6"
|
||||
>
|
||||
<nav v-if="state.pageIndex > 0" class="sticky bottom-0 border-t bg-gray-200 p-6">
|
||||
<div class="relative flex flex-row place-content-end">
|
||||
<button
|
||||
v-if="true"
|
||||
|
|
@ -142,6 +148,7 @@ function nextButtonEnabled() {
|
|||
</button>
|
||||
<button
|
||||
:disabled="!nextButtonEnabled()"
|
||||
v-if="state.pageIndex <= numTasks"
|
||||
class="btn-secondary z-10 flex items-center"
|
||||
data-cy="next-step"
|
||||
@click="nextPage()"
|
||||
|
|
@ -149,6 +156,17 @@ function nextButtonEnabled() {
|
|||
{{ $t("general.next") }}
|
||||
<it-icon-arrow-right class="ml-2 h-6 w-6"></it-icon-arrow-right>
|
||||
</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>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,14 +21,18 @@ const assignmentStore = useAssignmentStore();
|
|||
|
||||
async function startEvaluation() {
|
||||
log.debug("startEvaluation");
|
||||
await assignmentStore.evaluateAssignmentCompletion({
|
||||
assignment_user_id: Number(props.assignmentUser.user_id),
|
||||
assignment_id: props.assignment.id,
|
||||
course_session_id: courseSessionsStore.currentCourseSession!.id,
|
||||
completion_data: {},
|
||||
completion_status: "evaluation_in_progress",
|
||||
});
|
||||
emit("startEvaluation");
|
||||
if (props.assignmentCompletion.completion_status !== "evaluation_submitted") {
|
||||
await assignmentStore.evaluateAssignmentCompletion({
|
||||
assignment_user_id: Number(props.assignmentUser.user_id),
|
||||
assignment_id: props.assignment.id,
|
||||
course_session_id: courseSessionsStore.currentCourseSession!.id,
|
||||
completion_data: {},
|
||||
completion_status: "evaluation_in_progress",
|
||||
});
|
||||
emit("startEvaluation");
|
||||
} else {
|
||||
emit("startEvaluation");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -54,7 +58,11 @@ async function startEvaluation() {
|
|||
hinterlegeten Beurteilungsinstrument berechnet.
|
||||
</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>
|
||||
<button class="btn-primary" @click="startEvaluation()">
|
||||
|
|
@ -65,6 +73,11 @@ async function startEvaluation() {
|
|||
>
|
||||
Bewertung fortsetzen
|
||||
</span>
|
||||
<span
|
||||
v-if="props.assignmentCompletion.completion_status === 'evaluation_submitted'"
|
||||
>
|
||||
Bewertung ansehen
|
||||
</span>
|
||||
<span v-else>Bewertung starten</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const props = defineProps<{
|
|||
dueDate?: Dayjs;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits(["submitEvaluation", "editTask"]);
|
||||
const emit = defineEmits(["editTask"]);
|
||||
|
||||
const state = reactive({
|
||||
showSuccessInfo: false,
|
||||
|
|
@ -82,7 +82,17 @@ const grade = computed(() => pointsToGrade(userPoints.value, maxPoints.value));
|
|||
|
||||
<p class="my-4">
|
||||
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>
|
||||
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ const props = defineProps<{
|
|||
assignmentUser: CourseSessionUser;
|
||||
assignment: Assignment;
|
||||
taskIndex: number;
|
||||
allowEdit: boolean;
|
||||
}>();
|
||||
|
||||
log.debug("EvaluationTask setup", props.taskIndex);
|
||||
|
|
@ -95,6 +96,7 @@ const evaluateAssignmentCompletionDebounced = useDebounceFn(
|
|||
type="radio"
|
||||
:value="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"
|
||||
@change="changePoints(subTask.points)"
|
||||
/>
|
||||
|
|
@ -114,6 +116,7 @@ const evaluateAssignmentCompletionDebounced = useDebounceFn(
|
|||
class="mt-8"
|
||||
:model-value="expertData.text ?? ''"
|
||||
label="Begründung"
|
||||
:disabled="!props.allowEdit"
|
||||
placeholder="Hier muss zwingend eine Begründung erfasst werden."
|
||||
@update:model-value="onUpdateText($event)"
|
||||
></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 (
|
||||
EvaluationSubTaskBlock,
|
||||
TaskContentStreamBlock,
|
||||
|
|
@ -15,9 +19,6 @@ from vbv_lernwelt.assignment.tests.assignment_factories import (
|
|||
from vbv_lernwelt.core.utils import replace_whitespace
|
||||
from vbv_lernwelt.course.consts import COURSE_TEST_ID, COURSE_UK
|
||||
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):
|
||||
|
|
@ -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.",
|
||||
)
|
||||
|
||||
|
|
@ -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.",
|
||||
)
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue