diff --git a/client/src/pages/dashboard/DashboardPage.vue b/client/src/pages/dashboard/DashboardPage.vue index 40e65e95..c06a6289 100644 --- a/client/src/pages/dashboard/DashboardPage.vue +++ b/client/src/pages/dashboard/DashboardPage.vue @@ -13,7 +13,11 @@ import CourseDetailDates from "@/components/dashboard/CourseDetailDates.vue"; import NoCourseSession from "@/components/dashboard/NoCourseSession.vue"; import MentorPage from "@/pages/dashboard/MentorPage.vue"; import CoursePanel from "@/components/dashboard/CoursePanel.vue"; -import { DashboardConfigType, fetchDashboardConfigv2 } from "@/services/dashboard"; +import { + DashboardConfigType, + DashboardCourseConfigType, + fetchDashboardConfigv2, +} from "@/services/dashboard"; const dashboardStore = useDashboardStore(); @@ -30,7 +34,7 @@ const boards: Record = { PRAXISBILDNER_DASHBOARD: { main: CoursePanel, aside: SimpleDates }, }; -const dashboardConfigv2: Ref = ref([]); +const dashboardConfigv2: Ref = ref([]); onMounted(async () => { dashboardConfigv2.value = await fetchDashboardConfigv2(); @@ -74,7 +78,9 @@ function newDashboardConfigForId(id: string) { dashboardStore.currentDashboardConfig.dashboard_type === 'PRAXISBILDNER_DASHBOARD' " - :course-config="dashboardStore.currentDashboardConfig" + :course-config=" + newDashboardConfigForId(dashboardStore.currentDashboardConfig.id) + " /> ("/api/dashboard/config/"); + return await itGetCached("/api/dashboard/config/"); } diff --git a/server/vbv_lernwelt/dashboard/graphql/types/assignment.py b/server/vbv_lernwelt/dashboard/graphql/types/assignment.py index 1cbf7789..214fcc4e 100644 --- a/server/vbv_lernwelt/dashboard/graphql/types/assignment.py +++ b/server/vbv_lernwelt/dashboard/graphql/types/assignment.py @@ -85,10 +85,13 @@ def get_assignment_completion_metrics( assignment: vbv_lernwelt.assignment.models.Assignment, user_selection_ids: List[str] | None, ) -> AssignmentCompletionMetricsType: - course_session_users = CourseSessionUser.objects.filter( - course_session=course_session, - role=CourseSessionUser.Role.MEMBER, - ).values_list("user", flat=True) + if user_selection_ids: + course_session_users = user_selection_ids + else: + course_session_users = CourseSessionUser.objects.filter( + course_session=course_session, + role=CourseSessionUser.Role.MEMBER, + ).values_list("user", flat=True) evaluation_results = AssignmentCompletion.objects.filter( completion_status=AssignmentCompletionStatus.EVALUATION_SUBMITTED.value, diff --git a/server/vbv_lernwelt/dashboard/graphql/types/dashboard.py b/server/vbv_lernwelt/dashboard/graphql/types/dashboard.py index ec48d8c9..46caa92f 100644 --- a/server/vbv_lernwelt/dashboard/graphql/types/dashboard.py +++ b/server/vbv_lernwelt/dashboard/graphql/types/dashboard.py @@ -79,7 +79,7 @@ class ProgressDashboardAssignmentType(graphene.ObjectType): points_achieved_count = graphene.Int(required=True) -class öCourseProgressType(graphene.ObjectType): +class CourseProgressType(graphene.ObjectType): _id = graphene.ID(required=True) course_id = graphene.ID(required=True) session_to_continue_id = graphene.ID(required=False)