From 6a38ce99bd82a2832ac5e5a26e1e95f60c2dcfca Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Fri, 15 Sep 2023 08:16:41 +0200 Subject: [PATCH 001/103] Adjusting headline --- .../summary/exam-participation-summary.component.html | 7 ++----- src/main/webapp/i18n/de/exam.json | 2 +- src/main/webapp/i18n/en/exam.json | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html index 8ecb12c0db03..8c1f6f5823af 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html @@ -1,10 +1,7 @@

- - {{ 'artemisApp.exam.examSummary.yourSubmissionTo' | artemisTranslate: { examTitle: studentExam?.exam?.title, studentName: studentExam?.user?.name } }} - - - {{ 'artemisApp.exam.examSummary.studentSubmissionTo' | artemisTranslate: { examTitle: studentExam?.exam?.title, studentName: studentExam?.user?.name } }} + + {{ 'artemisApp.exam.examSummary.examResults' | artemisTranslate }}

+

+ {{ 'artemisApp.exam.examSummary.generalInformation' | artemisTranslate }} +

@@ -88,7 +91,7 @@
{{ exercise?.exerciseGroup?.title ?? '-' }} - [{{ exercise.maxPoints }} {{ 'artemisApp.examParticipation.points' | artemisTranslate }}, {{ exercise.bonusPoints }} {{ 'artemisApp.examParticipation.bonus' | artemisTranslate }}] Date: Fri, 15 Sep 2023 08:34:55 +0200 Subject: [PATCH 003/103] Removing exam badge if not test exam --- .../participate/information/exam-information.component.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/app/exam/participate/information/exam-information.component.html b/src/main/webapp/app/exam/participate/information/exam-information.component.html index 9638b73f29ee..43f4b05bda61 100644 --- a/src/main/webapp/app/exam/participate/information/exam-information.component.html +++ b/src/main/webapp/app/exam/participate/information/exam-information.component.html @@ -1,8 +1,7 @@
-
+
{{ 'artemisApp.examManagement.testExam.examMode' | artemisTranslate }}: -
{{ 'artemisApp.examManagement.testExam.realExam' | artemisTranslate }}
-
{{ 'artemisApp.examManagement.testExam.testExam' | artemisTranslate }}
+
{{ 'artemisApp.examManagement.testExam.testExam' | artemisTranslate }}
From 2e3156a6c3d3e46928fa4ae361ef0a23d8c28699 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Fri, 15 Sep 2023 09:22:32 +0200 Subject: [PATCH 004/103] Moving title to component where it belongs to --- .../exam-information.component.html | 165 +++++++++--------- .../exam-participation-summary.component.html | 3 - 2 files changed, 85 insertions(+), 83 deletions(-) diff --git a/src/main/webapp/app/exam/participate/information/exam-information.component.html b/src/main/webapp/app/exam/participate/information/exam-information.component.html index 43f4b05bda61..550de1305ad0 100644 --- a/src/main/webapp/app/exam/participate/information/exam-information.component.html +++ b/src/main/webapp/app/exam/participate/information/exam-information.component.html @@ -1,87 +1,92 @@ -
-
- {{ 'artemisApp.examManagement.testExam.examMode' | artemisTranslate }}: -
{{ 'artemisApp.examManagement.testExam.testExam' | artemisTranslate }}
-
- -
- - {{ 'artemisApp.exam.date' | artemisTranslate }}: - {{ currentDate! | artemisDate: 'long-date' }} - - - {{ 'artemisApp.exam.workingTime' | artemisTranslate }}: - {{ exam.workingTime! | artemisDurationFromSeconds }} - - - {{ 'artemisApp.exam.overview.testExam.workingTimeCalculated' | artemisTranslate }} : - - -
-
-
- - {{ 'artemisApp.exam.time' | artemisTranslate }}: - {{ exam.startDate | artemisDate: 'long-date' }} {{ exam.startDate | artemisDate: 'time' }} - - - {{ examEndDate | artemisDate: 'long-date' }} {{ examEndDate | artemisDate: 'time' }} - +
+

+ {{ 'artemisApp.exam.examSummary.generalInformation' | artemisTranslate }} +

+
+
+ {{ 'artemisApp.examManagement.testExam.examMode' | artemisTranslate }}: +
{{ 'artemisApp.examManagement.testExam.testExam' | artemisTranslate }}
- + +
{{ 'artemisApp.exam.date' | artemisTranslate }}: - {{ exam.startDate | artemisDate: 'long-date' }} + {{ currentDate! | artemisDate: 'long-date' }} - - {{ 'artemisApp.exam.time' | artemisTranslate }}: - {{ exam.startDate | artemisDate: 'time' }} - - - {{ examEndDate | artemisDate: 'time' }} + + {{ 'artemisApp.exam.workingTime' | artemisTranslate }}: + {{ exam.workingTime! | artemisDurationFromSeconds }} - -
-
- - {{ 'artemisApp.exam.duration' | artemisTranslate }}: - - - - -
-
- - {{ 'artemisApp.exam.examStudentReviewStart' | artemisTranslate }}: - {{ exam.examStudentReviewStart | artemisDate }} - -
-
- - {{ 'artemisApp.exam.examStudentReviewEnd' | artemisTranslate }}: - {{ exam.examStudentReviewEnd | artemisDate }} - -
-
- - {{ 'artemisApp.examManagement.examiner' | artemisTranslate }}: - {{ exam.examiner }} - - - {{ 'artemisApp.examManagement.moduleNumber' | artemisTranslate }}: - {{ exam.moduleNumber }} - - - {{ 'artemisApp.exam.course' | artemisTranslate }}: - {{ exam.courseName }} - -
-
- - {{ 'artemisApp.exam.exercises' | artemisTranslate }}: - {{ exam.numberOfExercisesInExam }} - - - {{ 'artemisApp.exam.points' | artemisTranslate }}: - {{ exam.examMaxPoints }} - + + {{ 'artemisApp.exam.overview.testExam.workingTimeCalculated' | artemisTranslate }} : + + +
+
+
+ + {{ 'artemisApp.exam.time' | artemisTranslate }}: + {{ exam.startDate | artemisDate: 'long-date' }} {{ exam.startDate | artemisDate: 'time' }} + - + {{ examEndDate | artemisDate: 'long-date' }} {{ examEndDate | artemisDate: 'time' }} + +
+ + + {{ 'artemisApp.exam.date' | artemisTranslate }}: + {{ exam.startDate | artemisDate: 'long-date' }} + + + {{ 'artemisApp.exam.time' | artemisTranslate }}: + {{ exam.startDate | artemisDate: 'time' }} + - + {{ examEndDate | artemisDate: 'time' }} + + +
+
+ + {{ 'artemisApp.exam.duration' | artemisTranslate }}: + + + + +
+
+ + {{ 'artemisApp.exam.examStudentReviewStart' | artemisTranslate }}: + {{ exam.examStudentReviewStart | artemisDate }} + +
+
+ + {{ 'artemisApp.exam.examStudentReviewEnd' | artemisTranslate }}: + {{ exam.examStudentReviewEnd | artemisDate }} + +
+
+ + {{ 'artemisApp.examManagement.examiner' | artemisTranslate }}: + {{ exam.examiner }} + + + {{ 'artemisApp.examManagement.moduleNumber' | artemisTranslate }}: + {{ exam.moduleNumber }} + + + {{ 'artemisApp.exam.course' | artemisTranslate }}: + {{ exam.courseName }} + +
+
+ + {{ 'artemisApp.exam.exercises' | artemisTranslate }}: + {{ exam.numberOfExercisesInExam }} + + + {{ 'artemisApp.exam.points' | artemisTranslate }}: + {{ exam.examMaxPoints }} + +
diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html index cf81dc07478e..c2f8ff52de3e 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html @@ -9,9 +9,6 @@

-

- {{ 'artemisApp.exam.examSummary.generalInformation' | artemisTranslate }} -

From ccfdbd79c38f80dec0eed19572b66a4d0ff9b214 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Fri, 15 Sep 2023 10:04:29 +0200 Subject: [PATCH 005/103] Reducing header information according to design and rename component for consistent naming --- .../exam-participation-cover.component.html | 2 +- ...> exam-general-information.component.html} | 89 ++++++++----------- ... => exam-general-information.component.ts} | 6 +- .../exam-participation-summary.component.html | 2 +- .../exam-participation-summary.module.ts | 6 +- src/main/webapp/i18n/de/exam.json | 1 + src/main/webapp/i18n/en/exam.json | 1 + ...exam-participation-cover.component.spec.ts | 4 +- .../exam-information.component.spec.ts | 10 +-- ...am-participation-summary.component.spec.ts | 4 +- 10 files changed, 55 insertions(+), 70 deletions(-) rename src/main/webapp/app/exam/participate/information/{exam-information.component.html => exam-general-information.component.html} (52%) rename src/main/webapp/app/exam/participate/information/{exam-information.component.ts => exam-general-information.component.ts} (86%) diff --git a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html index 499d671098a9..2b9a9cc60ba6 100644 --- a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html +++ b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html @@ -27,7 +27,7 @@


- +
{{ 'artemisApp.studentExam.submissionNotInTime' | artemisTranslate }} diff --git a/src/main/webapp/app/exam/participate/information/exam-information.component.html b/src/main/webapp/app/exam/participate/information/exam-general-information.component.html similarity index 52% rename from src/main/webapp/app/exam/participate/information/exam-information.component.html rename to src/main/webapp/app/exam/participate/information/exam-general-information.component.html index 550de1305ad0..e1248b417280 100644 --- a/src/main/webapp/app/exam/participate/information/exam-information.component.html +++ b/src/main/webapp/app/exam/participate/information/exam-general-information.component.html @@ -22,6 +22,26 @@

+ +
+ + {{ 'artemisApp.examManagement.moduleNumber' | artemisTranslate }}: + {{ exam.moduleNumber }} + +
+
+ + {{ 'artemisApp.exam.course' | artemisTranslate }}: + {{ exam.courseName }} + +
+
+ + {{ 'artemisApp.examManagement.examiner' | artemisTranslate }}: + {{ exam.examiner }} + +
+
@@ -32,61 +52,24 @@

- - {{ 'artemisApp.exam.date' | artemisTranslate }}: - {{ exam.startDate | artemisDate: 'long-date' }} - - - {{ 'artemisApp.exam.time' | artemisTranslate }}: - {{ exam.startDate | artemisDate: 'time' }} - - - {{ examEndDate | artemisDate: 'time' }} - +
+ + {{ 'artemisApp.exam.date' | artemisTranslate }}: + {{ exam.startDate | artemisDate: 'long-date' }} + +
+
+ + {{ 'artemisApp.exam.workingTime' | artemisTranslate }}: + {{ exam.startDate | artemisDate: 'time' }} - {{ examEndDate | artemisDate: 'time' }} + +
-
- - {{ 'artemisApp.exam.duration' | artemisTranslate }}: - - - - -
-
- - {{ 'artemisApp.exam.examStudentReviewStart' | artemisTranslate }}: - {{ exam.examStudentReviewStart | artemisDate }} - -
-
- - {{ 'artemisApp.exam.examStudentReviewEnd' | artemisTranslate }}: - {{ exam.examStudentReviewEnd | artemisDate }} - -
-
- - {{ 'artemisApp.examManagement.examiner' | artemisTranslate }}: - {{ exam.examiner }} - - - {{ 'artemisApp.examManagement.moduleNumber' | artemisTranslate }}: - {{ exam.moduleNumber }} - - - {{ 'artemisApp.exam.course' | artemisTranslate }}: - {{ exam.courseName }} - -
-
- - {{ 'artemisApp.exam.exercises' | artemisTranslate }}: - {{ exam.numberOfExercisesInExam }} - - - {{ 'artemisApp.exam.points' | artemisTranslate }}: - {{ exam.examMaxPoints }} - +
+ {{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}: + {{ exam.examStudentReviewStart | artemisDate }} + - {{ exam.examStudentReviewEnd | artemisDate }}
diff --git a/src/main/webapp/app/exam/participate/information/exam-information.component.ts b/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts similarity index 86% rename from src/main/webapp/app/exam/participate/information/exam-information.component.ts rename to src/main/webapp/app/exam/participate/information/exam-general-information.component.ts index 8057e1b504cf..e3fa2518d64f 100644 --- a/src/main/webapp/app/exam/participate/information/exam-information.component.ts +++ b/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts @@ -5,10 +5,10 @@ import { endTime, getAdditionalWorkingTime, isExamOverMultipleDays, normalWorkin import dayjs from 'dayjs/esm'; @Component({ - selector: 'jhi-exam-information', - templateUrl: './exam-information.component.html', + selector: 'jhi-exam-general-information', + templateUrl: './exam-general-information.component.html', }) -export class ExamInformationComponent implements OnInit { +export class ExamGeneralInformationComponent implements OnInit { @Input() exam: Exam; @Input() studentExam: StudentExam; diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html index c2f8ff52de3e..9f2431dc1247 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html @@ -9,7 +9,7 @@

- +
-
+
{{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}: {{ exam.examStudentReviewStart | artemisDate }} - - {{ exam.examStudentReviewEnd | artemisDate }} + - + {{ exam.examStudentReviewEnd | artemisDate }} +
+
+ {{ 'artemisApp.exam.examinedStudent' | artemisTranslate }}: + {{ studentExam!.user!.name }}
diff --git a/src/main/webapp/i18n/de/exam.json b/src/main/webapp/i18n/de/exam.json index ff620562e10e..55347b80e9d8 100644 --- a/src/main/webapp/i18n/de/exam.json +++ b/src/main/webapp/i18n/de/exam.json @@ -109,6 +109,7 @@ "date": "Datum", "time": "Zeit", "workingTime": "Bearbeitungszeit", + "examinedStudent": "Prüfungsteilnehmer:in", "resultInformation": "Dein Ergebnis wird nach Abschluss der Korrektur an dieser Stelle für dich veröffentlicht. Du kommst zu dieser Seite, indem du in der Klausurenübersicht des Kurses auf diese Klausur klickst.", "course": "Kurs", "exercises": "Aufgaben", diff --git a/src/main/webapp/i18n/en/exam.json b/src/main/webapp/i18n/en/exam.json index dffccee3a50d..b31b90aad8de 100644 --- a/src/main/webapp/i18n/en/exam.json +++ b/src/main/webapp/i18n/en/exam.json @@ -109,6 +109,7 @@ "date": "Date", "time": "Time", "workingTime": "Working Time", + "examinedStudent": "Examined student", "resultInformation": "Your result will be published here as soon as the correction is finished. You can get to this page by clicking on this exam in the exam overview of this course.", "course": "Course", "exercises": "Exercises", From 78bf7e1541e7daffb86d9e045f1c1632ecfbec78 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Fri, 15 Sep 2023 10:38:56 +0200 Subject: [PATCH 007/103] Adjust component naming to exam results --- .../exam-cover/exam-participation-cover.component.html | 2 +- .../information/exam-general-information.component.ts | 2 +- .../summary/exam-participation-summary.component.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html index 2b9a9cc60ba6..64b0f95ce0e0 100644 --- a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html +++ b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html @@ -27,7 +27,7 @@


- +
{{ 'artemisApp.studentExam.submissionNotInTime' | artemisTranslate }} diff --git a/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts b/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts index e3fa2518d64f..c10d98594fab 100644 --- a/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts +++ b/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts @@ -5,7 +5,7 @@ import { endTime, getAdditionalWorkingTime, isExamOverMultipleDays, normalWorkin import dayjs from 'dayjs/esm'; @Component({ - selector: 'jhi-exam-general-information', + selector: 'jhi-exam-results-general-information', templateUrl: './exam-general-information.component.html', }) export class ExamGeneralInformationComponent implements OnInit { diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html index 9f2431dc1247..ef5e4fdbd369 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html @@ -9,7 +9,7 @@

- +
+
-
+
diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html index d240e4003bcf..ebfd93274bbb 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html @@ -1,136 +1,144 @@ -
-

{{ 'artemisApp.exam.examSummary.points.overview' | artemisTranslate }}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#{{ 'artemisApp.exam.examSummary.points.exercise' | artemisTranslate }}{{ 'artemisApp.exercise.includedInOverallScore' | artemisTranslate }}{{ 'artemisApp.exam.examSummary.points.yourPoints' | artemisTranslate }}{{ 'artemisApp.exam.examSummary.points.maxPoints' | artemisTranslate }}{{ 'artemisApp.exam.examSummary.points.maxBonus' | artemisTranslate }}
{{ i + 1 }} - {{ exercise?.exerciseGroup?.title ?? '-' }} - {{ exerciseService.isIncludedInScore(exercise) }} - {{ getAchievedPoints(exercise) }} - - {{ exercise.includedInOverallScore === IncludedInOverallScore.INCLUDED_AS_BONUS ? 0 : exercise.maxPoints }} - - {{ - exercise.includedInOverallScore === IncludedInOverallScore.INCLUDED_AS_BONUS ? exercise.maxPoints : exercise.bonusPoints - }} -
{{ 'artemisApp.exam.examSummary.points.total' | artemisTranslate }}- - {{ getAchievedPointsSum() }} - - {{ getMaxNormalPointsSum() }} - - {{ getMaxBonusPointsSum() }} -
-
- {{ - 'artemisApp.exam.examSummary.points.youAchievedWithBonus' - | artemisTranslate - : { - achievedPoints: getAchievedPointsSum(), - normalPoints: getMaxNormalPointsSum() - } - }} -
-
- {{ - 'artemisApp.exam.examSummary.points.youAchieved' - | artemisTranslate - : { - achievedPoints: getAchievedPointsSum(), - normalPoints: getMaxNormalPointsSum() - } - }} -
-
- {{ - 'artemisApp.exam.examSummary.points.youAchievedFromBonus.' + studentExamWithGrade.studentResult.gradeWithBonus.bonusStrategy - | artemisTranslate - : { - achievedBonus: studentExamWithGrade.studentResult.gradeWithBonus.bonusGrade, - bonusFromTitle: studentExamWithGrade.studentResult.gradeWithBonus.bonusFromTitle - } - }} -
-
- {{ - 'artemisApp.exam.examSummary.points.youAchievedPointsAfterBonus' - | artemisTranslate - : { - finalPoints: studentExamWithGrade.studentResult.gradeWithBonus?.finalPoints - } - }} -
-
- - - - - - - - - - - - - - -
{{ 'artemisApp.exam.examSummary.' + (studentExamWithGrade.studentResult.gradeWithBonus != undefined ? 'gradeBeforeBonus' : 'grade') | artemisTranslate }}: - {{ grade }} -
{{ 'artemisApp.exam.examSummary.bonus' | artemisTranslate }}:{{ grade }}
{{ 'artemisApp.exam.examSummary.gradeAfterBonus' | artemisTranslate }}: - {{ studentExamWithGrade.studentResult.gradeWithBonus.finalGrade }} -
- - - -  {{ - isBonus ? ('artemisApp.exam.examSummary.gradeKeyButtonBonus' | artemisTranslate) : ('artemisApp.exam.examSummary.gradeKeyButton' | artemisTranslate) - }} +

+ {{ 'artemisApp.exam.examSummary.points.overview' | artemisTranslate }} +

+
+ + + + + + + + + + + + + - - - - - -  {{ 'artemisApp.exam.examSummary.bonusGradeKeyButton' | artemisTranslate }} - - - + + + + + + + + + + + + + + + + + +
#{{ 'artemisApp.exam.examSummary.points.exercise' | artemisTranslate }}{{ 'artemisApp.exercise.includedInOverallScore' | artemisTranslate }}{{ 'artemisApp.exam.examSummary.points.yourPoints' | artemisTranslate }}{{ 'artemisApp.exam.examSummary.points.maxPoints' | artemisTranslate }}{{ 'artemisApp.exam.examSummary.points.maxBonus' | artemisTranslate }}
{{ exerciseIndex + 1 }} + {{ exercise?.exerciseGroup?.title ?? '-' }} + {{ exerciseService.isIncludedInScore(exercise) }} + {{ getAchievedPoints(exercise) }} + + {{ + exercise.includedInOverallScore === IncludedInOverallScore.INCLUDED_AS_BONUS ? 0 : exercise.maxPoints + }} + + {{ + exercise.includedInOverallScore === IncludedInOverallScore.INCLUDED_AS_BONUS ? exercise.maxPoints : exercise.bonusPoints + }} +
{{ 'artemisApp.exam.examSummary.points.total' | artemisTranslate }}- + {{ getAchievedPointsSum() }} + + {{ getMaxNormalPointsSum() }} + + {{ getMaxBonusPointsSum() }} +
+
+ {{ + 'artemisApp.exam.examSummary.points.youAchievedWithBonus' + | artemisTranslate + : { + achievedPoints: getAchievedPointsSum(), + normalPoints: getMaxNormalPointsSum() + } + }} +
+
+ {{ + 'artemisApp.exam.examSummary.points.youAchieved' + | artemisTranslate + : { + achievedPoints: getAchievedPointsSum(), + normalPoints: getMaxNormalPointsSum() + } + }} +
+
+ {{ + 'artemisApp.exam.examSummary.points.youAchievedFromBonus.' + studentExamWithGrade.studentResult.gradeWithBonus.bonusStrategy + | artemisTranslate + : { + achievedBonus: studentExamWithGrade.studentResult.gradeWithBonus.bonusGrade, + bonusFromTitle: studentExamWithGrade.studentResult.gradeWithBonus.bonusFromTitle + } + }} +
+
+ {{ + 'artemisApp.exam.examSummary.points.youAchievedPointsAfterBonus' + | artemisTranslate + : { + finalPoints: studentExamWithGrade.studentResult.gradeWithBonus?.finalPoints + } + }} +
+
+ + + + + + + + + + + + + + +
+ {{ 'artemisApp.exam.examSummary.' + (studentExamWithGrade.studentResult.gradeWithBonus != undefined ? 'gradeBeforeBonus' : 'grade') | artemisTranslate }}: + + {{ grade }} +
{{ 'artemisApp.exam.examSummary.bonus' | artemisTranslate }}:{{ grade }}
{{ 'artemisApp.exam.examSummary.gradeAfterBonus' | artemisTranslate }}: + {{ studentExamWithGrade.studentResult.gradeWithBonus.finalGrade }} +
+ + + +  {{ + isBonus ? ('artemisApp.exam.examSummary.gradeKeyButtonBonus' | artemisTranslate) : ('artemisApp.exam.examSummary.gradeKeyButton' | artemisTranslate) + }} + + + + + +  {{ 'artemisApp.exam.examSummary.bonusGradeKeyButton' | artemisTranslate }} + + +
+
diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index 625e23d0d264..3ba4f51820ec 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -45,7 +45,7 @@ export class ExamPointsSummaryComponent implements OnInit { * - we are after the exam.publishResultsDate * - at least one exercise has a result */ - show(): boolean { + showResultOverview(): boolean { return !!(this.isExamResultPublished() && this.hasAtLeastOneResult()); } diff --git a/src/main/webapp/i18n/de/exam.json b/src/main/webapp/i18n/de/exam.json index 55347b80e9d8..d4ff9892d469 100644 --- a/src/main/webapp/i18n/de/exam.json +++ b/src/main/webapp/i18n/de/exam.json @@ -78,7 +78,7 @@ "missingResultNotice": "Es gibt derzeit kein Ergebnis für diese Quiz Aufgabe, obwohl die Ergebnisse schon veröffentlicht wurden. Bitte informiere die entsprechende Lehrkraft.", "points": { "exercise": "Aufgabe", - "overview": "Übersicht", + "overview": "Ergebnis-Übersicht", "total": "Gesamt", "yourPoints": "Deine Punkte", "maxPoints": "Erreichbare Punkte", diff --git a/src/main/webapp/i18n/en/exam.json b/src/main/webapp/i18n/en/exam.json index b31b90aad8de..7e570879ad5e 100644 --- a/src/main/webapp/i18n/en/exam.json +++ b/src/main/webapp/i18n/en/exam.json @@ -78,7 +78,7 @@ "missingResultNotice": "There is currently no result for this quiz exercise, although the results have already been published. Please inform your instructor.", "points": { "exercise": "Exercise", - "overview": "Overview", + "overview": "Result Overview", "total": "Total", "yourPoints": "Your Points", "maxPoints": "Achievable Points", From aa2104bd2bff4d0ff80a90a8a13883722249819a Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Sun, 17 Sep 2023 23:29:02 +0200 Subject: [PATCH 010/103] Hide included in score column if all exercises are included in score --- .../exam-points-summary.component.html | 6 +++--- .../exam-points-summary.component.scss | 15 +++++++++++++++ .../exam-points-summary.component.ts | 14 ++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html index ebfd93274bbb..5c102ac5135f 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html @@ -8,7 +8,7 @@

# {{ 'artemisApp.exam.examSummary.points.exercise' | artemisTranslate }} - {{ 'artemisApp.exercise.includedInOverallScore' | artemisTranslate }} + {{ 'artemisApp.exercise.includedInOverallScore' | artemisTranslate }} {{ 'artemisApp.exam.examSummary.points.yourPoints' | artemisTranslate }} {{ 'artemisApp.exam.examSummary.points.maxPoints' | artemisTranslate }} {{ 'artemisApp.exam.examSummary.points.maxBonus' | artemisTranslate }} @@ -26,7 +26,7 @@

{{ exercise?.exerciseGroup?.title ?? '-' }} - {{ exerciseService.isIncludedInScore(exercise) }} + {{ exerciseService.isIncludedInScore(exercise) }} {{ getAchievedPoints(exercise) }} @@ -45,7 +45,7 @@

{{ 'artemisApp.exam.examSummary.points.total' | artemisTranslate }} - - + - {{ getAchievedPointsSum() }} diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.scss b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.scss index 04135c7fc31a..d14ece171b5b 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.scss +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.scss @@ -1,3 +1,18 @@ +@import 'node_modules/bootstrap/scss/functions'; +@import 'node_modules/bootstrap/scss/variables'; +@import 'node_modules/bootstrap/scss/mixins'; + +:host { + cursor: pointer; + + > tr:not(thead tr) { + &:hover { + //transform: scale(1.012); + transform: scale(2); + } + } +} + .passing-grade { background-color: #28a745; color: white; diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index 3ba4f51820ec..8c11f3933ad6 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -49,6 +49,20 @@ export class ExamPointsSummaryComponent implements OnInit { return !!(this.isExamResultPublished() && this.hasAtLeastOneResult()); } + /** + * If all exercises are included in the overall score, we do not need to show the column + * -> displayed if at least one exercise is not included in the overall score + */ + showIncludedInScoreColumn(): boolean { + for (const exercise of this.studentExamWithGrade?.studentExam?.exercises ?? []) { + if (exercise.includedInOverallScore === IncludedInOverallScore.NOT_INCLUDED) { + return true; + } + } + + return false; + } + private isExamResultPublished() { const exam = this.studentExamWithGrade?.studentExam?.exam; return exam && exam.publishResultsDate && dayjs(exam.publishResultsDate).isBefore(this.serverDateService.now()); From 36d19069fe9ad0c90af872c647b6978033ad6527 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Sun, 17 Sep 2023 23:37:35 +0200 Subject: [PATCH 011/103] Adding visual indicator of clickable effect --- .../points-summary/exam-points-summary.component.html | 2 +- .../points-summary/exam-points-summary.component.scss | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html index 5c102ac5135f..280b0bcb9860 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html @@ -3,7 +3,7 @@

{{ 'artemisApp.exam.examSummary.points.overview' | artemisTranslate }}

- +
diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.scss b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.scss index d14ece171b5b..022aae7167b6 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.scss +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.scss @@ -3,12 +3,12 @@ @import 'node_modules/bootstrap/scss/mixins'; :host { - cursor: pointer; + tr:not(thead tr) { + cursor: pointer; - > tr:not(thead tr) { &:hover { - //transform: scale(1.012); - transform: scale(2); + transform: scale(1.012); + transition: transform 0.1s; } } } From 7e6afb3b93ea4fd01ae4674ae32c3280c5c8c881 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Sun, 17 Sep 2023 23:56:36 +0200 Subject: [PATCH 012/103] Adding column for percentage and indicate exercise type by adding icons --- .../summary/exam-participation-summary.component.ts | 6 ++---- .../points-summary/exam-points-summary.component.html | 11 +++++++++++ .../points-summary/exam-points-summary.component.ts | 8 +++++++- src/main/webapp/i18n/de/exam.json | 1 + src/main/webapp/i18n/en/exam.json | 1 + 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts index e9fdd36b29c6..f86b253e5ac7 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts @@ -142,10 +142,6 @@ export class ExamParticipationSummaryComponent implements OnInit { return exam?.publishResultsDate && dayjs(exam.publishResultsDate).isBefore(this.serverDateService.now()); } - getIcon(exerciseType: ExerciseType) { - return getIcon(exerciseType); - } - asProgrammingExercise(exercise: Exercise): ProgrammingExercise { return exercise as ProgrammingExercise; } @@ -248,4 +244,6 @@ export class ExamParticipationSummaryComponent implements OnInit { } return false; } + + protected readonly getIcon = getIcon; } diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html index 280b0bcb9860..43cc28a1524a 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html @@ -11,6 +11,7 @@

+ @@ -24,6 +25,7 @@

>

@@ -35,6 +37,12 @@

exercise.includedInOverallScore === IncludedInOverallScore.INCLUDED_AS_BONUS ? 0 : exercise.maxPoints }} +

+ diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index 8c11f3933ad6..e76b973e4dfc 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; import dayjs from 'dayjs/esm'; -import { Exercise, IncludedInOverallScore } from 'app/entities/exercise.model'; +import { Exercise, IncludedInOverallScore, getIcon } from 'app/entities/exercise.model'; import { ArtemisServerDateService } from 'app/shared/server-date.service'; import { ExerciseService } from 'app/exercises/shared/exercise/exercise.service'; import { GradeType } from 'app/entities/grading-scale.model'; @@ -92,6 +92,10 @@ export class ExamPointsSummaryComponent implements OnInit { return this.studentExamWithGrade?.maxPoints ?? 0; } + getAchievedPointsPercentageSum() { + return 10; + } + getAchievedPoints(exercise: Exercise): number { return this.studentExamWithGrade?.achievedPointsPerExercise?.[exercise.id!] ?? 0; } @@ -119,4 +123,6 @@ export class ExamPointsSummaryComponent implements OnInit { } return false; } + + protected readonly getIcon = getIcon; } diff --git a/src/main/webapp/i18n/de/exam.json b/src/main/webapp/i18n/de/exam.json index d4ff9892d469..3d4dc73552f2 100644 --- a/src/main/webapp/i18n/de/exam.json +++ b/src/main/webapp/i18n/de/exam.json @@ -82,6 +82,7 @@ "total": "Gesamt", "yourPoints": "Deine Punkte", "maxPoints": "Erreichbare Punkte", + "achievedPercentage": "Erreichte Punkte in %", "maxBonus": "Erreichbare Bonuspunkte", "youAchievedWithBonus": "Du hast {{achievedPoints}} Punkte von {{normalPoints}} möglichen Punkten (einschließlich Bonuspunkten) erreicht.", "youAchieved": "Du hast {{achievedPoints}} von möglichen {{normalPoints}} Punkten.", diff --git a/src/main/webapp/i18n/en/exam.json b/src/main/webapp/i18n/en/exam.json index 7e570879ad5e..90c9fe147a9e 100644 --- a/src/main/webapp/i18n/en/exam.json +++ b/src/main/webapp/i18n/en/exam.json @@ -82,6 +82,7 @@ "total": "Total", "yourPoints": "Your Points", "maxPoints": "Achievable Points", + "achievedPercentage": "Achieved Percentage", "maxBonus": "Achievable Bonus Points", "youAchievedWithBonus": "You achieved {{achievedPoints}} out of a maximum {{normalPoints}} possible points (including bonus points).", "youAchieved": "You achieved {{achievedPoints}} out of {{normalPoints}} possible points.", From 5fa93c506249b495464d78152f44ee209b1c4a63 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Mon, 18 Sep 2023 00:01:54 +0200 Subject: [PATCH 013/103] Renaming components --- .../summary/exam-participation-summary.component.html | 2 +- .../summary/points-summary/exam-points-summary.component.ts | 6 +++--- ...y.component.html => exam-result-overview.component.html} | 0 ...y.component.scss => exam-result-overview.component.scss} | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename src/main/webapp/app/exam/participate/summary/points-summary/{exam-points-summary.component.html => exam-result-overview.component.html} (100%) rename src/main/webapp/app/exam/participate/summary/points-summary/{exam-points-summary.component.scss => exam-result-overview.component.scss} (100%) diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html index 44e3ec012bf7..e22ed0f605c0 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html @@ -19,7 +19,7 @@

- +
diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index e76b973e4dfc..d293aa02caa1 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -9,9 +9,9 @@ import { StudentExamWithGradeDTO } from 'app/exam/exam-scores/exam-score-dtos.mo import { BonusStrategy } from 'app/entities/bonus.model'; @Component({ - selector: 'jhi-exam-points-summary', - styleUrls: ['./exam-points-summary.component.scss'], - templateUrl: './exam-points-summary.component.html', + selector: 'jhi-exam-result-overview', + styleUrls: ['./exam-result-overview.component.scss'], + templateUrl: './exam-result-overview.component.html', }) export class ExamPointsSummaryComponent implements OnInit { readonly IncludedInOverallScore = IncludedInOverallScore; diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html similarity index 100% rename from src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.html rename to src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.scss b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss similarity index 100% rename from src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.scss rename to src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss From 84182af0f2855f046f85f60dbc8938b35fff4000 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Mon, 18 Sep 2023 00:08:33 +0200 Subject: [PATCH 014/103] Highlight footer aswell --- .../exam-result-overview.component.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index 43cc28a1524a..e67cabf75b00 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -54,18 +54,18 @@

-
#{{ 'artemisApp.exercise.includedInOverallScore' | artemisTranslate }} {{ 'artemisApp.exam.examSummary.points.yourPoints' | artemisTranslate }} {{ 'artemisApp.exam.examSummary.points.maxPoints' | artemisTranslate }}{{ 'artemisApp.exam.examSummary.points.achievedPercentage' | artemisTranslate }} {{ 'artemisApp.exam.examSummary.points.maxBonus' | artemisTranslate }}
{{ exerciseIndex + 1 }} +    {{ exercise?.exerciseGroup?.title ?? '-' }} {{ exerciseService.isIncludedInScore(exercise) }} + + {{ + exercise.includedInOverallScore === IncludedInOverallScore.INCLUDED_AS_BONUS ? 0 : exercise.maxPoints + }} + {{ exercise.includedInOverallScore === IncludedInOverallScore.INCLUDED_AS_BONUS ? exercise.maxPoints : exercise.bonusPoints @@ -52,6 +60,9 @@

{{ getMaxNormalPointsSum() }} + {{ getAchievedPointsPercentageSum() }} + {{ getMaxBonusPointsSum() }}
{{ 'artemisApp.exam.examSummary.points.total' | artemisTranslate }} - + {{ getAchievedPointsSum() }} - - + + {{ getMaxNormalPointsSum() }} - - + + {{ getAchievedPointsPercentageSum() }} - - + + {{ getMaxBonusPointsSum() }} - +
From e10833734be639d0984f0e8d6d9f24b1ba5bf003 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Mon, 18 Sep 2023 00:08:56 +0200 Subject: [PATCH 015/103] Do not indicate table footer to be clickable --- .../summary/points-summary/exam-result-overview.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss index 022aae7167b6..b67b6340cf96 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss @@ -3,7 +3,7 @@ @import 'node_modules/bootstrap/scss/mixins'; :host { - tr:not(thead tr) { + tr:not(thead tr):not(tfoot tr) { cursor: pointer; &:hover { From 7f20287bf8ad7743228ef9438b301fc75967422e Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Mon, 18 Sep 2023 01:34:02 +0200 Subject: [PATCH 016/103] Display achieved percentage in table --- .../exam-points-summary.component.ts | 23 +++++++++++++++++-- .../exam-result-overview.component.html | 12 ++++++---- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index d293aa02caa1..1393ed36b373 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -5,7 +5,7 @@ import { ArtemisServerDateService } from 'app/shared/server-date.service'; import { ExerciseService } from 'app/exercises/shared/exercise/exercise.service'; import { GradeType } from 'app/entities/grading-scale.model'; import { faAward, faClipboard } from '@fortawesome/free-solid-svg-icons'; -import { StudentExamWithGradeDTO } from 'app/exam/exam-scores/exam-score-dtos.model'; +import { ExerciseResult, StudentExamWithGradeDTO } from 'app/exam/exam-scores/exam-score-dtos.model'; import { BonusStrategy } from 'app/entities/bonus.model'; @Component({ @@ -82,6 +82,7 @@ export class ExamPointsSummaryComponent implements OnInit { } getAchievedPointsSum() { + console.log('studentExamWithGrade', this.studentExamWithGrade); return this.studentExamWithGrade?.studentResult.overallPointsAchieved ?? 0; } @@ -92,7 +93,7 @@ export class ExamPointsSummaryComponent implements OnInit { return this.studentExamWithGrade?.maxPoints ?? 0; } - getAchievedPointsPercentageSum() { + getAchievedScoreSum() { return 10; } @@ -114,6 +115,24 @@ export class ExamPointsSummaryComponent implements OnInit { return this.getMaxNormalPointsSum() + this.getMaxBonusPointsSum(); } + getExerciseResultByExerciseId(exerciseId?: number): ExerciseResult | undefined { + if (exerciseId === undefined) { + return undefined; + } + + const exerciseGroupResultMapping = this.studentExamWithGrade?.studentResult?.exerciseGroupIdToExerciseResult; + let exerciseResult = undefined; + + for (const key in exerciseGroupResultMapping) { + if (key in exerciseGroupResultMapping && exerciseGroupResultMapping[key].exerciseId === exerciseId) { + exerciseResult = exerciseGroupResultMapping[key]; + break; + } + } + + return exerciseResult; + } + private hasAtLeastOneResult(): boolean { const exercises = this.studentExamWithGrade?.studentExam?.exercises; // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index e67cabf75b00..2ea60336ba39 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -38,10 +38,7 @@

}} - - {{ - exercise.includedInOverallScore === IncludedInOverallScore.INCLUDED_AS_BONUS ? 0 : exercise.maxPoints - }} + {{ getExerciseResultByExerciseId(exercise.id)?.achievedScore }}% {{ @@ -61,7 +58,12 @@

{{ getMaxNormalPointsSum() }} - {{ getAchievedPointsPercentageSum() }} + + {{ studentExamWithGrade.studentResult.overallScoreAchieved }}% + + + - + {{ getMaxBonusPointsSum() }} From 126b88353a7e4d61151f9bdb80f4d247b24edb55 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 15:49:07 +0200 Subject: [PATCH 017/103] Scrolling to exercise --- .../exam-participation-summary.component.html | 1 + .../exam-points-summary.component.ts | 21 ++++++++++++++++++- .../exam-result-overview.component.html | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html index e22ed0f605c0..7d5425d45d31 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html @@ -31,6 +31,7 @@

   Exercise {{ i + 1 }} + Exercise Id {{ exercise.id }}
Warning: You are viewing an illegal submission. diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index 1393ed36b373..692951e7fe88 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -82,7 +82,7 @@ export class ExamPointsSummaryComponent implements OnInit { } getAchievedPointsSum() { - console.log('studentExamWithGrade', this.studentExamWithGrade); + // console.log('studentExamWithGrade', this.studentExamWithGrade); return this.studentExamWithGrade?.studentResult.overallPointsAchieved ?? 0; } @@ -133,6 +133,25 @@ export class ExamPointsSummaryComponent implements OnInit { return exerciseResult; } + scrollToExercise(exerciseId?: number) { + if (exerciseId === undefined) { + return; + } + + const searchedId = `exercise-${exerciseId}`; + const targetElement = document.getElementById(searchedId); + + if (targetElement) { + targetElement.scrollIntoView({ + behavior: 'smooth', + block: 'start', + inline: 'nearest', + }); + } else { + console.error(`Could not find corresponding exercise with id "${searchedId}"`); + } + } + private hasAtLeastOneResult(): boolean { const exercises = this.studentExamWithGrade?.studentExam?.exercises; // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index 2ea60336ba39..747f34feb524 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -22,6 +22,7 @@

'font-italic text-danger font-weight-bold': exercise.includedInOverallScore === IncludedInOverallScore.NOT_INCLUDED, 'font-italic text-warning font-weight-bold': exercise.includedInOverallScore === IncludedInOverallScore.INCLUDED_AS_BONUS }" + (click)="scrollToExercise(exercise.id)" > {{ exerciseIndex + 1 }} From 4093251d6dad0a27465a7aaacf04464d91a96c63 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 16:03:23 +0200 Subject: [PATCH 018/103] Reducing scaling up a bit --- .../summary/points-summary/exam-result-overview.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss index b67b6340cf96..59f67d774176 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss @@ -7,7 +7,7 @@ cursor: pointer; &:hover { - transform: scale(1.012); + transform: scale(1.01); transition: transform 0.1s; } } From b5e78da70ea410facef1cbdf4be483688637c28f Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 16:04:20 +0200 Subject: [PATCH 019/103] Reducing scaling up a bit --- .../exam-result-overview.component.scss | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss index 59f67d774176..4d0b69fd48b1 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss @@ -1,15 +1,9 @@ -@import 'node_modules/bootstrap/scss/functions'; -@import 'node_modules/bootstrap/scss/variables'; -@import 'node_modules/bootstrap/scss/mixins'; +tr:not(thead tr):not(tfoot tr) { + cursor: pointer; -:host { - tr:not(thead tr):not(tfoot tr) { - cursor: pointer; - - &:hover { - transform: scale(1.01); - transition: transform 0.1s; - } + &:hover { + transform: scale(1.01); + transition: transform 0.1s; } } From 0990b58948fb4f4ccab0886cba999c10882e09b3 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 17:38:36 +0200 Subject: [PATCH 020/103] Use actual colors for achieved percentages --- .../exam-participation-cover.component.html | 2 +- .../exam-points-summary.component.ts | 15 ++++++++++++++ .../exam-result-overview.component.html | 4 +++- .../result/updating-result.component.ts | 20 +++++++++++-------- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html index 64b0f95ce0e0..3736ad2aabf5 100644 --- a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html +++ b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html @@ -27,7 +27,7 @@


- +
{{ 'artemisApp.studentExam.submissionNotInTime' | artemisTranslate }} diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index 692951e7fe88..761a5e5517a7 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -7,6 +7,8 @@ import { GradeType } from 'app/entities/grading-scale.model'; import { faAward, faClipboard } from '@fortawesome/free-solid-svg-icons'; import { ExerciseResult, StudentExamWithGradeDTO } from 'app/exam/exam-scores/exam-score-dtos.model'; import { BonusStrategy } from 'app/entities/bonus.model'; +import { evaluateTemplateStatus, getTextColorClass } from 'app/exercises/shared/result/result.utils'; +import { getLatestResultOfStudentParticipation } from 'app/exercises/shared/result/updating-result.component'; @Component({ selector: 'jhi-exam-result-overview', @@ -162,5 +164,18 @@ export class ExamPointsSummaryComponent implements OnInit { return false; } + getTextColorClassByExercise(exercise: Exercise) { + const participation = exercise.studentParticipations![0]; + const showUngradedResults = false; + const result = getLatestResultOfStudentParticipation(participation, showUngradedResults); + + const isBuilding = false; + const templateStatus = evaluateTemplateStatus(exercise, participation, result, isBuilding); + + return getTextColorClass(result, templateStatus); + } + protected readonly getIcon = getIcon; + protected readonly getTextColorClass = getTextColorClass; + protected readonly evaluateTemplateStatus = evaluateTemplateStatus; } diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index 747f34feb524..f1717a286bcd 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -39,7 +39,9 @@

}} - {{ getExerciseResultByExerciseId(exercise.id)?.achievedScore }}% + + {{ getExerciseResultByExerciseId(exercise.id)?.achievedScore }}% + {{ diff --git a/src/main/webapp/app/exercises/shared/result/updating-result.component.ts b/src/main/webapp/app/exercises/shared/result/updating-result.component.ts index effd1796252a..9e3f1207aa6d 100644 --- a/src/main/webapp/app/exercises/shared/result/updating-result.component.ts +++ b/src/main/webapp/app/exercises/shared/result/updating-result.component.ts @@ -58,14 +58,7 @@ export class UpdatingResultComponent implements OnChanges, OnDestroy { */ ngOnChanges(changes: SimpleChanges) { if (hasParticipationChanged(changes)) { - // Sort participation results by completionDate desc. - if (this.participation.results) { - this.participation.results = _orderBy(this.participation.results, 'completionDate', 'desc'); - } - // The latest result is the first rated result in the sorted array (=newest) or any result if the option is active to show ungraded results. - const latestResult = this.participation.results && this.participation.results.find(({ rated }) => this.showUngradedResults || rated === true); - // Make sure that the participation result is connected to the newest result. - this.result = latestResult ? { ...latestResult, participation: this.participation } : undefined; + this.result = getLatestResultOfStudentParticipation(this.participation, this.showUngradedResults); this.missingResultInfo = MissingResultInformation.NONE; this.subscribeForNewResults(); @@ -172,3 +165,14 @@ export class UpdatingResultComponent implements OnChanges, OnDestroy { } } } + +export function getLatestResultOfStudentParticipation(participation: StudentParticipation, showUngradedResults: boolean): Result | undefined { + // Sort participation results by completionDate desc. + if (participation.results) { + participation.results = _orderBy(participation.results, 'completionDate', 'desc'); + } + // The latest result is the first rated result in the sorted array (=newest) or any result if the option is active to show ungraded results. + const latestResult = participation.results && participation.results.find(({ rated }) => showUngradedResults || rated === true); + // Make sure that the participation result is connected to the newest result. + return latestResult ? { ...latestResult, participation: participation } : undefined; +} From a7b370d6ec4ff5bd796dcc2fec04318ff1247c5d Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 17:47:03 +0200 Subject: [PATCH 021/103] Adding color for total achieved percentage --- .../points-summary/exam-result-overview.component.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index f1717a286bcd..251ead7a4d14 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -61,7 +61,10 @@

{{ getMaxNormalPointsSum() }} - + {{ studentExamWithGrade.studentResult.overallScoreAchieved }}% From 2f70816f3ca3f4365b726d4e3703439d3f1fda8a Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 18:03:23 +0200 Subject: [PATCH 022/103] Adjusting translation --- src/main/webapp/i18n/de/exam.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/i18n/de/exam.json b/src/main/webapp/i18n/de/exam.json index 3d4dc73552f2..a2173b053db3 100644 --- a/src/main/webapp/i18n/de/exam.json +++ b/src/main/webapp/i18n/de/exam.json @@ -85,7 +85,7 @@ "achievedPercentage": "Erreichte Punkte in %", "maxBonus": "Erreichbare Bonuspunkte", "youAchievedWithBonus": "Du hast {{achievedPoints}} Punkte von {{normalPoints}} möglichen Punkten (einschließlich Bonuspunkten) erreicht.", - "youAchieved": "Du hast {{achievedPoints}} von möglichen {{normalPoints}} Punkten.", + "youAchieved": "Du hast {{achievedPoints}} von {{normalPoints}} möglichen Punkten erreicht.", "youAchievedFromBonus": { "GRADES_CONTINUOUS": "Du hast einen Notenbonus von {{achievedBonus}} aus {{bonusFromTitle}}.", "GRADES_DISCRETE": "Du hast einen Notenbonus von {{achievedBonus}} Stufe(n) gemäß der Notenskala erhalten, was {{gradePointDifference}} von {{bonusFromTitle}} entspricht.", From 20f49f4b3a00821ed7442da252e5371cd7b2ec17 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 18:14:09 +0200 Subject: [PATCH 023/103] Grading Key: make collapsable instead of linking to new page --- .../exam-participation-summary.module.ts | 2 ++ .../exam-points-summary.component.ts | 6 ++++ .../exam-result-overview.component.html | 31 +++++++++++++------ 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts index 5ee37ed7639a..15bf3a761caf 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts @@ -25,6 +25,7 @@ import { ArtemisExamSharedModule } from 'app/exam/shared/exam-shared.module'; import { ExampleSolutionComponent } from 'app/exercises/shared/example-solution/example-solution.component'; import { ArtemisProgrammingExerciseManagementModule } from 'app/exercises/programming/manage/programming-exercise-management.module'; import { ArtemisSharedComponentModule } from 'app/shared/components/shared-component.module'; +import { GradingKeyOverviewModule } from 'app/grading-system/grading-key-overview/grading-key-overview.module'; @NgModule({ imports: [ @@ -45,6 +46,7 @@ import { ArtemisSharedComponentModule } from 'app/shared/components/shared-compo SubmissionResultStatusModule, ArtemisExamSharedModule, ArtemisSharedComponentModule, + GradingKeyOverviewModule, ], declarations: [ ExamParticipationSummaryComponent, diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index 761a5e5517a7..27f4b8b2509f 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -29,6 +29,8 @@ export class ExamPointsSummaryComponent implements OnInit { faClipboard = faClipboard; faAward = faAward; + isGradingKeyCollapsed = true; + constructor( private serverDateService: ArtemisServerDateService, public exerciseService: ExerciseService, @@ -175,6 +177,10 @@ export class ExamPointsSummaryComponent implements OnInit { return getTextColorClass(result, templateStatus); } + toggleCollapseGradingKey() { + this.isGradingKeyCollapsed = !this.isGradingKeyCollapsed; + } + protected readonly getIcon = getIcon; protected readonly getTextColorClass = getTextColorClass; protected readonly evaluateTemplateStatus = evaluateTemplateStatus; diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index 251ead7a4d14..049917067278 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -138,16 +138,27 @@
- - -  {{ - isBonus ? ('artemisApp.exam.examSummary.gradeKeyButtonBonus' | artemisTranslate) : ('artemisApp.exam.examSummary.gradeKeyButton' | artemisTranslate) - }} - - + + + + + + + + + + + + + + + Date: Tue, 19 Sep 2023 20:26:10 +0200 Subject: [PATCH 024/103] Grading Key: add animation --- .../points-summary/exam-result-overview.component.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index 049917067278..2c64f0c1d2cb 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -139,15 +139,17 @@
- > + - +
+ +
+ From a039ea6dbe1eea46431de7898aab28d7babcbef4 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 20:55:16 +0200 Subject: [PATCH 025/103] Grading Key: indicate button action with chevron --- .../exam-points-summary.component.ts | 2 ++ .../exam-result-overview.component.html | 16 ++++++---------- .../exam-result-overview.component.scss | 13 +++++++++++++ 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index 27f4b8b2509f..ae0d50d408f2 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -9,6 +9,7 @@ import { ExerciseResult, StudentExamWithGradeDTO } from 'app/exam/exam-scores/ex import { BonusStrategy } from 'app/entities/bonus.model'; import { evaluateTemplateStatus, getTextColorClass } from 'app/exercises/shared/result/result.utils'; import { getLatestResultOfStudentParticipation } from 'app/exercises/shared/result/updating-result.component'; +import { faChevronRight } from '@fortawesome/free-solid-svg-icons'; @Component({ selector: 'jhi-exam-result-overview', @@ -28,6 +29,7 @@ export class ExamPointsSummaryComponent implements OnInit { // Icons faClipboard = faClipboard; faAward = faAward; + faChevronRight = faChevronRight; isGradingKeyCollapsed = true; diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index 2c64f0c1d2cb..c19793d73d3d 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -142,24 +142,20 @@
- {{ isBonus ? ('artemisApp.exam.examSummary.gradeKeyButtonBonus' | artemisTranslate) : ('artemisApp.exam.examSummary.gradeKeyButton' | artemisTranslate) }} +  {{ + isBonus ? ('artemisApp.exam.examSummary.gradeKeyButtonBonus' | artemisTranslate) : ('artemisApp.exam.examSummary.gradeKeyButton' | artemisTranslate) + }}  + + +
- - - - - - - - - Date: Tue, 19 Sep 2023 22:11:27 +0200 Subject: [PATCH 026/103] Grading Key: refactor grading key to make the table reusable --- .../exam-result-overview.component.html | 4 +- .../grading-key-helper.ts | 36 +++++ .../grading-key-overview.component.html | 43 +----- .../grading-key-overview.component.ts | 82 ++-------- .../grading-key-overview.module.ts | 5 +- .../grading-key-table.component.html | 47 ++++++ .../grading-key-table.component.ts | 144 ++++++++++++++++++ 7 files changed, 242 insertions(+), 119 deletions(-) create mode 100644 src/main/webapp/app/grading-system/grading-key-overview/grading-key-helper.ts create mode 100644 src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html create mode 100644 src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index c19793d73d3d..c96ebce05237 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -150,13 +150,13 @@
-
- +
+ {{ title }}
{{ 'artemisApp.gradingSystem.overview.info' | artemisTranslate }}
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ isBonus ? ('artemisApp.exam.examSummary.bonus' | artemisTranslate) : ('artemisApp.exam.examSummary.grade' | artemisTranslate) }}{{ 'artemisApp.exam.examSummary.interval' | artemisTranslate }}{{ 'artemisApp.exam.examSummary.intervalPoints' | artemisTranslate }}
{{ plagiarismGrade }}
{{ noParticipationGrade }}
{{ gradeStep.gradeName }} - - - -
-
-
-
{{ 'artemisApp.gradingSystem.overview.intervals.title' | artemisTranslate }}
-
    -
  • [a, b): {{ 'artemisApp.gradingSystem.overview.intervals.leftInclusiveRightExclusive' | artemisTranslate }}
  • -
  • (a, b]: {{ 'artemisApp.gradingSystem.overview.intervals.leftExclusiveRightInclusive' | artemisTranslate }}
  • -
  • [a, b]: {{ 'artemisApp.gradingSystem.overview.intervals.bothInclusive' | artemisTranslate }}
  • -
-
+

-
- {{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}: +
+ {{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}:  {{ exam.examStudentReviewStart | artemisDate }} - {{ exam.examStudentReviewEnd | artemisDate }} +
{{ 'artemisApp.exam.studentReviewEnabled' | artemisTranslate }}
+ + + + + + + + + +
{{ 'artemisApp.exam.examinedStudent' | artemisTranslate }}: {{ studentExam!.user!.name }} diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html index e22ed0f605c0..a176e0da5816 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html @@ -9,15 +9,12 @@

- - -
-
- -
-
+
diff --git a/src/main/webapp/i18n/de/exam.json b/src/main/webapp/i18n/de/exam.json index a2173b053db3..c858212bc583 100644 --- a/src/main/webapp/i18n/de/exam.json +++ b/src/main/webapp/i18n/de/exam.json @@ -123,6 +123,7 @@ "examStudentReviewTimespan": "Zeitraum der Klausureinsicht", "examStudentReviewStart": "Beginn der Klausureinsicht", "examStudentReviewEnd": "Ende der Klausureinsicht", + "studentReviewEnabled": "Klausureinsicht geöffnet", "exampleSolutionPublicationDate": "Veröffentlichungsdatum der Beispiellösung", "duration": "Dauer", "nrOfStudents": "Anzahl registrierter Studierender", From 892bc48031734c8686ee35337cc5d9b5bfa202fc Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 23:19:04 +0200 Subject: [PATCH 030/103] Result Overview: align icons and exercise names --- .../exam-result-overview.component.html | 6 +++++- .../exam-result-overview.component.scss | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index ca755d03e196..0eca58be8245 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -26,7 +26,11 @@

> {{ exerciseIndex + 1 }} -    +   +
+ +
+   {{ exercise?.exerciseGroup?.title ?? '-' }} {{ exerciseService.isIncludedInScore(exercise) }} diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss index 3ccabbc2c636..d3cd592b39e6 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss @@ -35,3 +35,17 @@ tr:not(thead tr):not(tfoot tr) { .rotate-icon.rotated { transform: rotate(90deg); } + +.icon-container { + display: inline-block; + vertical-align: middle; + horiz-align: center; +} + +.icon { + display: flex; + justify-content: center; + align-items: center; + width: 24px; + height: 24px; +} From 60cfbae44b15e677976b48d78f065bd1d4dfde2b Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 23:31:46 +0200 Subject: [PATCH 031/103] Result Overview: use colors from color scheme --- .../points-summary/exam-result-overview.component.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss index d3cd592b39e6..ea546e5a898c 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss @@ -8,14 +8,14 @@ tr:not(thead tr):not(tfoot tr) { } .passing-grade { - background-color: #28a745; - color: white; + background-color: var(--success); + color: var(--white); padding: 0.25em 0.5em; } .failing-grade { - background-color: #ca2024; - color: white; + background-color: var(--danger); + color: var(--white); padding: 0.25em 0.5em; } From 1ba32f246a070d826a16b2114c091dac24ed9c5a Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 23:42:06 +0200 Subject: [PATCH 032/103] Result Overview: simplify grade styling --- .../exam-result-overview.component.html | 2 +- .../exam-result-overview.component.scss | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index 0eca58be8245..301aa7c82fd6 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -128,7 +128,7 @@
{{ grade }} + {{ grade }} diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss index ea546e5a898c..9b0f7c3de86d 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss @@ -7,16 +7,19 @@ tr:not(thead tr):not(tfoot tr) { } } -.passing-grade { - background-color: var(--success); +.grade { color: var(--white); padding: 0.25em 0.5em; + margin-left: 0.25em; + border-radius: 0.25em; +} + +.passing-grade { + background-color: var(--success); } .failing-grade { background-color: var(--danger); - color: var(--white); - padding: 0.25em 0.5em; } .total-footer { From ca6f2b37cf4f9d9ab2748c7b1d89436a06d67508 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Tue, 19 Sep 2023 23:53:52 +0200 Subject: [PATCH 033/103] Result Overview: remove hover effect on grade --- ...results-general-information.component.html | 9 -- .../exam-result-overview.component.html | 86 ++++++++++--------- .../exam-result-overview.component.scss | 2 +- 3 files changed, 45 insertions(+), 52 deletions(-) diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html index 1432d47f39d1..589249f6b8bc 100644 --- a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html +++ b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html @@ -74,15 +74,6 @@

{{ 'artemisApp.exam.studentReviewEnabled' | artemisTranslate }}

- - - - - - - - -
{{ 'artemisApp.exam.examinedStudent' | artemisTranslate }}: {{ studentExam!.user!.name }} diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index 301aa7c82fd6..cfde0964e55e 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -3,7 +3,7 @@

{{ 'artemisApp.exam.examSummary.points.overview' | artemisTranslate }}

- +
@@ -81,46 +81,6 @@

#
-
- {{ - 'artemisApp.exam.examSummary.points.youAchievedWithBonus' - | artemisTranslate - : { - achievedPoints: getAchievedPointsSum(), - normalPoints: getMaxNormalPointsSum() - } - }} -
-
- {{ - 'artemisApp.exam.examSummary.points.youAchieved' - | artemisTranslate - : { - achievedPoints: getAchievedPointsSum(), - normalPoints: getMaxNormalPointsSum() - } - }} -
-
- {{ - 'artemisApp.exam.examSummary.points.youAchievedFromBonus.' + studentExamWithGrade.studentResult.gradeWithBonus.bonusStrategy - | artemisTranslate - : { - achievedBonus: studentExamWithGrade.studentResult.gradeWithBonus.bonusGrade, - bonusFromTitle: studentExamWithGrade.studentResult.gradeWithBonus.bonusFromTitle - } - }} -
-
- {{ - 'artemisApp.exam.examSummary.points.youAchievedPointsAfterBonus' - | artemisTranslate - : { - finalPoints: studentExamWithGrade.studentResult.gradeWithBonus?.finalPoints - } - }} -
-
@@ -138,7 +98,7 @@
{{ 'artemisApp.exam.examSummary.gradeAfterBonus' | artemisTranslate }}: - {{ studentExamWithGrade.studentResult.gradeWithBonus.finalGrade }} + {{ studentExamWithGrade.studentResult.gradeWithBonus.finalGrade }}
@@ -172,5 +132,47 @@
+ {{ + 'artemisApp.exam.examSummary.points.youAchievedWithBonus' + | artemisTranslate + : { + achievedPoints: getAchievedPointsSum(), + normalPoints: getMaxNormalPointsSum() + } + }} +
+
+ {{ + 'artemisApp.exam.examSummary.points.youAchieved' + | artemisTranslate + : { + achievedPoints: getAchievedPointsSum(), + normalPoints: getMaxNormalPointsSum() + } + }} +
+
+ {{ + 'artemisApp.exam.examSummary.points.youAchievedFromBonus.' + studentExamWithGrade.studentResult.gradeWithBonus.bonusStrategy + | artemisTranslate + : { + achievedBonus: studentExamWithGrade.studentResult.gradeWithBonus.bonusGrade, + bonusFromTitle: studentExamWithGrade.studentResult.gradeWithBonus.bonusFromTitle + } + }} +
+
+ {{ + 'artemisApp.exam.examSummary.points.youAchievedPointsAfterBonus' + | artemisTranslate + : { + finalPoints: studentExamWithGrade.studentResult.gradeWithBonus?.finalPoints + } + }} +
diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss index 9b0f7c3de86d..a3437f7d9403 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss @@ -1,4 +1,4 @@ -tr:not(thead tr):not(tfoot tr) { +#result-overview-table tr:not(thead tr):not(tfoot tr) { cursor: pointer; &:hover { From a5e49730241f2c1a32f6c4534674e52f142d7f4e Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 00:24:15 +0200 Subject: [PATCH 034/103] Result Overview: adjusting position of grade and where it uncollapses --- .../exam-result-overview.component.html | 93 ++++++++++--------- .../grading-key-table.component.html | 2 +- 2 files changed, 50 insertions(+), 45 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index cfde0964e55e..fda8f636d7a7 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -82,55 +82,60 @@

- - - - - - - - - - - - - -
- {{ 'artemisApp.exam.examSummary.' + (studentExamWithGrade.studentResult.gradeWithBonus != undefined ? 'gradeBeforeBonus' : 'grade') | artemisTranslate }}: - - {{ grade }} -
{{ 'artemisApp.exam.examSummary.bonus' | artemisTranslate }}:{{ grade }}
{{ 'artemisApp.exam.examSummary.gradeAfterBonus' | artemisTranslate }}: - {{ studentExamWithGrade.studentResult.gradeWithBonus.finalGrade }} -
+
+ + + + + + + + + + + + + +
+ {{ + 'artemisApp.exam.examSummary.' + (studentExamWithGrade.studentResult.gradeWithBonus != undefined ? 'gradeBeforeBonus' : 'grade') | artemisTranslate + }}: + + {{ grade }} +
{{ 'artemisApp.exam.examSummary.bonus' | artemisTranslate }}:{{ grade }}
{{ 'artemisApp.exam.examSummary.gradeAfterBonus' | artemisTranslate }}: + {{ studentExamWithGrade.studentResult.gradeWithBonus.finalGrade }} +
- + + + + + + + +  {{ 'artemisApp.exam.examSummary.bonusGradeKeyButton' | artemisTranslate }} + - +
+
- - - - - - - -  {{ 'artemisApp.exam.examSummary.bonusGradeKeyButton' | artemisTranslate }} - -

diff --git a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html index 4ae8dc98c14b..38bf7db10752 100644 --- a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html +++ b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html @@ -1,5 +1,5 @@
-
+
{{ 'artemisApp.gradingSystem.overview.info' | artemisTranslate }}
From fd9a6eb545c0bd2c141391f72b48566b2e795d4f Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 00:25:58 +0200 Subject: [PATCH 035/103] Result Overview: adjusting position of grade and where it uncollapses --- .../summary/points-summary/exam-result-overview.component.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html index fda8f636d7a7..e6c1fab5ac64 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html @@ -117,9 +117,6 @@

- - - Date: Wed, 20 Sep 2023 00:40:34 +0200 Subject: [PATCH 036/103] Result Overview: Make sure grading key is printed together with exercises --- .../summary/exam-participation-summary.component.html | 2 +- .../summary/exam-participation-summary.component.ts | 10 ++++++++-- .../points-summary/exam-points-summary.component.ts | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html index a176e0da5816..7c90671cb15a 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html @@ -16,7 +16,7 @@

[reviewIsOpen]="studentExam?.exam && isBeforeStudentReviewEnd() && isAfterStudentReviewStart() && !isTestRun" />
- +
diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts index f86b253e5ac7..c639a7f42045 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts @@ -58,6 +58,8 @@ export class ExamParticipationSummaryComponent implements OnInit { */ studentExamGradeInfoDTO: StudentExamWithGradeDTO; + isGradingKeyCollapsed: boolean = true; + @Input() instructorView = false; @@ -159,11 +161,15 @@ export class ExamParticipationSummaryComponent implements OnInit { * called for exportPDF Button */ printPDF() { - // expand all exercises before printing - this.collapsedExerciseIds = []; + this.expandExercisesAndGradingKeyBeforePrinting(); setTimeout(() => this.themeService.print()); } + private expandExercisesAndGradingKeyBeforePrinting() { + this.collapsedExerciseIds = []; + this.isGradingKeyCollapsed = false; + } + public generateLink(exercise: Exercise) { if (exercise?.studentParticipations?.length) { return ['/courses', this.courseId, `${exercise.type}-exercises`, exercise.id, 'participate', exercise.studentParticipations[0].id]; diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index ae0d50d408f2..7ff391bf3822 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -19,7 +19,9 @@ import { faChevronRight } from '@fortawesome/free-solid-svg-icons'; export class ExamPointsSummaryComponent implements OnInit { readonly IncludedInOverallScore = IncludedInOverallScore; readonly BonusStrategy = BonusStrategy; + @Input() studentExamWithGrade: StudentExamWithGradeDTO; + @Input() isGradingKeyCollapsed: boolean = true; gradingScaleExists = false; isBonus = false; @@ -31,8 +33,6 @@ export class ExamPointsSummaryComponent implements OnInit { faAward = faAward; faChevronRight = faChevronRight; - isGradingKeyCollapsed = true; - constructor( private serverDateService: ArtemisServerDateService, public exerciseService: ExerciseService, From 7af6083ef900bf158ee1243eb0743afb4436c136 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 01:57:12 +0200 Subject: [PATCH 037/103] General Information: using table to display general information --- .../exam-general-information.component.ts | 1 + ...results-general-information.component.html | 146 +++++++++--------- ...results-general-information.component.scss | 3 + .../exam-information.component.spec.ts | 2 +- 4 files changed, 80 insertions(+), 72 deletions(-) create mode 100644 src/main/webapp/app/exam/participate/information/exam-results-general-information.component.scss diff --git a/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts b/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts index 624252fff380..48b881968eb0 100644 --- a/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts +++ b/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts @@ -6,6 +6,7 @@ import dayjs from 'dayjs/esm'; @Component({ selector: 'jhi-exam-results-general-information', + styleUrls: ['./exam-results-general-information.component.scss'], templateUrl: './exam-results-general-information.component.html', }) export class ExamGeneralInformationComponent implements OnInit { diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html index 589249f6b8bc..4f9e1d2dc60a 100644 --- a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html +++ b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html @@ -3,80 +3,84 @@

{{ 'artemisApp.exam.examSummary.generalInformation' | artemisTranslate }}

-
- {{ 'artemisApp.examManagement.testExam.examMode' | artemisTranslate }}: -
{{ 'artemisApp.examManagement.testExam.testExam' | artemisTranslate }}
-
- -
- - {{ 'artemisApp.exam.date' | artemisTranslate }}: - {{ currentDate! | artemisDate: 'long-date' }} - - - {{ 'artemisApp.exam.workingTime' | artemisTranslate }}: - {{ exam.workingTime! | artemisDurationFromSeconds }} - - - {{ 'artemisApp.exam.overview.testExam.workingTimeCalculated' | artemisTranslate }} : - - -
+
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
- - {{ 'artemisApp.examManagement.moduleNumber' | artemisTranslate }}: - {{ exam.moduleNumber }} - -
-
- - {{ 'artemisApp.exam.course' | artemisTranslate }}: - {{ exam.courseName }} - -
-
- - {{ 'artemisApp.examManagement.examiner' | artemisTranslate }}: - {{ exam.examiner }} - -
+ + + + -
-
- - {{ 'artemisApp.exam.time' | artemisTranslate }}: - {{ exam.startDate | artemisDate: 'long-date' }} {{ exam.startDate | artemisDate: 'time' }} - - - {{ examEndDate | artemisDate: 'long-date' }} {{ examEndDate | artemisDate: 'time' }} - -
- -
- - {{ 'artemisApp.exam.date' | artemisTranslate }}: - {{ exam.startDate | artemisDate: 'long-date' }} - -
-
- - {{ 'artemisApp.exam.workingTime' | artemisTranslate }}: - {{ exam.startDate | artemisDate: 'time' }} - {{ examEndDate | artemisDate: 'time' }} - -
-
-
-
- {{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}:  - {{ exam.examStudentReviewStart | artemisDate }} - - - {{ exam.examStudentReviewEnd | artemisDate }} -
{{ 'artemisApp.exam.studentReviewEnabled' | artemisTranslate }}
-
+ + + + -
- {{ 'artemisApp.exam.examinedStudent' | artemisTranslate }}: - {{ studentExam!.user!.name }} + + +
+ + + + + + + + + + + + + + + +
{{ 'artemisApp.examManagement.testExam.examMode' | artemisTranslate }}: + {{ 'artemisApp.examManagement.testExam.testExam' | artemisTranslate }} +
{{ 'artemisApp.examManagement.moduleNumber' | artemisTranslate }}:{{ exam.moduleNumber }}
{{ 'artemisApp.exam.course' | artemisTranslate }}:{{ exam.courseName }}
{{ 'artemisApp.examManagement.examiner' | artemisTranslate }}:{{ exam.examiner }}
{{ 'artemisApp.exam.time' | artemisTranslate }}: + {{ exam.startDate | artemisDate: 'long-date' }} {{ exam.startDate | artemisDate: 'time' }} + - + {{ examEndDate | artemisDate: 'long-date' }} {{ examEndDate | artemisDate: 'time' }} +
{{ 'artemisApp.exam.date' | artemisTranslate }}:{{ exam.startDate | artemisDate: 'long-date' }}
{{ 'artemisApp.exam.workingTime' | artemisTranslate }}:{{ exam.startDate | artemisDate: 'time' }} - {{ examEndDate | artemisDate: 'time' }}
{{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}:  + {{ exam.examStudentReviewStart | artemisDate }} + - + {{ exam.examStudentReviewEnd | artemisDate }} +
{{ 'artemisApp.exam.studentReviewEnabled' | artemisTranslate }}
+
{{ 'artemisApp.exam.examinedStudent' | artemisTranslate }}:{{ studentExam!.user!.name }}
{{ 'artemisApp.exam.date' | artemisTranslate }}:{{ currentDate! | artemisDate: 'long-date' }}
{{ 'artemisApp.exam.workingTime' | artemisTranslate }}:{{ exam.workingTime! | artemisDurationFromSeconds }}
{{ 'artemisApp.exam.overview.testExam.workingTimeCalculated' | artemisTranslate }} : + +
diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.scss b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.scss new file mode 100644 index 000000000000..516d2f46aa6f --- /dev/null +++ b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.scss @@ -0,0 +1,3 @@ +.container { + //max-width: 600px; +} diff --git a/src/test/javascript/spec/component/exam/participate/information/exam-information.component.spec.ts b/src/test/javascript/spec/component/exam/participate/information/exam-information.component.spec.ts index be29ed769433..133684b6d5d6 100644 --- a/src/test/javascript/spec/component/exam/participate/information/exam-information.component.spec.ts +++ b/src/test/javascript/spec/component/exam/participate/information/exam-information.component.spec.ts @@ -29,7 +29,7 @@ let exam = { let studentExam = { id: 1, exam, user, workingTime: 60, submitted: true } as StudentExam; -describe('ExamInformationComponent', () => { +describe('ExamGeneralInformationComponent', () => { beforeEach(() => { exam = { id: 1, title: 'ExamForTesting', startDate, endDate, testExam: false } as Exam; studentExam = { id: 1, exam, user, workingTime: 60, submitted: true } as StudentExam; From d4b982dd6c7b95a8dc4bd0c8b624453cc9507bb9 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 02:19:10 +0200 Subject: [PATCH 038/103] General Information: improve styling of table --- ...results-general-information.component.html | 140 +++++++++--------- ...results-general-information.component.scss | 12 +- 2 files changed, 79 insertions(+), 73 deletions(-) diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html index 4f9e1d2dc60a..2023bb078829 100644 --- a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html +++ b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html @@ -3,84 +3,82 @@

{{ 'artemisApp.exam.examSummary.generalInformation' | artemisTranslate }}

-
- - - - +
{{ 'artemisApp.examManagement.testExam.examMode' | artemisTranslate }}:
+ + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - -
{{ 'artemisApp.examManagement.testExam.examMode' | artemisTranslate }}: + {{ 'artemisApp.examManagement.testExam.testExam' | artemisTranslate }} +
{{ 'artemisApp.examManagement.moduleNumber' | artemisTranslate }}:{{ exam.moduleNumber }}
{{ 'artemisApp.exam.course' | artemisTranslate }}:{{ exam.courseName }}
{{ 'artemisApp.examManagement.examiner' | artemisTranslate }}:{{ exam.examiner }}
{{ 'artemisApp.exam.time' | artemisTranslate }}: - {{ 'artemisApp.examManagement.testExam.testExam' | artemisTranslate }} + {{ exam.startDate | artemisDate: 'long-date' }} {{ exam.startDate | artemisDate: 'time' }} + - + {{ examEndDate | artemisDate: 'long-date' }} {{ examEndDate | artemisDate: 'time' }}
{{ 'artemisApp.examManagement.moduleNumber' | artemisTranslate }}:{{ exam.moduleNumber }}
{{ 'artemisApp.exam.course' | artemisTranslate }}:{{ exam.courseName }}
{{ 'artemisApp.examManagement.examiner' | artemisTranslate }}:{{ exam.examiner }}
{{ 'artemisApp.exam.time' | artemisTranslate }}: - {{ exam.startDate | artemisDate: 'long-date' }} {{ exam.startDate | artemisDate: 'time' }} - - - {{ examEndDate | artemisDate: 'long-date' }} {{ examEndDate | artemisDate: 'time' }} -
{{ 'artemisApp.exam.date' | artemisTranslate }}:{{ exam.startDate | artemisDate: 'long-date' }}
{{ 'artemisApp.exam.date' | artemisTranslate }}:{{ exam.startDate | artemisDate: 'long-date' }}
{{ 'artemisApp.exam.workingTime' | artemisTranslate }}:{{ exam.startDate | artemisDate: 'time' }} - {{ examEndDate | artemisDate: 'time' }}
{{ 'artemisApp.exam.workingTime' | artemisTranslate }}:{{ exam.startDate | artemisDate: 'time' }} - {{ examEndDate | artemisDate: 'time' }}
{{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}:  + {{ exam.examStudentReviewStart | artemisDate }} + - + {{ exam.examStudentReviewEnd | artemisDate }} +
{{ 'artemisApp.exam.studentReviewEnabled' | artemisTranslate }}
+
{{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}: 
{{ 'artemisApp.exam.examinedStudent' | artemisTranslate }}:{{ studentExam!.user!.name }}
{{ 'artemisApp.exam.date' | artemisTranslate }}:{{ currentDate! | artemisDate: 'long-date' }}
{{ 'artemisApp.exam.workingTime' | artemisTranslate }}:{{ exam.workingTime! | artemisDurationFromSeconds }}
{{ 'artemisApp.exam.overview.testExam.workingTimeCalculated' | artemisTranslate }} : - {{ exam.examStudentReviewStart | artemisDate }} - - - {{ exam.examStudentReviewEnd | artemisDate }} -
{{ 'artemisApp.exam.studentReviewEnabled' | artemisTranslate }}
+
{{ 'artemisApp.exam.examinedStudent' | artemisTranslate }}:{{ studentExam!.user!.name }}
{{ 'artemisApp.exam.date' | artemisTranslate }}:{{ currentDate! | artemisDate: 'long-date' }}
{{ 'artemisApp.exam.workingTime' | artemisTranslate }}:{{ exam.workingTime! | artemisDurationFromSeconds }}
{{ 'artemisApp.exam.overview.testExam.workingTimeCalculated' | artemisTranslate }} : - -
-
+ + +
diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.scss b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.scss index 516d2f46aa6f..b149301bcf0d 100644 --- a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.scss +++ b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.scss @@ -1,3 +1,11 @@ -.container { - //max-width: 600px; +table { + width: fit-content; +} + +th { + text-align: end; +} + +td { + text-align: start; } From ffa51d27e84d1a4f7bcfe6af9f04050dbc86f915 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 02:23:18 +0200 Subject: [PATCH 039/103] General Information: Removing unused log --- .../summary/points-summary/exam-points-summary.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts index 7ff391bf3822..09f32e96bb35 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts @@ -88,7 +88,6 @@ export class ExamPointsSummaryComponent implements OnInit { } getAchievedPointsSum() { - // console.log('studentExamWithGrade', this.studentExamWithGrade); return this.studentExamWithGrade?.studentResult.overallPointsAchieved ?? 0; } From 6c9860f9300692d192fd4a8d19d94b8adf8800c5 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 09:09:33 +0200 Subject: [PATCH 040/103] Fixing tests for gradingKeyTable --- ...t.spec.ts => grading-key-table.component.spec.ts} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename src/test/javascript/spec/component/grading-system/{grading-key-overview.component.spec.ts => grading-key-table.component.spec.ts} (96%) diff --git a/src/test/javascript/spec/component/grading-system/grading-key-overview.component.spec.ts b/src/test/javascript/spec/component/grading-system/grading-key-table.component.spec.ts similarity index 96% rename from src/test/javascript/spec/component/grading-system/grading-key-overview.component.spec.ts rename to src/test/javascript/spec/component/grading-system/grading-key-table.component.spec.ts index 596965d63b16..271281ddb33f 100644 --- a/src/test/javascript/spec/component/grading-system/grading-key-overview.component.spec.ts +++ b/src/test/javascript/spec/component/grading-system/grading-key-table.component.spec.ts @@ -1,5 +1,4 @@ import { GradingSystemService } from 'app/grading-system/grading-system.service'; -import { GradingKeyOverviewComponent } from 'app/grading-system/grading-key-overview/grading-key-overview.component'; import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; import { ArtemisTranslatePipe } from 'app/shared/pipes/artemis-translate.pipe'; import { MockComponent, MockDirective, MockModule, MockPipe, MockProvider } from 'ng-mocks'; @@ -23,10 +22,11 @@ import { HttpResponse } from '@angular/common/http'; import { CourseStorageService } from 'app/course/manage/course-storage.service'; import { ScoresStorageService } from 'app/course/course-scores/scores-storage.service'; import { CourseScores, StudentScores } from 'app/course/course-scores/course-scores'; +import { GradingKeyTableComponent } from 'app/grading-system/grading-key-overview/grading-key/grading-key-table.component'; -describe('GradeKeyOverviewComponent', () => { - let fixture: ComponentFixture; - let comp: GradingKeyOverviewComponent; +describe('GradingKeyTableComponent', () => { + let fixture: ComponentFixture; + let comp: GradingKeyTableComponent; let route: ActivatedRoute; let gradingSystemService: GradingSystemService; @@ -75,7 +75,7 @@ describe('GradeKeyOverviewComponent', () => { return TestBed.configureTestingModule({ imports: [MockModule(NgbModule)], declarations: [ - GradingKeyOverviewComponent, + GradingKeyTableComponent, MockComponent(FaIconComponent), MockPipe(ArtemisTranslatePipe), MockDirective(TranslateDirective), @@ -95,7 +95,7 @@ describe('GradeKeyOverviewComponent', () => { }) .compileComponents() .then(() => { - fixture = TestBed.createComponent(GradingKeyOverviewComponent); + fixture = TestBed.createComponent(GradingKeyTableComponent); comp = fixture.componentInstance; gradingSystemService = fixture.debugElement.injector.get(GradingSystemService); bonusService = fixture.debugElement.injector.get(BonusService); From f1c60e2802344a9b342b987430da01899fc2860f Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 09:14:10 +0200 Subject: [PATCH 041/103] Grading Key: adjust font sizes --- .../grading-key/grading-key-table.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html index 38bf7db10752..c377822c9693 100644 --- a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html +++ b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html @@ -1,7 +1,7 @@
{{ 'artemisApp.gradingSystem.overview.info' | artemisTranslate }}
-
+
@@ -36,7 +36,7 @@
{{ 'artemisApp.gradingSystem.overview.info' | artemisTransla
-
{{ 'artemisApp.gradingSystem.overview.intervals.title' | artemisTranslate }}
+
{{ 'artemisApp.gradingSystem.overview.intervals.title' | artemisTranslate }}
  • [a, b): {{ 'artemisApp.gradingSystem.overview.intervals.leftInclusiveRightExclusive' | artemisTranslate }}
  • (a, b]: {{ 'artemisApp.gradingSystem.overview.intervals.leftExclusiveRightInclusive' | artemisTranslate }}
  • From 14dbec73924523ad9171feaa259ca8f308ac3ef6 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 09:16:08 +0200 Subject: [PATCH 042/103] Result Overview: rename files --- .../summary/exam-participation-summary.module.ts | 4 ++-- ....component.ts => exam-result-overview.component.ts} | 2 +- .../exam-participation-summary.component.spec.ts | 4 ++-- .../exam-points-summary.component.spec.ts | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) rename src/main/webapp/app/exam/participate/summary/points-summary/{exam-points-summary.component.ts => exam-result-overview.component.ts} (99%) diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts index 15bf3a761caf..3030a0736fad 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts @@ -15,7 +15,7 @@ import { ArtemisResultModule } from 'app/exercises/shared/result/result.module'; import { ArtemisCoursesModule } from 'app/overview/courses.module'; import { ArtemisComplaintsModule } from 'app/complaints/complaints.module'; import { ExamGeneralInformationComponent } from 'app/exam/participate/information/exam-general-information.component'; -import { ExamPointsSummaryComponent } from 'app/exam/participate/summary/points-summary/exam-points-summary.component'; +import { ExamResultOverviewComponent } from 'app/exam/participate/summary/points-summary/exam-result-overview.component'; import { ArtemisProgrammingExerciseInstructionsRenderModule } from 'app/exercises/programming/shared/instructions-render/programming-exercise-instructions-render.module'; import { TestRunRibbonComponent } from 'app/exam/manage/test-runs/test-run-ribbon.component'; import { ArtemisHeaderExercisePageWithDetailsModule } from 'app/exercises/shared/exercise-headers/exercise-headers.module'; @@ -56,7 +56,7 @@ import { GradingKeyOverviewModule } from 'app/grading-system/grading-key-overvie TextExamSummaryComponent, QuizExamSummaryComponent, ExamGeneralInformationComponent, - ExamPointsSummaryComponent, + ExamResultOverviewComponent, TestRunRibbonComponent, ExampleSolutionComponent, ], diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.ts similarity index 99% rename from src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts rename to src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.ts index 09f32e96bb35..27fb25206a1d 100644 --- a/src/main/webapp/app/exam/participate/summary/points-summary/exam-points-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.ts @@ -16,7 +16,7 @@ import { faChevronRight } from '@fortawesome/free-solid-svg-icons'; styleUrls: ['./exam-result-overview.component.scss'], templateUrl: './exam-result-overview.component.html', }) -export class ExamPointsSummaryComponent implements OnInit { +export class ExamResultOverviewComponent implements OnInit { readonly IncludedInOverallScore = IncludedInOverallScore; readonly BonusStrategy = BonusStrategy; diff --git a/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts b/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts index cfebfcbabc49..d9eb475b0a56 100644 --- a/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts +++ b/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts @@ -34,7 +34,7 @@ import { ModelingExamSummaryComponent } from 'app/exam/participate/summary/exerc import { ProgrammingExamSummaryComponent } from 'app/exam/participate/summary/exercises/programming-exam-summary/programming-exam-summary.component'; import { QuizExamSummaryComponent } from 'app/exam/participate/summary/exercises/quiz-exam-summary/quiz-exam-summary.component'; import { TextExamSummaryComponent } from 'app/exam/participate/summary/exercises/text-exam-summary/text-exam-summary.component'; -import { ExamPointsSummaryComponent } from 'app/exam/participate/summary/points-summary/exam-points-summary.component'; +import { ExamResultOverviewComponent } from 'app/exam/participate/summary/points-summary/exam-result-overview.component'; import { ProgrammingExerciseInstructionComponent } from 'app/exercises/programming/shared/instructions-render/programming-exercise-instruction.component'; import { IncludedInScoreBadgeComponent } from 'app/exercises/shared/exercise-headers/included-in-score-badge.component'; import { ResultComponent } from 'app/exercises/shared/result/result.component'; @@ -138,7 +138,7 @@ function sharedSetup(url: string[]) { declarations: [ ExamParticipationSummaryComponent, MockComponent(TestRunRibbonComponent), - MockComponent(ExamPointsSummaryComponent), + MockComponent(ExamResultOverviewComponent), MockComponent(ExamGeneralInformationComponent), MockComponent(ResultComponent), MockComponent(UpdatingResultComponent), diff --git a/src/test/javascript/spec/component/exam/participate/summary/points-summary/exam-points-summary.component.spec.ts b/src/test/javascript/spec/component/exam/participate/summary/points-summary/exam-points-summary.component.spec.ts index df79e0ce3c9e..bf6adaf847f5 100644 --- a/src/test/javascript/spec/component/exam/participate/summary/points-summary/exam-points-summary.component.spec.ts +++ b/src/test/javascript/spec/component/exam/participate/summary/points-summary/exam-points-summary.component.spec.ts @@ -5,7 +5,7 @@ import { MockComponent, MockModule, MockPipe, MockProvider } from 'ng-mocks'; import { ArtemisTranslatePipe } from 'app/shared/pipes/artemis-translate.pipe'; import { User } from 'app/core/user/user.model'; import { Exam } from 'app/entities/exam.model'; -import { ExamPointsSummaryComponent } from 'app/exam/participate/summary/points-summary/exam-points-summary.component'; +import { ExamResultOverviewComponent } from 'app/exam/participate/summary/points-summary/exam-result-overview.component'; import { StudentParticipation } from 'app/entities/participation/student-participation.model'; import { ExerciseType, IncludedInOverallScore } from 'app/entities/exercise.model'; import { TextExercise } from 'app/entities/text-exercise.model'; @@ -21,8 +21,8 @@ import { Course } from 'app/entities/course.model'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { StudentExamWithGradeDTO } from 'app/exam/exam-scores/exam-score-dtos.model'; -let fixture: ComponentFixture; -let component: ExamPointsSummaryComponent; +let fixture: ComponentFixture; +let component: ExamResultOverviewComponent; let studentExamWithGrade: StudentExamWithGradeDTO; const visibleDate = dayjs().subtract(7, 'hours'); @@ -120,7 +120,7 @@ describe('ExamPointsSummaryComponent', () => { beforeEach(() => { return TestBed.configureTestingModule({ imports: [RouterTestingModule.withRoutes([]), MockModule(NgbModule), HttpClientTestingModule], - declarations: [ExamPointsSummaryComponent, MockComponent(FaIconComponent), MockPipe(ArtemisTranslatePipe)], + declarations: [ExamResultOverviewComponent, MockComponent(FaIconComponent), MockPipe(ArtemisTranslatePipe)], providers: [MockProvider(ExerciseService)], }) .compileComponents() @@ -157,7 +157,7 @@ describe('ExamPointsSummaryComponent', () => { course.id = 1; course.accuracyOfScores = 2; - fixture = TestBed.createComponent(ExamPointsSummaryComponent); + fixture = TestBed.createComponent(ExamResultOverviewComponent); component = fixture.componentInstance; exam.course = course; component.gradingScaleExists = false; From 260fadd9d137ef44e1b91229386b1edaf4e51443 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 09:17:55 +0200 Subject: [PATCH 043/103] Result Overview: rename folder --- .../participate/summary/exam-participation-summary.module.ts | 2 +- .../exam-result-overview.component.html | 0 .../exam-result-overview.component.scss | 0 .../exam-result-overview.component.ts | 0 .../summary/exam-participation-summary.component.spec.ts | 2 +- .../points-summary/exam-points-summary.component.spec.ts | 2 +- 6 files changed, 3 insertions(+), 3 deletions(-) rename src/main/webapp/app/exam/participate/summary/{points-summary => result-overview}/exam-result-overview.component.html (100%) rename src/main/webapp/app/exam/participate/summary/{points-summary => result-overview}/exam-result-overview.component.scss (100%) rename src/main/webapp/app/exam/participate/summary/{points-summary => result-overview}/exam-result-overview.component.ts (100%) diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts index 3030a0736fad..f77524eff6f1 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts +++ b/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts @@ -15,7 +15,7 @@ import { ArtemisResultModule } from 'app/exercises/shared/result/result.module'; import { ArtemisCoursesModule } from 'app/overview/courses.module'; import { ArtemisComplaintsModule } from 'app/complaints/complaints.module'; import { ExamGeneralInformationComponent } from 'app/exam/participate/information/exam-general-information.component'; -import { ExamResultOverviewComponent } from 'app/exam/participate/summary/points-summary/exam-result-overview.component'; +import { ExamResultOverviewComponent } from 'app/exam/participate/summary/result-overview/exam-result-overview.component'; import { ArtemisProgrammingExerciseInstructionsRenderModule } from 'app/exercises/programming/shared/instructions-render/programming-exercise-instructions-render.module'; import { TestRunRibbonComponent } from 'app/exam/manage/test-runs/test-run-ribbon.component'; import { ArtemisHeaderExercisePageWithDetailsModule } from 'app/exercises/shared/exercise-headers/exercise-headers.module'; diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html similarity index 100% rename from src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.html rename to src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.scss similarity index 100% rename from src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.scss rename to src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.scss diff --git a/src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.ts b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts similarity index 100% rename from src/main/webapp/app/exam/participate/summary/points-summary/exam-result-overview.component.ts rename to src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts diff --git a/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts b/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts index d9eb475b0a56..d8ae526f6b46 100644 --- a/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts +++ b/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts @@ -34,7 +34,7 @@ import { ModelingExamSummaryComponent } from 'app/exam/participate/summary/exerc import { ProgrammingExamSummaryComponent } from 'app/exam/participate/summary/exercises/programming-exam-summary/programming-exam-summary.component'; import { QuizExamSummaryComponent } from 'app/exam/participate/summary/exercises/quiz-exam-summary/quiz-exam-summary.component'; import { TextExamSummaryComponent } from 'app/exam/participate/summary/exercises/text-exam-summary/text-exam-summary.component'; -import { ExamResultOverviewComponent } from 'app/exam/participate/summary/points-summary/exam-result-overview.component'; +import { ExamResultOverviewComponent } from 'app/exam/participate/summary/result-overview/exam-result-overview.component'; import { ProgrammingExerciseInstructionComponent } from 'app/exercises/programming/shared/instructions-render/programming-exercise-instruction.component'; import { IncludedInScoreBadgeComponent } from 'app/exercises/shared/exercise-headers/included-in-score-badge.component'; import { ResultComponent } from 'app/exercises/shared/result/result.component'; diff --git a/src/test/javascript/spec/component/exam/participate/summary/points-summary/exam-points-summary.component.spec.ts b/src/test/javascript/spec/component/exam/participate/summary/points-summary/exam-points-summary.component.spec.ts index bf6adaf847f5..6fd02f89de85 100644 --- a/src/test/javascript/spec/component/exam/participate/summary/points-summary/exam-points-summary.component.spec.ts +++ b/src/test/javascript/spec/component/exam/participate/summary/points-summary/exam-points-summary.component.spec.ts @@ -5,7 +5,7 @@ import { MockComponent, MockModule, MockPipe, MockProvider } from 'ng-mocks'; import { ArtemisTranslatePipe } from 'app/shared/pipes/artemis-translate.pipe'; import { User } from 'app/core/user/user.model'; import { Exam } from 'app/entities/exam.model'; -import { ExamResultOverviewComponent } from 'app/exam/participate/summary/points-summary/exam-result-overview.component'; +import { ExamResultOverviewComponent } from 'app/exam/participate/summary/result-overview/exam-result-overview.component'; import { StudentParticipation } from 'app/entities/participation/student-participation.model'; import { ExerciseType, IncludedInOverallScore } from 'app/entities/exercise.model'; import { TextExercise } from 'app/entities/text-exercise.model'; From 0110c0430fee686828e02f56bb3d3671d8b04221 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 09:20:34 +0200 Subject: [PATCH 044/103] Result Summary: rename files --- .../webapp/app/exam/manage/exam-management.module.ts | 2 +- .../app/exam/participate/exam-participation.module.ts | 2 +- ...mponent.html => exam-result-summary.component.html} | 0 ...mponent.scss => exam-result-summary.component.scss} | 0 ...y.component.ts => exam-result-summary.component.ts} | 6 +++--- ...summary.module.ts => exam-result-summary.module.ts} | 6 +++--- .../student-exam-summary.component.spec.ts | 4 ++-- .../participate/exam-participation.component.spec.ts | 4 ++-- .../exam-participation-summary.component.spec.ts | 10 +++++----- 9 files changed, 17 insertions(+), 17 deletions(-) rename src/main/webapp/app/exam/participate/summary/{exam-participation-summary.component.html => exam-result-summary.component.html} (100%) rename src/main/webapp/app/exam/participate/summary/{exam-participation-summary.component.scss => exam-result-summary.component.scss} (100%) rename src/main/webapp/app/exam/participate/summary/{exam-participation-summary.component.ts => exam-result-summary.component.ts} (98%) rename src/main/webapp/app/exam/participate/summary/{exam-participation-summary.module.ts => exam-result-summary.module.ts} (93%) diff --git a/src/main/webapp/app/exam/manage/exam-management.module.ts b/src/main/webapp/app/exam/manage/exam-management.module.ts index 0e951ffc62d4..e99d5b0fe4a6 100644 --- a/src/main/webapp/app/exam/manage/exam-management.module.ts +++ b/src/main/webapp/app/exam/manage/exam-management.module.ts @@ -25,7 +25,7 @@ import { ArtemisMarkdownEditorModule } from 'app/shared/markdown-editor/markdown import { DurationPipe } from 'app/shared/pipes/artemis-duration.pipe'; import { StudentExamStatusComponent } from 'app/exam/manage/student-exams/student-exam-status/student-exam-status.component'; import { StudentExamSummaryComponent } from 'app/exam/manage/student-exams/student-exam-summary.component'; -import { ArtemisParticipationSummaryModule } from 'app/exam/participate/summary/exam-participation-summary.module'; +import { ArtemisParticipationSummaryModule } from 'app/exam/participate/summary/exam-result-summary.module'; import { ExamExerciseRowButtonsComponent } from 'app/exercises/shared/exam-exercise-row-buttons/exam-exercise-row-buttons.component'; import { ArtemisProgrammingExerciseStatusModule } from 'app/exercises/programming/manage/status/programming-exercise-status.module'; import { TestRunManagementComponent } from 'app/exam/manage/test-runs/test-run-management.component'; diff --git a/src/main/webapp/app/exam/participate/exam-participation.module.ts b/src/main/webapp/app/exam/participate/exam-participation.module.ts index 3ba594471fd3..e2b72942f5c7 100644 --- a/src/main/webapp/app/exam/participate/exam-participation.module.ts +++ b/src/main/webapp/app/exam/participate/exam-participation.module.ts @@ -22,7 +22,7 @@ import { ArtemisResultModule } from 'app/exercises/shared/result/result.module'; import { ArtemisProgrammingExerciseActionsModule } from 'app/exercises/programming/shared/actions/programming-exercise-actions.module'; import { ArtemisProgrammingExerciseInstructionsRenderModule } from 'app/exercises/programming/shared/instructions-render/programming-exercise-instructions-render.module'; import { ArtemisCoursesModule } from 'app/overview/courses.module'; -import { ArtemisParticipationSummaryModule } from 'app/exam/participate/summary/exam-participation-summary.module'; +import { ArtemisParticipationSummaryModule } from 'app/exam/participate/summary/exam-result-summary.module'; import { ExamTimerComponent } from './timer/exam-timer.component'; import { ArtemisExerciseButtonsModule } from 'app/overview/exercise-details/exercise-buttons.module'; import { ArtemisHeaderExercisePageWithDetailsModule } from 'app/exercises/shared/exercise-headers/exercise-headers.module'; diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.html similarity index 100% rename from src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.html rename to src/main/webapp/app/exam/participate/summary/exam-result-summary.component.html diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.scss b/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.scss similarity index 100% rename from src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.scss rename to src/main/webapp/app/exam/participate/summary/exam-result-summary.component.scss diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts b/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.ts similarity index 98% rename from src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts rename to src/main/webapp/app/exam/participate/summary/exam-result-summary.component.ts index c639a7f42045..3f8b28589d3b 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.ts @@ -18,10 +18,10 @@ import { PlagiarismVerdict } from 'app/exercises/shared/plagiarism/types/Plagiar @Component({ selector: 'jhi-exam-participation-summary', - templateUrl: './exam-participation-summary.component.html', - styleUrls: ['../../../course/manage/course-exercise-card.component.scss', '../../../exercises/quiz/shared/quiz.scss', 'exam-participation-summary.component.scss'], + templateUrl: './exam-result-summary.component.html', + styleUrls: ['../../../course/manage/course-exercise-card.component.scss', '../../../exercises/quiz/shared/quiz.scss', 'exam-result-summary.component.scss'], }) -export class ExamParticipationSummaryComponent implements OnInit { +export class ExamResultSummaryComponent implements OnInit { // make constants available to html for comparison readonly TEXT = ExerciseType.TEXT; readonly QUIZ = ExerciseType.QUIZ; diff --git a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts b/src/main/webapp/app/exam/participate/summary/exam-result-summary.module.ts similarity index 93% rename from src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts rename to src/main/webapp/app/exam/participate/summary/exam-result-summary.module.ts index f77524eff6f1..73910bd21bcf 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-participation-summary.module.ts +++ b/src/main/webapp/app/exam/participate/summary/exam-result-summary.module.ts @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { ExamParticipationSummaryComponent } from 'app/exam/participate/summary/exam-participation-summary.component'; +import { ExamResultSummaryComponent } from 'app/exam/participate/summary/exam-result-summary.component'; import { ProgrammingExamSummaryComponent } from 'app/exam/participate/summary/exercises/programming-exam-summary/programming-exam-summary.component'; import { ModelingExamSummaryComponent } from 'app/exam/participate/summary/exercises/modeling-exam-summary/modeling-exam-summary.component'; import { FileUploadExamSummaryComponent } from 'app/exam/participate/summary/exercises/file-upload-exam-summary/file-upload-exam-summary.component'; @@ -49,7 +49,7 @@ import { GradingKeyOverviewModule } from 'app/grading-system/grading-key-overvie GradingKeyOverviewModule, ], declarations: [ - ExamParticipationSummaryComponent, + ExamResultSummaryComponent, ProgrammingExamSummaryComponent, ModelingExamSummaryComponent, FileUploadExamSummaryComponent, @@ -60,6 +60,6 @@ import { GradingKeyOverviewModule } from 'app/grading-system/grading-key-overvie TestRunRibbonComponent, ExampleSolutionComponent, ], - exports: [ExamParticipationSummaryComponent, ExamGeneralInformationComponent, TestRunRibbonComponent], + exports: [ExamResultSummaryComponent, ExamGeneralInformationComponent, TestRunRibbonComponent], }) export class ArtemisParticipationSummaryModule {} diff --git a/src/test/javascript/spec/component/exam/manage/student-exams/student-exam-summary.component.spec.ts b/src/test/javascript/spec/component/exam/manage/student-exams/student-exam-summary.component.spec.ts index a863550a5f96..fe4ee6e5d5eb 100644 --- a/src/test/javascript/spec/component/exam/manage/student-exams/student-exam-summary.component.spec.ts +++ b/src/test/javascript/spec/component/exam/manage/student-exams/student-exam-summary.component.spec.ts @@ -6,7 +6,7 @@ import { of } from 'rxjs'; import { StudentExam } from 'app/entities/student-exam.model'; import { Exam } from 'app/entities/exam.model'; import { StudentExamSummaryComponent } from 'app/exam/manage/student-exams/student-exam-summary.component'; -import { ExamParticipationSummaryComponent } from 'app/exam/participate/summary/exam-participation-summary.component'; +import { ExamResultSummaryComponent } from 'app/exam/participate/summary/exam-result-summary.component'; describe('StudentExamSummaryComponent', () => { let fixture: ComponentFixture; @@ -18,7 +18,7 @@ describe('StudentExamSummaryComponent', () => { beforeEach(() => { return TestBed.configureTestingModule({ - declarations: [StudentExamSummaryComponent, MockComponent(ExamParticipationSummaryComponent)], + declarations: [StudentExamSummaryComponent, MockComponent(ExamResultSummaryComponent)], providers: [ { provide: ActivatedRoute, diff --git a/src/test/javascript/spec/component/exam/participate/exam-participation.component.spec.ts b/src/test/javascript/spec/component/exam/participate/exam-participation.component.spec.ts index 43aa840169cd..75a36617e848 100644 --- a/src/test/javascript/spec/component/exam/participate/exam-participation.component.spec.ts +++ b/src/test/javascript/spec/component/exam/participate/exam-participation.component.spec.ts @@ -24,7 +24,7 @@ import { ModelingExamSubmissionComponent } from 'app/exam/participate/exercises/ import { ProgrammingExamSubmissionComponent } from 'app/exam/participate/exercises/programming/programming-exam-submission.component'; import { QuizExamSubmissionComponent } from 'app/exam/participate/exercises/quiz/quiz-exam-submission.component'; import { TextExamSubmissionComponent } from 'app/exam/participate/exercises/text/text-exam-submission.component'; -import { ExamParticipationSummaryComponent } from 'app/exam/participate/summary/exam-participation-summary.component'; +import { ExamResultSummaryComponent } from 'app/exam/participate/summary/exam-result-summary.component'; import { FileUploadSubmissionService } from 'app/exercises/file-upload/participate/file-upload-submission.service'; import { ModelingSubmissionService } from 'app/exercises/modeling/participate/modeling-submission.service'; import { ProgrammingSubmissionService, ProgrammingSubmissionState, ProgrammingSubmissionStateObj } from 'app/exercises/programming/participate/programming-submission.service'; @@ -78,7 +78,7 @@ describe('ExamParticipationComponent', () => { MockComponent(JhiConnectionStatusComponent), MockDirective(TranslateDirective), MockComponent(TestRunRibbonComponent), - MockComponent(ExamParticipationSummaryComponent), + MockComponent(ExamResultSummaryComponent), MockPipe(ArtemisDatePipe), ], providers: [ diff --git a/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts b/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts index d8ae526f6b46..bc42d48af6e7 100644 --- a/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts +++ b/src/test/javascript/spec/component/exam/participate/summary/exam-participation-summary.component.spec.ts @@ -28,7 +28,7 @@ import { StudentExamWithGradeDTO, StudentResult } from 'app/exam/exam-scores/exa import { TestRunRibbonComponent } from 'app/exam/manage/test-runs/test-run-ribbon.component'; import { ExamParticipationService } from 'app/exam/participate/exam-participation.service'; import { ExamGeneralInformationComponent } from 'app/exam/participate/information/exam-general-information.component'; -import { ExamParticipationSummaryComponent } from 'app/exam/participate/summary/exam-participation-summary.component'; +import { ExamResultSummaryComponent } from 'app/exam/participate/summary/exam-result-summary.component'; import { FileUploadExamSummaryComponent } from 'app/exam/participate/summary/exercises/file-upload-exam-summary/file-upload-exam-summary.component'; import { ModelingExamSummaryComponent } from 'app/exam/participate/summary/exercises/modeling-exam-summary/modeling-exam-summary.component'; import { ProgrammingExamSummaryComponent } from 'app/exam/participate/summary/exercises/programming-exam-summary/programming-exam-summary.component'; @@ -52,8 +52,8 @@ import { MockExamParticipationService } from '../../../../helpers/mocks/service/ import { MockLocalStorageService } from '../../../../helpers/mocks/service/mock-local-storage.service'; import { MockArtemisServerDateService } from '../../../../helpers/mocks/service/mock-server-date.service'; -let fixture: ComponentFixture; -let component: ExamParticipationSummaryComponent; +let fixture: ComponentFixture; +let component: ExamResultSummaryComponent; let artemisServerDateService: ArtemisServerDateService; const user = { id: 1, name: 'Test User' } as User; @@ -136,7 +136,7 @@ function sharedSetup(url: string[]) { return TestBed.configureTestingModule({ imports: [RouterTestingModule.withRoutes([]), HttpClientModule, NgbCollapseMocksModule], declarations: [ - ExamParticipationSummaryComponent, + ExamResultSummaryComponent, MockComponent(TestRunRibbonComponent), MockComponent(ExamResultOverviewComponent), MockComponent(ExamGeneralInformationComponent), @@ -179,7 +179,7 @@ function sharedSetup(url: string[]) { }) .compileComponents() .then(() => { - fixture = TestBed.createComponent(ExamParticipationSummaryComponent); + fixture = TestBed.createComponent(ExamResultSummaryComponent); component = fixture.componentInstance; component.studentExam = studentExam; artemisServerDateService = TestBed.inject(ArtemisServerDateService); From 01cc201a16fea63c089ba1698ee3c67b39ebf624 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 10:00:25 +0200 Subject: [PATCH 045/103] Result Overview: adjust how included in score is displayed --- .../summary/result-overview/exam-result-overview.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts index 27fb25206a1d..bda8680a6e07 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts @@ -61,7 +61,7 @@ export class ExamResultOverviewComponent implements OnInit { */ showIncludedInScoreColumn(): boolean { for (const exercise of this.studentExamWithGrade?.studentExam?.exercises ?? []) { - if (exercise.includedInOverallScore === IncludedInOverallScore.NOT_INCLUDED) { + if (exercise.includedInOverallScore !== IncludedInOverallScore.INCLUDED_COMPLETELY) { return true; } } From 097e00939ab1c50c78cfb2620cfe06ae266a69b4 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 10:10:15 +0200 Subject: [PATCH 046/103] Result Overview: add visual indicator on not included exercises --- .../result-overview/exam-result-overview.component.html | 1 + .../result-overview/exam-result-overview.component.scss | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index e6c1fab5ac64..4989cf93a2b5 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -23,6 +23,7 @@

    'font-italic text-warning font-weight-bold': exercise.includedInOverallScore === IncludedInOverallScore.INCLUDED_AS_BONUS }" (click)="scrollToExercise(exercise.id)" + [class.not-included-in-score]="exercise.includedInOverallScore === IncludedInOverallScore.NOT_INCLUDED" > {{ exerciseIndex + 1 }} diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.scss b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.scss index a3437f7d9403..251508ae9922 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.scss +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.scss @@ -7,6 +7,10 @@ } } +.not-included-in-score { + opacity: 0.5; +} + .grade { color: var(--white); padding: 0.25em 0.5em; From 4360e3da90441d109ee8b75452bedbb3575a4a7c Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 10:29:59 +0200 Subject: [PATCH 047/103] Result Overview: incorporate written result --- .../exam-result-overview.component.html | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index 4989cf93a2b5..3625f9240a1c 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -82,8 +82,50 @@

    - -
    +
    + +
    + {{ + 'artemisApp.exam.examSummary.points.youAchievedWithBonus' + | artemisTranslate + : { + achievedPoints: getAchievedPointsSum(), + normalPoints: getMaxNormalPointsSum() + } + }} +
    +
    + {{ + 'artemisApp.exam.examSummary.points.youAchieved' + | artemisTranslate + : { + achievedPoints: getAchievedPointsSum(), + normalPoints: getMaxNormalPointsSum() + } + }} +
    +
    + {{ + 'artemisApp.exam.examSummary.points.youAchievedFromBonus.' + studentExamWithGrade.studentResult.gradeWithBonus.bonusStrategy + | artemisTranslate + : { + achievedBonus: studentExamWithGrade.studentResult.gradeWithBonus.bonusGrade, + bonusFromTitle: studentExamWithGrade.studentResult.gradeWithBonus.bonusFromTitle + } + }} +
    +
    + {{ + 'artemisApp.exam.examSummary.points.youAchievedPointsAfterBonus' + | artemisTranslate + : { + finalPoints: studentExamWithGrade.studentResult.gradeWithBonus?.finalPoints + } + }} +
    +
    + +
    -
    @@ -130,52 +172,10 @@

    + -
    - -
    - - -
    - -

    - {{ - 'artemisApp.exam.examSummary.points.youAchievedWithBonus' - | artemisTranslate - : { - achievedPoints: getAchievedPointsSum(), - normalPoints: getMaxNormalPointsSum() - } - }} -
    -
    - {{ - 'artemisApp.exam.examSummary.points.youAchieved' - | artemisTranslate - : { - achievedPoints: getAchievedPointsSum(), - normalPoints: getMaxNormalPointsSum() - } - }} -
    -
    - {{ - 'artemisApp.exam.examSummary.points.youAchievedFromBonus.' + studentExamWithGrade.studentResult.gradeWithBonus.bonusStrategy - | artemisTranslate - : { - achievedBonus: studentExamWithGrade.studentResult.gradeWithBonus.bonusGrade, - bonusFromTitle: studentExamWithGrade.studentResult.gradeWithBonus.bonusFromTitle - } - }} -
    -
    - {{ - 'artemisApp.exam.examSummary.points.youAchievedPointsAfterBonus' - | artemisTranslate - : { - finalPoints: studentExamWithGrade.studentResult.gradeWithBonus?.finalPoints - } - }} -
    +
    + +
    From d78728099c73d8f0b3cee737e516350df9f1d654 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 10:37:40 +0200 Subject: [PATCH 048/103] General Information: align review is open badge --- .../information/exam-results-general-information.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html index 2023bb078829..411f97d9a7af 100644 --- a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html +++ b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html @@ -46,7 +46,7 @@

    {{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}:  + {{ exam.examStudentReviewStart | artemisDate }} - {{ exam.examStudentReviewEnd | artemisDate }} From 54d157412e7a9b8721b89c43a2cdf193f3b55cd3 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 11:22:08 +0200 Subject: [PATCH 049/103] General Information: make bonus grading key collapsable aswell --- .../exam-result-summary.component.html | 6 ++++- .../summary/exam-result-summary.component.ts | 6 +++-- .../exam-result-overview.component.html | 26 +++++++++++-------- .../exam-result-overview.component.ts | 7 ++++- .../grading-key-table.component.ts | 4 +-- 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.html index 7c90671cb15a..5516e569659d 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.html @@ -16,7 +16,11 @@

    [reviewIsOpen]="studentExam?.exam && isBeforeStudentReviewEnd() && isAfterStudentReviewStart() && !isTestRun" />
    - +
    diff --git a/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.ts b/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.ts index 3f8b28589d3b..b8d9b2a2826c 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.ts +++ b/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.ts @@ -59,6 +59,7 @@ export class ExamResultSummaryComponent implements OnInit { studentExamGradeInfoDTO: StudentExamWithGradeDTO; isGradingKeyCollapsed: boolean = true; + isBonusGradingKeyCollapsed: boolean = true; @Input() instructorView = false; @@ -161,13 +162,14 @@ export class ExamResultSummaryComponent implements OnInit { * called for exportPDF Button */ printPDF() { - this.expandExercisesAndGradingKeyBeforePrinting(); + this.expandExercisesAndGradingKeysBeforePrinting(); setTimeout(() => this.themeService.print()); } - private expandExercisesAndGradingKeyBeforePrinting() { + private expandExercisesAndGradingKeysBeforePrinting() { this.collapsedExerciseIds = []; this.isGradingKeyCollapsed = false; + this.isBonusGradingKeyCollapsed = false; } public generateLink(exercise: Exercise) { diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index 3625f9240a1c..f06a67f95302 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -149,7 +149,7 @@
    + - - - - + +
    +
    + +
    diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts index bda8680a6e07..19cd00a08aeb 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts @@ -22,6 +22,7 @@ export class ExamResultOverviewComponent implements OnInit { @Input() studentExamWithGrade: StudentExamWithGradeDTO; @Input() isGradingKeyCollapsed: boolean = true; + @Input() isBonusGradingKeyCollapsed: boolean = true; gradingScaleExists = false; isBonus = false; @@ -178,10 +179,14 @@ export class ExamResultOverviewComponent implements OnInit { return getTextColorClass(result, templateStatus); } - toggleCollapseGradingKey() { + toggleGradingKey() { this.isGradingKeyCollapsed = !this.isGradingKeyCollapsed; } + toggleBonusGradingKey() { + this.isBonusGradingKeyCollapsed = !this.isBonusGradingKeyCollapsed; + } + protected readonly getIcon = getIcon; protected readonly getTextColorClass = getTextColorClass; protected readonly evaluateTemplateStatus = evaluateTemplateStatus; diff --git a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts index bb8a7e101d2d..91375f7b992d 100644 --- a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts +++ b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts @@ -26,6 +26,7 @@ export class GradingKeyTableComponent implements OnInit { readonly GradeEditMode = GradeEditMode; @Input() studentGrade?: string; + @Input() forBonus?: boolean; constructor( private route: ActivatedRoute, @@ -47,14 +48,13 @@ export class GradingKeyTableComponent implements OnInit { title?: string; gradeSteps: GradeStep[] = []; isBonus = false; - forBonus: boolean; ngOnInit(): void { const { courseId, examId, forBonus, isExam, studentGrade } = loadGradingKeyUrlParams(this.route); this.courseId = courseId; this.examId = examId; - this.forBonus = forBonus; + this.forBonus = this.forBonus || forBonus; this.isExam = isExam; this.studentGrade = this.studentGrade || studentGrade; From b8c0ba9554b7e3371a057f7cf26a8bd8301ed997 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 11:27:17 +0200 Subject: [PATCH 050/103] General Information: adjust styling of full sentence --- .../exam-result-overview.component.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index f06a67f95302..47e3958abaca 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -83,8 +83,8 @@

    - -
    +
    +
    {{ 'artemisApp.exam.examSummary.points.youAchievedWithBonus' | artemisTranslate @@ -94,7 +94,7 @@
    } }}
    -
    +
    {{ 'artemisApp.exam.examSummary.points.youAchieved' | artemisTranslate @@ -104,7 +104,7 @@
    } }}
    -
    +
    {{ 'artemisApp.exam.examSummary.points.youAchievedFromBonus.' + studentExamWithGrade.studentResult.gradeWithBonus.bonusStrategy | artemisTranslate @@ -114,7 +114,7 @@
    -
    +
    {{ 'artemisApp.exam.examSummary.points.youAchievedPointsAfterBonus' | artemisTranslate @@ -123,7 +123,7 @@
    From dce34b4cd2872c2ea45f1544d0960611fcb52f9a Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 11:41:59 +0200 Subject: [PATCH 051/103] General Information: removing duplicated translation --- .../exam-result-overview.component.html | 59 +++++++++---------- src/main/webapp/i18n/de/exam.json | 1 - src/main/webapp/i18n/en/exam.json | 1 - 3 files changed, 27 insertions(+), 34 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index 47e3958abaca..41b80a3129fe 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -83,7 +83,7 @@

    -
    +
    {{ 'artemisApp.exam.examSummary.points.youAchievedWithBonus' @@ -114,15 +114,6 @@
    } }}
    -
    - {{ - 'artemisApp.exam.examSummary.points.youAchievedPointsAfterBonus' - | artemisTranslate - : { - finalPoints: studentExamWithGrade.studentResult.gradeWithBonus?.finalPoints - } - }} -
    @@ -149,29 +140,33 @@
    - - -  {{ - isBonus ? ('artemisApp.exam.examSummary.gradeKeyButtonBonus' | artemisTranslate) : ('artemisApp.exam.examSummary.gradeKeyButton' | artemisTranslate) - }}  - - - - - +
    + - + +
    diff --git a/src/main/webapp/i18n/de/exam.json b/src/main/webapp/i18n/de/exam.json index c858212bc583..2dfc0ca4b479 100644 --- a/src/main/webapp/i18n/de/exam.json +++ b/src/main/webapp/i18n/de/exam.json @@ -91,7 +91,6 @@ "GRADES_DISCRETE": "Du hast einen Notenbonus von {{achievedBonus}} Stufe(n) gemäß der Notenskala erhalten, was {{gradePointDifference}} von {{bonusFromTitle}} entspricht.", "POINTS": "Du hast {{achievedBonus}} Bonuspunkte von {{bonusFromTitle}}." }, - "youAchievedPointsAfterBonus": "Deine endgültigen Punkte sind {{finalPoints}} nach dem Bonus.", "maxPointsNotSet": "Die maximale Punktzahl in der Klausur ist nicht gesetzt." }, "grade": "Note", diff --git a/src/main/webapp/i18n/en/exam.json b/src/main/webapp/i18n/en/exam.json index 90c9fe147a9e..fea8c7c8e0f9 100644 --- a/src/main/webapp/i18n/en/exam.json +++ b/src/main/webapp/i18n/en/exam.json @@ -91,7 +91,6 @@ "GRADES_DISCRETE": "You got a grade bonus of {{achievedBonus}} step(s) according to the grading scale which equals {{gradePointDiff}} from {{bonusFromTitle}}.", "POINTS": "You received {{achievedBonus}} additional bonus points from {{bonusFromTitle}}." }, - "youAchievedPointsAfterBonus": "Your final points are {{finalPoints}} after the bonus.", "maxPointsNotSet": "The maximum number of points in the exam is not set." }, "grade": "Grade", From c188c2aafd2a774b08ae28b8269a53abb5ae1dee Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 11:48:06 +0200 Subject: [PATCH 052/103] General Information: display grading keys besides each other --- .../exam-result-overview.component.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index 41b80a3129fe..ab2d9053e780 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -155,7 +155,7 @@
    -
    -
    - -
    -
    - +
    +
    + +
    +
    + +
    From 366bbf95d3209af11ef042bbe834751c46791a87 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 12:04:27 +0200 Subject: [PATCH 053/103] General Information: allow grading keys to be displayed besides each other --- .../exam-result-overview.component.html | 6 +- .../grading-key-overview.component.html | 18 ++-- .../grading-key-table.component.html | 88 +++++++++---------- 3 files changed, 54 insertions(+), 58 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index ab2d9053e780..9a2faec8bd76 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -170,11 +170,11 @@
    -
    -
    +
    +
    -
    +
    diff --git a/src/main/webapp/app/grading-system/grading-key-overview/grading-key-overview.component.html b/src/main/webapp/app/grading-system/grading-key-overview/grading-key-overview.component.html index f3e42f7ee30e..cca50757cf16 100644 --- a/src/main/webapp/app/grading-system/grading-key-overview/grading-key-overview.component.html +++ b/src/main/webapp/app/grading-system/grading-key-overview/grading-key-overview.component.html @@ -5,15 +5,13 @@

    {{ title }}

    {{ 'artemisApp.gradingSystem.overview.info' | artemisTranslate }}
    - -
    - - -
    + + +
    diff --git a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html index c377822c9693..26f05901bf06 100644 --- a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html +++ b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html @@ -1,47 +1,45 @@ -
    -
    -
    {{ 'artemisApp.gradingSystem.overview.info' | artemisTranslate }}
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {{ isBonus ? ('artemisApp.exam.examSummary.bonus' | artemisTranslate) : ('artemisApp.exam.examSummary.grade' | artemisTranslate) }}{{ 'artemisApp.exam.examSummary.interval' | artemisTranslate }}{{ 'artemisApp.exam.examSummary.intervalPoints' | artemisTranslate }}
    {{ plagiarismGrade }}
    {{ noParticipationGrade }}
    {{ gradeStep.gradeName }} - - - -
    -
    -
    -
    {{ 'artemisApp.gradingSystem.overview.intervals.title' | artemisTranslate }}
    -
      -
    • [a, b): {{ 'artemisApp.gradingSystem.overview.intervals.leftInclusiveRightExclusive' | artemisTranslate }}
    • -
    • (a, b]: {{ 'artemisApp.gradingSystem.overview.intervals.leftExclusiveRightInclusive' | artemisTranslate }}
    • -
    • [a, b]: {{ 'artemisApp.gradingSystem.overview.intervals.bothInclusive' | artemisTranslate }}
    • -
    -
    +
    +
    {{ 'artemisApp.gradingSystem.overview.info' | artemisTranslate }}
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {{ isBonus ? ('artemisApp.exam.examSummary.bonus' | artemisTranslate) : ('artemisApp.exam.examSummary.grade' | artemisTranslate) }}{{ 'artemisApp.exam.examSummary.interval' | artemisTranslate }}{{ 'artemisApp.exam.examSummary.intervalPoints' | artemisTranslate }}
    {{ plagiarismGrade }}
    {{ noParticipationGrade }}
    {{ gradeStep.gradeName }} + + + +
    +
    +
    +
    {{ 'artemisApp.gradingSystem.overview.intervals.title' | artemisTranslate }}
    +
      +
    • [a, b): {{ 'artemisApp.gradingSystem.overview.intervals.leftInclusiveRightExclusive' | artemisTranslate }}
    • +
    • (a, b]: {{ 'artemisApp.gradingSystem.overview.intervals.leftExclusiveRightInclusive' | artemisTranslate }}
    • +
    • [a, b]: {{ 'artemisApp.gradingSystem.overview.intervals.bothInclusive' | artemisTranslate }}
    • +
    From 95cccfd6b84b558297083761748098f72bbcc095 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 12:23:02 +0200 Subject: [PATCH 054/103] General Information: move grading key buttons to the bottom to make it easier understandable --- .../exam-result-overview.component.html | 56 +++++++++---------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index 9a2faec8bd76..9100de6b08bd 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -83,7 +83,7 @@

    -
    +
    {{ 'artemisApp.exam.examSummary.points.youAchievedWithBonus' @@ -139,38 +139,36 @@
    +
    +
    -
    - +
    + - -
    -
    +
    -
    +
    From 8a1049deec41c4a910f27cb01d178b108001b0f4 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 13:11:46 +0200 Subject: [PATCH 055/103] General Information: hide section title on exam cover page --- .../exam-cover/exam-participation-cover.component.html | 2 +- .../information/exam-general-information.component.ts | 1 + .../information/exam-results-general-information.component.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html index 3736ad2aabf5..17ba8ed1d57c 100644 --- a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html +++ b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html @@ -27,7 +27,7 @@


    - +
    {{ 'artemisApp.studentExam.submissionNotInTime' | artemisTranslate }} diff --git a/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts b/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts index 48b881968eb0..ca4ff37bf243 100644 --- a/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts +++ b/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts @@ -13,6 +13,7 @@ export class ExamGeneralInformationComponent implements OnInit { @Input() exam: Exam; @Input() studentExam: StudentExam; @Input() reviewIsOpen?: boolean = false; + @Input() displayTitle?: boolean = true; examEndDate?: dayjs.Dayjs; normalWorkingTime?: number; diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html index 411f97d9a7af..eac9119b1fb0 100644 --- a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html +++ b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html @@ -1,5 +1,5 @@
    -

    +

    {{ 'artemisApp.exam.examSummary.generalInformation' | artemisTranslate }}

    From 2acc61b17b3c805c86e3579c2f777167c723fbf0 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 13:33:41 +0200 Subject: [PATCH 056/103] General Information: removing unused method --- .../summary/result-overview/exam-result-overview.component.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts index 19cd00a08aeb..35e2fffed059 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts @@ -99,10 +99,6 @@ export class ExamResultOverviewComponent implements OnInit { return this.studentExamWithGrade?.maxPoints ?? 0; } - getAchievedScoreSum() { - return 10; - } - getAchievedPoints(exercise: Exercise): number { return this.studentExamWithGrade?.achievedPointsPerExercise?.[exercise.id!] ?? 0; } From 9667e53f91628f09663f170cbcb01baeed6097cb Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 13:54:40 +0200 Subject: [PATCH 057/103] General Information: make sure bonus is aligned right --- .../exam-result-overview.component.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index 9100de6b08bd..a0e0adeb1c17 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -168,11 +168,15 @@
    -
    -
    +
    +
    -
    +
    From 379b55e6619c0d9345ba76807eb901744462a7d3 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 21:11:30 +0200 Subject: [PATCH 058/103] General Information: addressing review --- .../exam-results-general-information.component.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html index eac9119b1fb0..54d8b0513402 100644 --- a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html +++ b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html @@ -27,9 +27,8 @@

    {{ 'artemisApp.exam.time' | artemisTranslate }}: - {{ exam.startDate | artemisDate: 'long-date' }} {{ exam.startDate | artemisDate: 'time' }} - - - {{ examEndDate | artemisDate: 'long-date' }} {{ examEndDate | artemisDate: 'time' }} + {{ exam.startDate | artemisDate: 'long-date' }} {{ exam.startDate | artemisDate: 'time' }}  - {{ examEndDate | artemisDate: 'long-date' }} + {{ examEndDate | artemisDate: 'time' }} @@ -48,7 +47,7 @@

    {{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}:  {{ exam.examStudentReviewStart | artemisDate }} - - +  -  {{ exam.examStudentReviewEnd | artemisDate }}
    {{ 'artemisApp.exam.studentReviewEnabled' | artemisTranslate }}
    From 3dfe2fb6dbd0c40ac06827252b16644d222c47fb Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 21:21:38 +0200 Subject: [PATCH 059/103] General Information: addressing review --- .../exam-results-general-information.component.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html index 54d8b0513402..71231f4296bd 100644 --- a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html +++ b/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html @@ -41,6 +41,11 @@

    {{ exam.startDate | artemisDate: 'time' }} - {{ examEndDate | artemisDate: 'time' }} + + + {{ 'artemisApp.exam.duration' | artemisTranslate }}: + + From fc58d5a9da06343f82775501ca58b54b8a7bcf01 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 21:24:06 +0200 Subject: [PATCH 060/103] General Information: renaming folder and ts file --- .../exam-cover/exam-participation-cover.component.html | 2 +- .../exam-general-information.component.html} | 0 .../exam-general-information.component.scss} | 0 .../exam-general-information.component.ts | 6 +++--- .../participate/summary/exam-result-summary.component.html | 2 +- .../exam/participate/summary/exam-result-summary.module.ts | 2 +- .../participate/exam-participation-cover.component.spec.ts | 2 +- .../information/exam-information.component.spec.ts | 2 +- .../summary/exam-participation-summary.component.spec.ts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) rename src/main/webapp/app/exam/participate/{information/exam-results-general-information.component.html => general-information/exam-general-information.component.html} (100%) rename src/main/webapp/app/exam/participate/{information/exam-results-general-information.component.scss => general-information/exam-general-information.component.scss} (100%) rename src/main/webapp/app/exam/participate/{information => general-information}/exam-general-information.component.ts (86%) diff --git a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html index 17ba8ed1d57c..8c9d3259b5ac 100644 --- a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html +++ b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html @@ -27,7 +27,7 @@


    - +
    {{ 'artemisApp.studentExam.submissionNotInTime' | artemisTranslate }} diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html b/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.html similarity index 100% rename from src/main/webapp/app/exam/participate/information/exam-results-general-information.component.html rename to src/main/webapp/app/exam/participate/general-information/exam-general-information.component.html diff --git a/src/main/webapp/app/exam/participate/information/exam-results-general-information.component.scss b/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.scss similarity index 100% rename from src/main/webapp/app/exam/participate/information/exam-results-general-information.component.scss rename to src/main/webapp/app/exam/participate/general-information/exam-general-information.component.scss diff --git a/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts b/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.ts similarity index 86% rename from src/main/webapp/app/exam/participate/information/exam-general-information.component.ts rename to src/main/webapp/app/exam/participate/general-information/exam-general-information.component.ts index ca4ff37bf243..144238a7e4b6 100644 --- a/src/main/webapp/app/exam/participate/information/exam-general-information.component.ts +++ b/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.ts @@ -5,9 +5,9 @@ import { endTime, getAdditionalWorkingTime, isExamOverMultipleDays, normalWorkin import dayjs from 'dayjs/esm'; @Component({ - selector: 'jhi-exam-results-general-information', - styleUrls: ['./exam-results-general-information.component.scss'], - templateUrl: './exam-results-general-information.component.html', + selector: 'jhi-exam-general-information', + styleUrls: ['./exam-general-information.component.scss'], + templateUrl: './exam-general-information.component.html', }) export class ExamGeneralInformationComponent implements OnInit { @Input() exam: Exam; diff --git a/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.html b/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.html index 5516e569659d..29e19ac2acc7 100644 --- a/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.html +++ b/src/main/webapp/app/exam/participate/summary/exam-result-summary.component.html @@ -9,7 +9,7 @@

    - Date: Wed, 20 Sep 2023 21:36:50 +0200 Subject: [PATCH 061/103] General Information: addressing review (adding duration and amount of points) --- .../exam-participation-cover.component.html | 2 +- .../exam-general-information.component.html | 13 ++++++++++++- .../exam-general-information.component.ts | 5 ++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html index 8c9d3259b5ac..c055de170150 100644 --- a/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html +++ b/src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html @@ -27,7 +27,7 @@


    - +
    {{ 'artemisApp.studentExam.submissionNotInTime' | artemisTranslate }} diff --git a/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.html b/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.html index 71231f4296bd..30224c2f6313 100644 --- a/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.html +++ b/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.html @@ -1,5 +1,5 @@
    -

    +

    {{ 'artemisApp.exam.examSummary.generalInformation' | artemisTranslate }}

    @@ -48,6 +48,17 @@

    + + + {{ 'artemisApp.exam.points' | artemisTranslate }}: + {{ exam.examMaxPoints }} + + + {{ 'artemisApp.exam.exercises' | artemisTranslate }}: + {{ exam.numberOfExercisesInExam }} + + + {{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}:  diff --git a/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.ts b/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.ts index 144238a7e4b6..60c32214d1c9 100644 --- a/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.ts +++ b/src/main/webapp/app/exam/participate/general-information/exam-general-information.component.ts @@ -13,7 +13,10 @@ export class ExamGeneralInformationComponent implements OnInit { @Input() exam: Exam; @Input() studentExam: StudentExam; @Input() reviewIsOpen?: boolean = false; - @Input() displayTitle?: boolean = true; + + /** The exam cover will contain e.g. the number of exercises which is hidden in the exam summary as + * the information is shown in the {@link ExamResultOverviewComponent} */ + @Input() displayOnExamCover?: boolean = false; examEndDate?: dayjs.Dayjs; normalWorkingTime?: number; From de5a830feb50164ff88cc176ebb9096839140ef5 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Wed, 20 Sep 2023 22:04:39 +0200 Subject: [PATCH 062/103] General Information: addressing review (rounding score by course settings and adding fallback) --- .../exam-result-overview.component.html | 8 +++++-- .../exam-result-overview.component.ts | 21 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index a0e0adeb1c17..82503fa57b05 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -44,9 +44,13 @@

    }} - - {{ getExerciseResultByExerciseId(exercise.id)?.achievedScore }}% + + {{ getAchievedPercentageByExerciseId(exercise.id) }}% + - {{ diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts index 35e2fffed059..f860daa425af 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.ts @@ -10,6 +10,7 @@ import { BonusStrategy } from 'app/entities/bonus.model'; import { evaluateTemplateStatus, getTextColorClass } from 'app/exercises/shared/result/result.utils'; import { getLatestResultOfStudentParticipation } from 'app/exercises/shared/result/updating-result.component'; import { faChevronRight } from '@fortawesome/free-solid-svg-icons'; +import { roundScorePercentSpecifiedByCourseSettings } from 'app/shared/util/utils'; @Component({ selector: 'jhi-exam-result-overview', @@ -135,6 +136,26 @@ export class ExamResultOverviewComponent implements OnInit { return exerciseResult; } + getAchievedPercentageByExerciseId(exerciseId?: number): number | undefined { + const result = this.getExerciseResultByExerciseId(exerciseId); + if (result === undefined) { + return undefined; + } + + const course = this.studentExamWithGrade.studentExam?.exam?.course; + + if (result.achievedScore !== undefined) { + return roundScorePercentSpecifiedByCourseSettings(result.achievedScore / 100, course); + } + + const canCalculatePercentage = result.maxScore && result.achievedPoints !== undefined; + if (canCalculatePercentage) { + return roundScorePercentSpecifiedByCourseSettings(result.achievedPoints! / result.maxScore, course); + } + + return undefined; + } + scrollToExercise(exerciseId?: number) { if (exerciseId === undefined) { return; From 5727245286a6cb9b2d23c9ed5f29da28a6744d60 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Thu, 21 Sep 2023 01:45:10 +0200 Subject: [PATCH 063/103] Result Overview: fix collapsing grading key animation --- .../exam-result-overview.component.html | 66 +++++++++---------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index 82503fa57b05..19fa4118823a 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -146,42 +146,40 @@

    -
    - +
    +
    +
    + - -
    +
    + +
    +
    -
    -
    - -
    -
    - +
    + +
    + +
    +
    From aa0016683b381f017daf44db00e5426a71e033bc Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Thu, 21 Sep 2023 02:16:22 +0200 Subject: [PATCH 064/103] Result Overview: fixing styling of collapsable grading keys --- .../result-overview/exam-result-overview.component.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index 19fa4118823a..d3594b4d2c12 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -148,8 +148,8 @@
    -
    -
    -
    +
    -
    +
    From c979347e5f8c0f17f95f0c6cb3fb943ef691e9f5 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Thu, 21 Sep 2023 02:37:28 +0200 Subject: [PATCH 065/103] Result Overview: hide bonus grading key if not defined --- .../result-overview/exam-result-overview.component.html | 4 ++-- .../result-overview/exam-result-overview.component.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index d3594b4d2c12..8ea25ae84936 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -148,7 +148,7 @@
    -
    +
    -
    +
    -
    +
    -
    +
    - +
    From e0536c9083c024b19dd478fb363480e5c923c96b Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Fri, 22 Sep 2023 09:41:02 +0200 Subject: [PATCH 102/103] Fixing grade steps within grading key table --- .../grading-key/grading-key-table.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts index 32f02ab61725..6b97570f9994 100644 --- a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts +++ b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts @@ -77,7 +77,7 @@ export class GradingKeyTableComponent implements OnInit { } }); - this.gradingSystemService.hasPointsSet(this.gradeSteps); + this.hasPointsSet = this.gradingSystemService.hasPointsSet(this.gradeSteps); } private findGradeSteps(courseId: number, examId?: number): Observable { From e4bf93dbed5a1d6e9ced7192ed69c8de91aeeaf9 Mon Sep 17 00:00:00 2001 From: Florian Glombik Date: Fri, 22 Sep 2023 09:51:33 +0200 Subject: [PATCH 103/103] Adjusting naming of variable --- .../result-overview/exam-result-overview.component.html | 7 +++++-- .../grading-key-overview/grading-key-helper.ts | 6 +++--- .../grading-key-overview.component.ts | 6 +++--- .../grading-key/grading-key-table.component.html | 9 ++++++--- .../grading-key/grading-key-table.component.ts | 6 +++--- .../grading-key-overview.component.spec.ts | 2 +- .../grading-system/grading-key-table.component.spec.ts | 4 ++-- 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html index 642aa0f71237..d79fca5055d6 100644 --- a/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html +++ b/src/main/webapp/app/exam/participate/summary/result-overview/exam-result-overview.component.html @@ -164,7 +164,7 @@
    - +
    @@ -177,7 +177,10 @@
    - +
    diff --git a/src/main/webapp/app/grading-system/grading-key-overview/grading-key-helper.ts b/src/main/webapp/app/grading-system/grading-key-overview/grading-key-helper.ts index 184d4ccae4a0..aadaad58112e 100644 --- a/src/main/webapp/app/grading-system/grading-key-overview/grading-key-helper.ts +++ b/src/main/webapp/app/grading-system/grading-key-overview/grading-key-helper.ts @@ -6,7 +6,7 @@ export type GradingKeyUrlParams = { examId?: number; isExam: boolean; forBonus: boolean; - studentGrade?: string; + studentGradeOrBonusPointsOrGradeBonus?: string; }; export function loadGradingKeyUrlParams(route: ActivatedRoute): GradingKeyUrlParams { @@ -24,13 +24,13 @@ export function loadGradingKeyUrlParams(route: ActivatedRoute): GradingKeyUrlPar const forBonus = !!route.snapshot.data['forBonus']; /** If needed queryParam is available, it is available on {@link GradingKeyOverviewComponent} so no need to traverse the hierarchy like params above. */ - const studentGrade = route.snapshot.queryParams['grade']; + const studentGradeOrBonusPointsOrGradeBonus = route.snapshot.queryParams['grade']; return { courseId, examId, forBonus, isExam, - studentGrade, + studentGradeOrBonusPointsOrGradeBonus: studentGradeOrBonusPointsOrGradeBonus, }; } diff --git a/src/main/webapp/app/grading-system/grading-key-overview/grading-key-overview.component.ts b/src/main/webapp/app/grading-system/grading-key-overview/grading-key-overview.component.ts index 3b7f01f8211f..37f9e5ecd13d 100644 --- a/src/main/webapp/app/grading-system/grading-key-overview/grading-key-overview.component.ts +++ b/src/main/webapp/app/grading-system/grading-key-overview/grading-key-overview.component.ts @@ -33,18 +33,18 @@ export class GradingKeyOverviewComponent implements OnInit { title?: string; gradeSteps: GradeStep[] = []; - studentGrade?: string; + studentGradeOrBonusPointsOrGradeBonus?: string; isBonus = false; forBonus: boolean; ngOnInit(): void { - const { courseId, examId, forBonus, isExam, studentGrade } = loadGradingKeyUrlParams(this.route); + const { courseId, examId, forBonus, isExam, studentGradeOrBonusPointsOrGradeBonus } = loadGradingKeyUrlParams(this.route); this.courseId = courseId; this.examId = examId; this.forBonus = forBonus; this.isExam = isExam; - this.studentGrade = studentGrade; + this.studentGradeOrBonusPointsOrGradeBonus = studentGradeOrBonusPointsOrGradeBonus; } /** diff --git a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html index 5094e77f4a22..33144ad86a60 100644 --- a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html +++ b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.html @@ -10,19 +10,22 @@
    {{ 'artemisApp.gradingSystem.overview.info' | artemisTransla - + {{ plagiarismGrade }} — — - + {{ noParticipationGrade }} — — - + {{ gradeStep.gradeName }} diff --git a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts index 6b97570f9994..fc5d5bd07882 100644 --- a/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts +++ b/src/main/webapp/app/grading-system/grading-key-overview/grading-key/grading-key-table.component.ts @@ -22,7 +22,7 @@ export class GradingKeyTableComponent implements OnInit { readonly GradeEditMode = GradeEditMode; - @Input() studentGrade?: string; + @Input() studentGradeOrBonusPointsOrGradeBonus?: string; @Input() forBonus?: boolean; constructor( @@ -47,12 +47,12 @@ export class GradingKeyTableComponent implements OnInit { hasPointsSet = false; ngOnInit(): void { - const { courseId, examId, forBonus, isExam, studentGrade } = loadGradingKeyUrlParams(this.route); + const { courseId, examId, forBonus, isExam, studentGradeOrBonusPointsOrGradeBonus } = loadGradingKeyUrlParams(this.route); this.courseId = courseId; this.examId = examId; this.forBonus = this.forBonus || forBonus; this.isExam = isExam; - this.studentGrade = this.studentGrade || studentGrade; + this.studentGradeOrBonusPointsOrGradeBonus = this.studentGradeOrBonusPointsOrGradeBonus || studentGradeOrBonusPointsOrGradeBonus; this.findGradeSteps(this.courseId, this.examId).subscribe((gradeSteps) => { if (gradeSteps) { diff --git a/src/test/javascript/spec/component/grading-system/grading-key-overview.component.spec.ts b/src/test/javascript/spec/component/grading-system/grading-key-overview.component.spec.ts index 6960c3a31d86..f1e4c6e0739b 100644 --- a/src/test/javascript/spec/component/grading-system/grading-key-overview.component.spec.ts +++ b/src/test/javascript/spec/component/grading-system/grading-key-overview.component.spec.ts @@ -74,7 +74,7 @@ describe('GradingKeyOverviewComponent', () => { expect(component).toBeTruthy(); expect(component.examId).toBe(123); expect(component.courseId).toBe(345); - expect(component.studentGrade).toBe(studentGrade); + expect(component.studentGradeOrBonusPointsOrGradeBonus).toBe(studentGrade); }); it('should print PDF', fakeAsync(() => { diff --git a/src/test/javascript/spec/component/grading-system/grading-key-table.component.spec.ts b/src/test/javascript/spec/component/grading-system/grading-key-table.component.spec.ts index bd32b989cc55..6110d07dde4f 100644 --- a/src/test/javascript/spec/component/grading-system/grading-key-table.component.spec.ts +++ b/src/test/javascript/spec/component/grading-system/grading-key-table.component.spec.ts @@ -114,7 +114,7 @@ describe('GradingKeyTableComponent', () => { expect(comp).toBeTruthy(); expect(comp.examId).toBe(123); expect(comp.courseId).toBe(345); - expect(comp.studentGrade).toBe(grade); + expect(comp.studentGradeOrBonusPointsOrGradeBonus).toBe(grade); expect(comp.title).toBe('Title'); expect(comp.isBonus).toBeTrue(); expect(comp.isExam).toBeTrue(); @@ -192,7 +192,7 @@ describe('GradingKeyTableComponent', () => { expect(comp).toBeTruthy(); expect(comp.examId).toBeUndefined(); expect(comp.courseId).toBe(courseId); - expect(comp.studentGrade).toBe(studentGrade); + expect(comp.studentGradeOrBonusPointsOrGradeBonus).toBe(studentGrade); expect(comp.title).toBe('Title'); expect(comp.isBonus).toBeTrue(); expect(comp.isExam).toBeFalse();