diff --git a/frontend/src/i18n/locale/en.json b/frontend/src/i18n/locale/en.json index e4042d09..51b9484b 100644 --- a/frontend/src/i18n/locale/en.json +++ b/frontend/src/i18n/locale/en.json @@ -121,5 +121,6 @@ "invite": "invite", "assignmentIndicator": "ASSIGNMENT", "searchAllLearningPathsTitle": "Search all learning paths", - "searchAllLearningPathsDescription": "You didn't find what you were looking for? Click here to search our whole database of available learning paths." + "searchAllLearningPathsDescription": "You didn't find what you were looking for? Click here to search our whole database of available learning paths.", + "not-in-group-message": "You are not part of a group yet" } diff --git a/frontend/src/utils/assignment-utils.ts b/frontend/src/utils/assignment-utils.ts new file mode 100644 index 00000000..938f7962 --- /dev/null +++ b/frontend/src/utils/assignment-utils.ts @@ -0,0 +1,5 @@ +import type { LearningPath } from "@/data-objects/learning-paths/learning-path.ts"; + +export function calculateProgress(lp: LearningPath): number { + return ((lp.amountOfNodes - lp.amountOfNodesLeft) / lp.amountOfNodes) * 100; +} diff --git a/frontend/src/views/assignments/StudentAssignment.vue b/frontend/src/views/assignments/StudentAssignment.vue index fb81a265..853994a5 100644 --- a/frontend/src/views/assignments/StudentAssignment.vue +++ b/frontend/src/views/assignments/StudentAssignment.vue @@ -1,75 +1,93 @@ - - + +

{{ t("group") }}

-
+ +
  • {{ student.firstName + " " + student.lastName }}
+ +
+ + {{ t("not-in-group-message") }} + +
+
diff --git a/frontend/src/views/assignments/TeacherAssignment.vue b/frontend/src/views/assignments/TeacherAssignment.vue index 04fea1a6..918c2abe 100644 --- a/frontend/src/views/assignments/TeacherAssignment.vue +++ b/frontend/src/views/assignments/TeacherAssignment.vue @@ -49,15 +49,6 @@ }, ]; - const descriptionRules = [ - (value: string): string | boolean => { - if (!value || value.trim() === "") { - return "Description cannot be empty."; - } - return true; - }, - ]; - // Get all the groups withing the assignment const groupsQueryResult = useGroupsQuery(props.classId, props.assignmentId, true); groups.value = groupsQueryResult.data.value?.groups;