diff --git a/client/src/pages/cockpit/cockpitPage/AssignmentSubmissionProgress.vue b/client/src/components/cockpit/AssignmentSubmissionProgress.vue similarity index 100% rename from client/src/pages/cockpit/cockpitPage/AssignmentSubmissionProgress.vue rename to client/src/components/cockpit/AssignmentSubmissionProgress.vue diff --git a/client/src/pages/cockpit/cockpitPage/CockpitDates.vue b/client/src/components/cockpit/CockpitDates.vue similarity index 100% rename from client/src/pages/cockpit/cockpitPage/CockpitDates.vue rename to client/src/components/cockpit/CockpitDates.vue diff --git a/client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue b/client/src/components/cockpit/SubmissionsOverview.vue similarity index 96% rename from client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue rename to client/src/components/cockpit/SubmissionsOverview.vue index 4c4ea0ac..7dc42662 100644 --- a/client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue +++ b/client/src/components/cockpit/SubmissionsOverview.vue @@ -1,6 +1,6 @@ 2 + + diff --git a/client/src/pages/learningPath/selfEvaluationPage/SelfEvaluation.vue b/client/src/components/learningPath/SelfEvaluation.vue similarity index 74% rename from client/src/pages/learningPath/selfEvaluationPage/SelfEvaluation.vue rename to client/src/components/learningPath/SelfEvaluation.vue index 4a5b8c9a..a0f46a5f 100644 --- a/client/src/pages/learningPath/selfEvaluationPage/SelfEvaluation.vue +++ b/client/src/components/learningPath/SelfEvaluation.vue @@ -3,7 +3,7 @@ import { useCircleStore } from "@/stores/circle"; import type { CircleType, LearningUnit } from "@/types"; import * as log from "loglevel"; -import { useCurrentCourseSession, useCourseDataWithCompletion } from "@/composables"; +import { useCourseDataWithCompletion, useCurrentCourseSession } from "@/composables"; import LearningContentContainer from "@/pages/learningPath/learningContentPage/LearningContentContainer.vue"; import LearningContentMultiLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue"; import eventBus from "@/utils/eventBus"; @@ -11,35 +11,56 @@ import { useRouteQuery } from "@vueuse/router"; import { computed, onUnmounted } from "vue"; import { getPreviousRoute } from "@/router/history"; import { getCompetenceNaviUrl } from "@/utils/utils"; +import SelfEvaluationRequestFeedbackPage from "@/pages/learningPath/selfEvaluationPage/SelfEvaluationRequestFeedbackPage.vue"; log.debug("LearningContent.vue setup"); -const circleStore = useCircleStore(); -const courseSession = useCurrentCourseSession(); -const courseCompletionData = useCourseDataWithCompletion(); - -const questionIndex = useRouteQuery("step", "0", { transform: Number, mode: "push" }); -const previousRoute = getPreviousRoute(); - const props = defineProps<{ learningUnit: LearningUnit; circle: CircleType; }>(); +const circleStore = useCircleStore(); +const courseSession = useCurrentCourseSession(); +const courseCompletionData = useCourseDataWithCompletion(); + const questions = computed(() => props.learningUnit?.performance_criteria ?? []); +const numPages = computed(() => { + if (learningUnitHasFeedbackPage.value) { + return questions.value.length + 1; + } else { + return questions.value.length; + } +}); + +const questionIndex = useRouteQuery("step", "0", { transform: Number, mode: "push" }); +const previousRoute = getPreviousRoute(); + +const learningUnitHasFeedbackPage = computed( + () => props.learningUnit?.feedback_user !== "NO_FEEDBACK" +); + const currentQuestion = computed(() => questions.value[questionIndex.value]); const showPreviousButton = computed(() => questionIndex.value != 0); + const showNextButton = computed( - () => questionIndex.value + 1 < questions.value?.length && questions.value?.length > 1 + () => questionIndex.value + 1 < numPages.value && numPages.value > 1 ); -const showExitButton = computed( - () => - questions.value?.length === 1 || questions.value?.length === questionIndex.value + 1 + +const isLastStep = computed( + () => questions.value?.length === 1 || numPages.value == questionIndex.value + 1 ); function handleContinue() { log.debug("handleContinue"); - if (questionIndex.value + 1 < questions.value.length) { + + // not answering a question is allowed especially, + // nonetheless we want to still know this state in the backend! + if (currentQuestion.value && currentQuestion.value.completion_status === "UNKNOWN") { + courseCompletionData.markCompletion(currentQuestion.value, "UNKNOWN"); + } + + if (questionIndex.value + 1 < numPages.value) { log.debug("increment questionIndex", questionIndex.value); questionIndex.value += 1; } else { @@ -50,7 +71,7 @@ function handleContinue() { function handleBack() { log.debug("handleBack"); - if (questionIndex.value > 0 && questionIndex.value < questions.value.length) { + if (questionIndex.value > 0 && questionIndex.value < numPages.value) { questionIndex.value -= 1; } } @@ -78,16 +99,20 @@ onUnmounted(() => { :sub-title="$t('a.Selbsteinschätzung')" :title="`${learningUnit.title}`" icon="it-icon-lc-learning-module" - :steps-count="questions.length" + :steps-count="numPages" :show-next-button="showNextButton" - :show-exit-button="showExitButton" + :show-exit-button="isLastStep" :show-start-button="false" :show-previous-button="showPreviousButton" :base-url="props.learningUnit.evaluate_url" + :close-button-variant="learningUnitHasFeedbackPage ? 'close' : 'mark_as_done'" + :end-badge-text=" + learningUnitHasFeedbackPage ? $t('general.submission') : undefined + " @previous="handleBack()" @next="handleContinue()" > -
+

{{ currentQuestion.title }} @@ -137,6 +162,11 @@ onUnmounted(() => {

+ diff --git a/client/src/components/learningPath/assignment/PraxisAssignmentSubmit.vue b/client/src/components/learningPath/assignment/PraxisAssignmentSubmit.vue index b1c31c88..fe8bbd27 100644 --- a/client/src/components/learningPath/assignment/PraxisAssignmentSubmit.vue +++ b/client/src/components/learningPath/assignment/PraxisAssignmentSubmit.vue @@ -2,7 +2,7 @@ import ItButton from "@/components/ui/ItButton.vue"; import ItCheckbox from "@/components/ui/ItCheckbox.vue"; import { ref } from "vue"; -import { bustItGetCache, useCSRFFetch } from "@/fetchHelpers"; +import { bustItGetCache } from "@/fetchHelpers"; import { useUserStore } from "@/stores/user"; import eventBus from "@/utils/eventBus"; import log from "loglevel"; @@ -12,9 +12,8 @@ import { useMutation } from "@urql/vue"; import { UPSERT_ASSIGNMENT_COMPLETION_MUTATION } from "@/graphql/mutations"; import type { Assignment } from "@/types"; import DateEmbedding from "@/components/dueDates/DateEmbedding.vue"; -import { useCurrentCourseSession } from "@/composables"; - -const currentCourseSession = useCurrentCourseSession(); +import { useLearningMentors } from "@/composables"; +import NoMentorInformationPanel from "@/components/mentor/NoMentorInformationPanel.vue"; const props = defineProps<{ submissionDeadlineStart?: string | null; @@ -29,10 +28,7 @@ const upsertAssignmentCompletionMutation = useMutation( UPSERT_ASSIGNMENT_COMPLETION_MUTATION ); -const { data: learningMentors } = useCSRFFetch( - `/api/mentor/${props.courseSessionId}/mentors` -).json(); - +const learningMentors = useLearningMentors().learningMentors; const selectedLearningMentor = ref(); const onSubmit = async () => { @@ -85,27 +81,7 @@ const onSubmit = async () => {
-
- -
-
- {{ - $t( - "a.Aktuell hast du noch keine Person als Lernbegleitung eingeladen. Lade jetzt jemanden ein." - ) - }} -
- - {{ $t("a.Lernbegleitung einladen") }} - -
-
+

diff --git a/client/src/components/mentor/NoMentorInformationPanel.vue b/client/src/components/mentor/NoMentorInformationPanel.vue new file mode 100644 index 00000000..d6170bc3 --- /dev/null +++ b/client/src/components/mentor/NoMentorInformationPanel.vue @@ -0,0 +1,29 @@ + + + diff --git a/client/src/components/selfEvaluationFeedback/FeedbackProvided.vue b/client/src/components/selfEvaluationFeedback/FeedbackProvided.vue new file mode 100644 index 00000000..f8346fed --- /dev/null +++ b/client/src/components/selfEvaluationFeedback/FeedbackProvided.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/client/src/components/selfEvaluationFeedback/FeedbackProviderRankCriteria.vue b/client/src/components/selfEvaluationFeedback/FeedbackProviderRankCriteria.vue new file mode 100644 index 00000000..6374b4a0 --- /dev/null +++ b/client/src/components/selfEvaluationFeedback/FeedbackProviderRankCriteria.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/client/src/components/selfEvaluationFeedback/FeedbackProviderReleaseOverview.vue b/client/src/components/selfEvaluationFeedback/FeedbackProviderReleaseOverview.vue new file mode 100644 index 00000000..96698ef3 --- /dev/null +++ b/client/src/components/selfEvaluationFeedback/FeedbackProviderReleaseOverview.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/client/src/components/selfEvaluationFeedback/FeedbackReceived.vue b/client/src/components/selfEvaluationFeedback/FeedbackReceived.vue new file mode 100644 index 00000000..eedffca1 --- /dev/null +++ b/client/src/components/selfEvaluationFeedback/FeedbackReceived.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/client/src/components/selfEvaluationFeedback/FeedbackRequested.vue b/client/src/components/selfEvaluationFeedback/FeedbackRequested.vue new file mode 100644 index 00000000..0f3028f5 --- /dev/null +++ b/client/src/components/selfEvaluationFeedback/FeedbackRequested.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/client/src/components/selfEvaluationFeedback/FeedbackRequestedInformationPanel.vue b/client/src/components/selfEvaluationFeedback/FeedbackRequestedInformationPanel.vue new file mode 100644 index 00000000..9baf746d --- /dev/null +++ b/client/src/components/selfEvaluationFeedback/FeedbackRequestedInformationPanel.vue @@ -0,0 +1,26 @@ + + + diff --git a/client/src/components/ui/ItDropdownSelect.vue b/client/src/components/ui/ItDropdownSelect.vue index 08f522ea..c8bf8462 100644 --- a/client/src/components/ui/ItDropdownSelect.vue +++ b/client/src/components/ui/ItDropdownSelect.vue @@ -1,7 +1,7 @@ + + diff --git a/client/src/pages/cockpit/cockpitPage/mentor/SelfEvaluationFeedbackPage.vue b/client/src/pages/cockpit/cockpitPage/mentor/SelfEvaluationFeedbackPage.vue new file mode 100644 index 00000000..e58125a2 --- /dev/null +++ b/client/src/pages/cockpit/cockpitPage/mentor/SelfEvaluationFeedbackPage.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/client/src/pages/learningPath/learningContentPage/LearningContentContainer.vue b/client/src/pages/learningPath/learningContentPage/LearningContentContainer.vue index 83004cf4..194a9864 100644 --- a/client/src/pages/learningPath/learningContentPage/LearningContentContainer.vue +++ b/client/src/pages/learningPath/learningContentPage/LearningContentContainer.vue @@ -12,7 +12,7 @@ defineEmits(["exit"]);