diff --git a/client/src/components/header/CoursePreviewBar.vue b/client/src/components/header/CoursePreviewBar.vue
index f0d92383..e344ae65 100644
--- a/client/src/components/header/CoursePreviewBar.vue
+++ b/client/src/components/header/CoursePreviewBar.vue
@@ -2,7 +2,7 @@
import { useTranslation } from "i18next-vue";
import { useRouteLookups } from "@/utils/route";
import { useCurrentCourseSession } from "@/composables";
-import { getCompetenceBaseUrl } from "@/utils/utils";
+import { getCompetenceNaviUrl, getLearningPathUrl } from "@/utils/utils";
const { inCompetenceProfile, inLearningPath } = useRouteLookups();
const courseSession = useCurrentCourseSession();
@@ -24,7 +24,7 @@ const { t } = useTranslation();
@@ -33,7 +33,7 @@ const { t } = useTranslation();
diff --git a/client/src/components/header/MainNavigationBar.vue b/client/src/components/header/MainNavigationBar.vue
index c95e586e..72c829ec 100644
--- a/client/src/components/header/MainNavigationBar.vue
+++ b/client/src/components/header/MainNavigationBar.vue
@@ -15,7 +15,11 @@ import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
import { computed, onMounted, reactive } from "vue";
import { useTranslation } from "i18next-vue";
import CoursePreviewBar from "@/components/header/CoursePreviewBar.vue";
-import { getCompetenceBaseUrl } from "@/utils/utils";
+import {
+ getCompetenceNaviUrl,
+ getLearningPathUrl,
+ getMediaCenterUrl,
+} from "@/utils/utils";
log.debug("MainNavigationBar created");
@@ -71,7 +75,7 @@ onMounted(() => {
v-if="userStore.loggedIn"
:show="state.showMobileNavigationMenu"
:course-session="courseSessionsStore.currentCourseSession"
- :media-url="courseSessionsStore.currentCourseSession?.media_library_url"
+ :media-url="getMediaCenterUrl(courseSessionsStore.currentCourseSession)"
:user="userStore"
@closemodal="state.showMobileNavigationMenu = false"
@logout="userStore.handleLogout()"
@@ -138,7 +142,7 @@ onMounted(() => {
@@ -151,7 +155,7 @@ onMounted(() => {
@@ -161,7 +165,7 @@ onMounted(() => {
{
@@ -78,7 +82,7 @@ const courseSessionsStore = useCourseSessionsStore();
@@ -86,7 +90,7 @@ const courseSessionsStore = useCourseSessionsStore();
@@ -95,7 +99,7 @@ const courseSessionsStore = useCourseSessionsStore();
diff --git a/client/src/composables.ts b/client/src/composables.ts
index ffd1b590..531c722f 100644
--- a/client/src/composables.ts
+++ b/client/src/composables.ts
@@ -1,5 +1,9 @@
import { useCourseSessionsStore } from "@/stores/courseSessions";
-import type { CourseSession } from "@/types";
+import type { CourseSession, CourseSessionDetail } from "@/types";
+import { useQuery } from "@urql/vue";
+
+import { COURSE_SESSION_DETAIL_QUERY } from "@/graphql/queries";
+import { useUserStore } from "@/stores/user";
import log from "loglevel";
import type { ComputedRef } from "vue";
import { computed } from "vue";
@@ -28,3 +32,52 @@ export function useCurrentCourseSession() {
);
return result;
}
+
+export function useCourseSessionDetailQuery(courSessionId?: string | number) {
+ if (!courSessionId) {
+ courSessionId = useCurrentCourseSession().value.id;
+ }
+ const queryResult = useQuery({
+ query: COURSE_SESSION_DETAIL_QUERY,
+ variables: {
+ courseSessionId: courSessionId.toString(),
+ },
+ });
+
+ const courseSessionDetail = computed(() => {
+ return queryResult.data.value?.course_session as CourseSessionDetail | undefined;
+ });
+
+ function findAssignmentDetail(assignmentId: string) {
+ return (courseSessionDetail.value?.assignments ?? []).find((a) => {
+ return a.learning_content?.content_assignment?.id === assignmentId;
+ });
+ }
+
+ function findUser(userId: string) {
+ return (courseSessionDetail.value?.users ?? []).find((u) => {
+ return u.user_id === userId;
+ });
+ }
+
+ function findCurrentUser() {
+ const userStore = useUserStore();
+ const userId = userStore.id;
+ return findUser(userId);
+ }
+
+ function filterMembers() {
+ return (courseSessionDetail.value?.users ?? []).filter((u) => {
+ return u.role === "MEMBER";
+ });
+ }
+
+ return {
+ ...queryResult,
+ courseSessionDetail,
+ findAssignmentDetail,
+ findUser,
+ findCurrentUser,
+ filterMembers,
+ };
+}
diff --git a/client/src/gql/schema.graphql b/client/src/gql/schema.graphql
index a36eb1e9..26b0a601 100644
--- a/client/src/gql/schema.graphql
+++ b/client/src/gql/schema.graphql
@@ -8,11 +8,12 @@ type Query {
learning_content_learning_module: LearningContentLearningModuleObjectType
learning_content_placeholder: LearningContentPlaceholderObjectType
learning_content_rich_text: LearningContentRichTextObjectType
- learning_content_test: LearningContentTestObjectType
+ learning_content_test: LearningContentEdoniqTestObjectType
learning_content_video: LearningContentVideoObjectType
learning_content_document_list: LearningContentDocumentListObjectType
- course_session_attendance_course(id: ID!, assignment_user_id: ID): CourseSessionAttendanceCourseType
- course(id: Int): CourseObjectType
+ course_session_attendance_course(id: ID!, assignment_user_id: ID): CourseSessionAttendanceCourseObjectType
+ course(id: ID): CourseObjectType
+ course_session(id: ID): CourseSessionObjectType
competence_certificate(id: ID, slug: String): CompetenceCertificateObjectType
competence_certificate_list(id: ID, slug: String, course_id: ID, course_slug: String): CompetenceCertificateListObjectType
assignment(id: ID, slug: String): AssignmentObjectType
@@ -307,12 +308,155 @@ type AssignmentCompletionObjectType {
edoniq_extended_time_flag: Boolean!
assignment_user: UserType!
assignment: AssignmentObjectType!
+ course_session: CourseSessionObjectType!
completion_status: AssignmentAssignmentCompletionCompletionStatusChoices!
completion_data: GenericScalar
additional_json_data: JSONString!
learning_content_page_id: ID
}
+type CourseSessionObjectType {
+ id: ID!
+ created_at: DateTime!
+ updated_at: DateTime!
+ course: CourseObjectType!
+ title: String!
+ start_date: Date
+ end_date: Date
+ attendance_courses: [CourseSessionAttendanceCourseObjectType]
+ assignments: [CourseSessionAssignmentObjectType]
+ edoniq_tests: [CourseSessionEdoniqTestObjectType]
+ users: [CourseSessionUserObjectsType]
+}
+
+"""
+The `Date` scalar type represents a Date
+value as specified by
+[iso8601](https://en.wikipedia.org/wiki/ISO_8601).
+"""
+scalar Date
+
+type CourseSessionAttendanceCourseObjectType {
+ id: ID!
+ learning_content: LearningContentAttendanceCourseObjectType
+ due_date: DueDateObjectType
+ location: String!
+ trainer: String!
+ course_session_id: ID
+ learning_content_id: ID
+ attendance_user_list: [AttendanceUserObjectType]
+}
+
+type LearningContentAttendanceCourseObjectType implements LearningContentInterface {
+ id: ID
+ title: String
+ slug: String
+ content_type: String
+ live: Boolean
+ translation_key: String
+ frontend_url: String
+ circle: CircleObjectType
+ course: CourseObjectType
+ minutes: Int
+ description: String
+ content: String
+}
+
+type DueDateObjectType {
+ id: ID!
+
+ """Startdatum ist Pflicht"""
+ start: DateTime
+
+ """Enddatum ist optional"""
+ end: DateTime
+
+ """Nur aktivieren, wenn man die Felder manuell überschreiben will"""
+ manual_override_fields: Boolean!
+
+ """Title wird standarmässig vom LearningContent übernommen"""
+ title: String!
+
+ """Translation Key aus dem Frontend"""
+ assignment_type_translation_key: String!
+
+ """Translation Key aus dem Frontend"""
+ date_type_translation_key: String!
+
+ """
+ Überschreibt den Untertitel bei `assignment_type_translation_key` und `date_type_translation_key`
+ """
+ subtitle: String!
+
+ """URL wird vom LearningContent übernommen"""
+ url: String!
+ course_session: CourseSessionObjectType!
+}
+
+type AttendanceUserObjectType {
+ user_id: UUID!
+ status: AttendanceUserStatus!
+ first_name: String
+ last_name: String
+ email: String
+}
+
+"""An enumeration."""
+enum AttendanceUserStatus {
+ PRESENT
+ ABSENT
+}
+
+type CourseSessionAssignmentObjectType {
+ id: ID!
+ learning_content: LearningContentAssignmentObjectType
+ submission_deadline: DueDateObjectType
+ evaluation_deadline: DueDateObjectType
+ course_session_id: ID
+ learning_content_id: ID
+}
+
+type CourseSessionEdoniqTestObjectType {
+ id: ID!
+ learning_content: LearningContentEdoniqTestObjectType
+ course_session_id: ID
+ learning_content_id: ID
+ deadline: DueDateObjectType
+}
+
+type LearningContentEdoniqTestObjectType implements LearningContentInterface {
+ content_assignment: AssignmentObjectType
+ id: ID
+ title: String
+ slug: String
+ content_type: String
+ live: Boolean
+ translation_key: String
+ frontend_url: String
+ circle: CircleObjectType
+ course: CourseObjectType
+ minutes: Int
+ description: String
+ content: String
+}
+
+type CourseSessionUserObjectsType {
+ id: UUID!
+ role: String
+ user_id: UUID
+ first_name: String
+ last_name: String
+ email: String
+ avatar_url: String
+ circles: [CourseSessionUserExpertCircleType]
+}
+
+type CourseSessionUserExpertCircleType {
+ id: ID
+ title: String
+ slug: String
+}
+
"""An enumeration."""
enum AssignmentAssignmentCompletionCompletionStatusChoices {
"""IN_PROGRESS"""
@@ -361,21 +505,6 @@ enum LearnpathLearningContentAssignmentAssignmentTypeChoices {
EDONIQ_TEST
}
-type LearningContentAttendanceCourseObjectType implements LearningContentInterface {
- id: ID
- title: String
- slug: String
- content_type: String
- live: Boolean
- translation_key: String
- frontend_url: String
- circle: CircleObjectType
- course: CourseObjectType
- minutes: Int
- description: String
- content: String
-}
-
type LearningContentFeedbackObjectType implements LearningContentInterface {
id: ID
title: String
@@ -436,22 +565,6 @@ type LearningContentRichTextObjectType implements LearningContentInterface {
content: String
}
-type LearningContentTestObjectType implements LearningContentInterface {
- content_assignment: AssignmentObjectType
- id: ID
- title: String
- slug: String
- content_type: String
- live: Boolean
- translation_key: String
- frontend_url: String
- circle: CircleObjectType
- course: CourseObjectType
- minutes: Int
- description: String
- content: String
-}
-
type LearningContentVideoObjectType implements LearningContentInterface {
id: ID
title: String
@@ -482,32 +595,6 @@ type LearningContentDocumentListObjectType implements LearningContentInterface {
content: String
}
-type CourseSessionAttendanceCourseType {
- id: ID!
- location: String!
- trainer: String!
- course_session_id: ID
- learning_content_id: ID
- due_date_id: ID
- end: DateTime
- start: DateTime
- attendance_user_list: [AttendanceUserType]
-}
-
-type AttendanceUserType {
- user_id: UUID!
- status: AttendanceUserStatus!
- first_name: String
- last_name: String
- email: String
-}
-
-"""An enumeration."""
-enum AttendanceUserStatus {
- PRESENT
- ABSENT
-}
-
type CompetenceCertificateListObjectType implements CoursePageInterface {
id: ID
path: String!
@@ -577,7 +664,7 @@ type ErrorType {
}
type AttendanceCourseUserMutation {
- course_session_attendance_course: CourseSessionAttendanceCourseType
+ course_session_attendance_course: CourseSessionAttendanceCourseObjectType
}
input AttendanceUserInputType {
diff --git a/client/src/gql/typenames.ts b/client/src/gql/typenames.ts
index 66b3076f..af5502a0 100644
--- a/client/src/gql/typenames.ts
+++ b/client/src/gql/typenames.ts
@@ -6,8 +6,8 @@ export const AssignmentCompletionStatus = "AssignmentCompletionStatus";
export const AssignmentObjectType = "AssignmentObjectType";
export const AttendanceCourseUserMutation = "AttendanceCourseUserMutation";
export const AttendanceUserInputType = "AttendanceUserInputType";
+export const AttendanceUserObjectType = "AttendanceUserObjectType";
export const AttendanceUserStatus = "AttendanceUserStatus";
-export const AttendanceUserType = "AttendanceUserType";
export const Boolean = "Boolean";
export const CircleObjectType = "CircleObjectType";
export const CompetenceCertificateListObjectType = "CompetenceCertificateListObjectType";
@@ -15,8 +15,15 @@ export const CompetenceCertificateObjectType = "CompetenceCertificateObjectType"
export const CoreUserLanguageChoices = "CoreUserLanguageChoices";
export const CourseObjectType = "CourseObjectType";
export const CoursePageInterface = "CoursePageInterface";
-export const CourseSessionAttendanceCourseType = "CourseSessionAttendanceCourseType";
+export const CourseSessionAssignmentObjectType = "CourseSessionAssignmentObjectType";
+export const CourseSessionAttendanceCourseObjectType = "CourseSessionAttendanceCourseObjectType";
+export const CourseSessionEdoniqTestObjectType = "CourseSessionEdoniqTestObjectType";
+export const CourseSessionObjectType = "CourseSessionObjectType";
+export const CourseSessionUserExpertCircleType = "CourseSessionUserExpertCircleType";
+export const CourseSessionUserObjectsType = "CourseSessionUserObjectsType";
+export const Date = "Date";
export const DateTime = "DateTime";
+export const DueDateObjectType = "DueDateObjectType";
export const ErrorType = "ErrorType";
export const FeedbackResponseObjectType = "FeedbackResponseObjectType";
export const Float = "Float";
@@ -28,13 +35,13 @@ export const JSONString = "JSONString";
export const LearningContentAssignmentObjectType = "LearningContentAssignmentObjectType";
export const LearningContentAttendanceCourseObjectType = "LearningContentAttendanceCourseObjectType";
export const LearningContentDocumentListObjectType = "LearningContentDocumentListObjectType";
+export const LearningContentEdoniqTestObjectType = "LearningContentEdoniqTestObjectType";
export const LearningContentFeedbackObjectType = "LearningContentFeedbackObjectType";
export const LearningContentInterface = "LearningContentInterface";
export const LearningContentLearningModuleObjectType = "LearningContentLearningModuleObjectType";
export const LearningContentMediaLibraryObjectType = "LearningContentMediaLibraryObjectType";
export const LearningContentPlaceholderObjectType = "LearningContentPlaceholderObjectType";
export const LearningContentRichTextObjectType = "LearningContentRichTextObjectType";
-export const LearningContentTestObjectType = "LearningContentTestObjectType";
export const LearningContentVideoObjectType = "LearningContentVideoObjectType";
export const LearningPathObjectType = "LearningPathObjectType";
export const LearningSequenceObjectType = "LearningSequenceObjectType";
diff --git a/client/src/graphql/client.ts b/client/src/graphql/client.ts
index 926e0052..67c2f5fb 100644
--- a/client/src/graphql/client.ts
+++ b/client/src/graphql/client.ts
@@ -14,7 +14,7 @@ export const graphqlClient = new Client({
cacheExchange({
schema: schema,
keys: {
- AttendanceUserType: (data) => data?.user_id?.toString() ?? null,
+ AttendanceUserObjectType: (data) => data?.user_id?.toString() ?? null,
},
updates: {
Mutation: {
diff --git a/client/src/graphql/queries.ts b/client/src/graphql/queries.ts
index f9c420ce..877584de 100644
--- a/client/src/graphql/queries.ts
+++ b/client/src/graphql/queries.ts
@@ -76,7 +76,7 @@ export const ASSIGNMENT_COMPLETION_QUERY = graphql(`
`);
export const COURSE_QUERY = graphql(`
- query courseQuery($courseId: Int!) {
+ query courseQuery($courseId: ID!) {
course(id: $courseId) {
id
slug
@@ -122,3 +122,76 @@ export const COMPETENCE_NAVI_CERTIFICATE_QUERY = graphql(`
}
}
`);
+
+export const COURSE_SESSION_DETAIL_QUERY = graphql(`
+ query courseSessionDetail($courseSessionId: ID!) {
+ course_session(id: $courseSessionId) {
+ id
+ title
+ course {
+ id
+ title
+ }
+ users {
+ id
+ user_id
+ first_name
+ last_name
+ email
+ avatar_url
+ role
+ circles {
+ id
+ title
+ slug
+ }
+ }
+ attendance_courses {
+ id
+ location
+ trainer
+ due_date {
+ id
+ start
+ end
+ }
+ learning_content_id
+ learning_content {
+ id
+ title
+ }
+ }
+ assignments {
+ id
+ submission_deadline {
+ id
+ start
+ }
+ evaluation_deadline {
+ id
+ start
+ }
+ learning_content {
+ id
+ content_assignment {
+ id
+ title
+ assignment_type
+ }
+ }
+ }
+ edoniq_tests {
+ id
+ deadline {
+ id
+ start
+ end
+ }
+ learning_content {
+ id
+ title
+ }
+ }
+ }
+ }
+`);
diff --git a/client/src/pages/DashboardPage.vue b/client/src/pages/DashboardPage.vue
index f543f45a..ac0dcbcc 100644
--- a/client/src/pages/DashboardPage.vue
+++ b/client/src/pages/DashboardPage.vue
@@ -6,6 +6,7 @@ import { useUserStore } from "@/stores/user";
import type { CourseSession } from "@/types";
import log from "loglevel";
import { computed, onMounted } from "vue";
+import { getLearningPathUrl } from "@/utils/utils";
log.debug("DashboardPage created");
@@ -20,9 +21,9 @@ const allDueDates = courseSessionsStore.allDueDates();
const getNextStepLink = (courseSession: CourseSession) => {
return computed(() => {
if (courseSessionsStore.hasCockpit(courseSession)) {
- return courseSession.cockpit_url;
+ return `${courseSession.course_url}/cockpit`;
}
- return courseSession.learning_path_url;
+ return getLearningPathUrl(courseSession);
});
};
diff --git a/client/src/pages/TestCourseSessionComposablePage.vue b/client/src/pages/TestCourseSessionComposablePage.vue
new file mode 100644
index 00000000..689ab876
--- /dev/null
+++ b/client/src/pages/TestCourseSessionComposablePage.vue
@@ -0,0 +1,22 @@
+
+
+
+ Hello World
+
+ {{ queryResult.courseSessionDetail }}
+
diff --git a/client/src/pages/cockpit/CockpitParentPage.vue b/client/src/pages/cockpit/CockpitParentPage.vue
index a0f1663a..1e6c7f35 100644
--- a/client/src/pages/cockpit/CockpitParentPage.vue
+++ b/client/src/pages/cockpit/CockpitParentPage.vue
@@ -1,5 +1,5 @@
diff --git a/client/src/pages/cockpit/CockpitUserProfilePage.vue b/client/src/pages/cockpit/CockpitUserProfilePage.vue
index d78609a6..c3c0c722 100644
--- a/client/src/pages/cockpit/CockpitUserProfilePage.vue
+++ b/client/src/pages/cockpit/CockpitUserProfilePage.vue
@@ -7,6 +7,7 @@ import { computed, onMounted } from "vue";
import CompetenceDetail from "@/pages/competence/ActionCompetenceDetail.vue";
import LearningPathPathView from "@/pages/learningPath/learningPathPage/LearningPathPathView.vue";
+import { useCourseSessionDetailQuery } from "@/composables";
const props = defineProps<{
userId: string;
@@ -27,8 +28,10 @@ const learningPath = computed(() => {
return learningPathStore.learningPathForUser(props.courseSlug, props.userId);
});
+const { findUser } = useCourseSessionDetailQuery();
+
const user = computed(() => {
- return cockpitStore.courseSessionMembers?.find((csu) => csu.user_id === props.userId);
+ return findUser(props.userId);
});
function setActiveClasses(isActive: boolean) {
diff --git a/client/src/pages/cockpit/assignmentEvaluationPage/AssignmentEvaluationPage.vue b/client/src/pages/cockpit/assignmentEvaluationPage/AssignmentEvaluationPage.vue
index 24422f6f..b201d057 100644
--- a/client/src/pages/cockpit/assignmentEvaluationPage/AssignmentEvaluationPage.vue
+++ b/client/src/pages/cockpit/assignmentEvaluationPage/AssignmentEvaluationPage.vue
@@ -1,20 +1,15 @@
diff --git a/client/src/pages/cockpit/assignmentsPage/AssignmentDetails.vue b/client/src/pages/cockpit/assignmentsPage/AssignmentDetails.vue
index bd3d1b74..fe403021 100644
--- a/client/src/pages/cockpit/assignmentsPage/AssignmentDetails.vue
+++ b/client/src/pages/cockpit/assignmentsPage/AssignmentDetails.vue
@@ -2,20 +2,17 @@
import ItPersonRow from "@/components/ui/ItPersonRow.vue";
import type { StatusCount } from "@/components/ui/ItProgress.vue";
import type { GradedUser } from "@/services/assignmentService";
-import {
- findAssignmentDetail,
- loadAssignmentCompletionStatusData,
-} from "@/services/assignmentService";
-import { useCockpitStore } from "@/stores/cockpit";
+import { loadAssignmentCompletionStatusData } from "@/services/assignmentService";
import type {
CourseSession,
CourseSessionUser,
LearningContentAssignment,
} from "@/types";
-import dayjs from "dayjs";
import log from "loglevel";
import { computed, onMounted, reactive } from "vue";
import AssignmentSubmissionProgress from "@/pages/cockpit/cockpitPage/AssignmentSubmissionProgress.vue";
+import { useCourseSessionDetailQuery } from "@/composables";
+import { formatDueDate } from "../../../components/dueDates/dueDatesUtils";
const props = defineProps<{
courseSession: CourseSession;
@@ -27,7 +24,7 @@ log.debug(
props.learningContentAssignment.content_assignment_id
);
-const cockpitStore = useCockpitStore();
+const courseSessionDetailResult = useCourseSessionDetailQuery();
const state = reactive({
progressStatusCount: {} as StatusCount,
@@ -35,6 +32,12 @@ const state = reactive({
assignmentSubmittedUsers: [] as CourseSessionUser[],
});
+const assignmentDetail = computed(() => {
+ return courseSessionDetailResult.findAssignmentDetail(
+ props.learningContentAssignment.content_assignment_id.toString()
+ );
+});
+
onMounted(async () => {
const { gradedUsers, assignmentSubmittedUsers } =
await loadAssignmentCompletionStatusData(
@@ -45,10 +48,6 @@ onMounted(async () => {
state.gradedUsers = gradedUsers;
state.assignmentSubmittedUsers = assignmentSubmittedUsers;
});
-
-const assignmentDetail = computed(() =>
- findAssignmentDetail(props.learningContentAssignment.content_assignment_id)
-);
@@ -62,14 +61,12 @@ const assignmentDetail = computed(() =>
{{ $t("Abgabetermin Ergebnisse:") }}
- {{ dayjs(assignmentDetail.submission_deadline_start).format("DD.MM.YYYY") }}
+ {{ formatDueDate(assignmentDetail.submission_deadline.start) }}
-
+
-
- {{ $t("Freigabetermin Bewertungen:") }}
- {{ dayjs(assignmentDetail.evaluation_deadline_start).format("DD.MM.YYYY") }}
-
+ {{ $t("Freigabetermin Bewertungen:") }}
+ {{ formatDueDate(assignmentDetail.evaluation_deadline.start) }}
@@ -85,11 +82,11 @@ const assignmentDetail = computed(() =>
/>
-
+
{
return courseSession.value.attendance_courses;
@@ -167,8 +166,8 @@ watch(
-
+
{{ $t("cockpit.progress") }}
diff --git a/client/src/pages/cockpit/cockpitPage/FeedbackSubmissionProgress.vue b/client/src/pages/cockpit/cockpitPage/FeedbackSubmissionProgress.vue
index 78c16ff7..b39dfe49 100644
--- a/client/src/pages/cockpit/cockpitPage/FeedbackSubmissionProgress.vue
+++ b/client/src/pages/cockpit/cockpitPage/FeedbackSubmissionProgress.vue
@@ -4,7 +4,7 @@ import log from "loglevel";
import { computed, onMounted, ref } from "vue";
import ItProgress from "@/components/ui/ItProgress.vue";
import { itGet } from "@/fetchHelpers";
-import { useCockpitStore } from "@/stores/cockpit";
+import { useCourseSessionDetailQuery } from "@/composables";
const props = defineProps<{
courseSession: CourseSession;
@@ -13,12 +13,11 @@ const props = defineProps<{
log.debug("FeedbackSubmissionProgress created");
-const cockpitStore = useCockpitStore();
-
+const courseSessionDetailResult = useCourseSessionDetailQuery();
const completeFeedbacks = ref(0);
const numFeedbacks = computed(() => {
- return cockpitStore.courseSessionMembers?.length ?? 0;
+ return courseSessionDetailResult.filterMembers().length;
});
onMounted(async () => {
diff --git a/client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue b/client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue
index e323cf10..9e8eabed 100644
--- a/client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue
+++ b/client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue
@@ -1,7 +1,6 @@
2