Fix evaluation text in üK
This commit is contained in:
parent
551116906b
commit
52b6e2ee4f
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSelfEvaluationFeedbackSummaries } from "@/services/selfEvaluationFeedback";
|
import { useSelfEvaluationFeedbackSummaries } from "@/services/selfEvaluationFeedback";
|
||||||
import { useCurrentCourseSession } from "@/composables";
|
import { useCurrentCourseSession, useEvaluationWithFeedback } from "@/composables";
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import FeedbackByLearningUnitSummary from "@/components/selfEvaluationFeedback/FeedbackByLearningUnitSummary.vue";
|
import FeedbackByLearningUnitSummary from "@/components/selfEvaluationFeedback/FeedbackByLearningUnitSummary.vue";
|
||||||
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
||||||
|
|
@ -37,8 +37,10 @@ const summaries = computed(() => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const hasEvaluationFeedback = useEvaluationWithFeedback().hasFeedback;
|
||||||
|
|
||||||
const headerTitle = computed(() => {
|
const headerTitle = computed(() => {
|
||||||
if (course.value.configuration.enable_learning_mentor) {
|
if (hasEvaluationFeedback.value) {
|
||||||
return t("a.Selbst- und Fremdeinschätzungen");
|
return t("a.Selbst- und Fremdeinschätzungen");
|
||||||
} else {
|
} else {
|
||||||
return t("a.Selbsteinschätzungen");
|
return t("a.Selbsteinschätzungen");
|
||||||
|
|
|
||||||
|
|
@ -717,3 +717,14 @@ export function useCertificateQuery(userId: string | undefined, courseSlug: stri
|
||||||
|
|
||||||
return { certificatesQuery };
|
return { certificatesQuery };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function useEvaluationWithFeedback() {
|
||||||
|
const currentCourseSession = useCurrentCourseSession();
|
||||||
|
const hasFeedback = computed(
|
||||||
|
() =>
|
||||||
|
currentCourseSession.value.course.configuration.enable_learning_mentor &&
|
||||||
|
!currentCourseSession.value.course.configuration.is_uk
|
||||||
|
);
|
||||||
|
|
||||||
|
return { hasFeedback };
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import * as log from "loglevel";
|
import * as log from "loglevel";
|
||||||
import { onMounted } from "vue";
|
import { onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCurrentCourseSession } from "@/composables";
|
import { useCurrentCourseSession, useEvaluationWithFeedback } from "@/composables";
|
||||||
|
|
||||||
log.debug("CompetenceParentPage created");
|
log.debug("CompetenceParentPage created");
|
||||||
|
|
||||||
|
|
@ -29,6 +29,7 @@ function routeInSelfEvaluationAndFeedback() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentCourseSession = useCurrentCourseSession();
|
const currentCourseSession = useCurrentCourseSession();
|
||||||
|
const hasEvaluationFeedback = useEvaluationWithFeedback().hasFeedback;
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
log.debug("CompetenceParentPage mounted", props.courseSlug);
|
log.debug("CompetenceParentPage mounted", props.courseSlug);
|
||||||
|
|
@ -72,7 +73,7 @@ onMounted(async () => {
|
||||||
class="block py-3"
|
class="block py-3"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
currentCourseSession.course.configuration.enable_learning_mentor
|
hasEvaluationFeedback
|
||||||
? $t("a.Selbst- und Fremdeinschätzungen")
|
? $t("a.Selbst- und Fremdeinschätzungen")
|
||||||
: $t("a.Selbsteinschätzungen")
|
: $t("a.Selbsteinschätzungen")
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue