From 182626b0df72c858a2c12d16a948a42f483133b4 Mon Sep 17 00:00:00 2001 From: EgeDoguKaya Date: Tue, 8 Oct 2024 20:52:46 +0200 Subject: [PATCH 1/2] Change box header title --- .../file-upload/file-upload-exam-submission.component.html | 2 +- .../exercises/modeling/modeling-exam-submission.component.html | 2 +- .../exercises/text/text-exam-submission.component.html | 2 +- src/main/webapp/i18n/de/exam.json | 1 + src/main/webapp/i18n/en/exam.json | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/app/exam/participate/exercises/file-upload/file-upload-exam-submission.component.html b/src/main/webapp/app/exam/participate/exercises/file-upload/file-upload-exam-submission.component.html index be5dce5a54a3..be860bc79852 100644 --- a/src/main/webapp/app/exam/participate/exercises/file-upload/file-upload-exam-submission.component.html +++ b/src/main/webapp/app/exam/participate/exercises/file-upload/file-upload-exam-submission.component.html @@ -15,7 +15,7 @@


- {{ examTimeline ? exercise.title : (exercise?.exerciseGroup?.title ?? '-') }} + {{ examTimeline ? exercise.title : ('artemisApp.exam.yourSolution' | artemisTranslate) }}
@if (isActive && !result && exercise && studentSubmission && !readonly) { diff --git a/src/main/webapp/app/exam/participate/exercises/modeling/modeling-exam-submission.component.html b/src/main/webapp/app/exam/participate/exercises/modeling/modeling-exam-submission.component.html index 273a1acbb8e5..aa3306277c53 100644 --- a/src/main/webapp/app/exam/participate/exercises/modeling/modeling-exam-submission.component.html +++ b/src/main/webapp/app/exam/participate/exercises/modeling/modeling-exam-submission.component.html @@ -16,7 +16,7 @@

- {{ examTimeline ? exercise.title : (exercise?.exerciseGroup?.title ?? '-') }} + {{ examTimeline ? exercise.title : ('artemisApp.exam.yourSolution' | artemisTranslate) }}
diff --git a/src/main/webapp/app/exam/participate/exercises/text/text-exam-submission.component.html b/src/main/webapp/app/exam/participate/exercises/text/text-exam-submission.component.html index 653d0f6b0ad5..cc0a6fba438f 100644 --- a/src/main/webapp/app/exam/participate/exercises/text/text-exam-submission.component.html +++ b/src/main/webapp/app/exam/participate/exercises/text/text-exam-submission.component.html @@ -16,7 +16,7 @@

- {{ examTimeline ? exercise.title : (exercise?.exerciseGroup?.title ?? '-') }} + {{ examTimeline ? exercise.title : ('artemisApp.exam.yourSolution' | artemisTranslate) }}
diff --git a/src/main/webapp/i18n/de/exam.json b/src/main/webapp/i18n/de/exam.json index a528405b3451..ff6b4685e0f5 100644 --- a/src/main/webapp/i18n/de/exam.json +++ b/src/main/webapp/i18n/de/exam.json @@ -150,6 +150,7 @@ "falseName": "Der angegebene Name ist nicht korrekt. Bitte versuche es erneut!", "notSet": "Nicht gesetzt", "startExamToolTip": "Button wird 5 Minuten vor der Klausur aktiviert.", + "yourSolution": "Deine Lösung", "cleanup": { "title": "Aufräumen", "question": "Möchtest du die Prüfung {{title}} wirklich bereinigen? Dadurch werden alle Studierenden-Repositories in der Prüfung gelöscht. Diese Aktion kann NICHT rückgängig gemacht werden!" diff --git a/src/main/webapp/i18n/en/exam.json b/src/main/webapp/i18n/en/exam.json index 4ed4737897a0..713a9a92fd1a 100644 --- a/src/main/webapp/i18n/en/exam.json +++ b/src/main/webapp/i18n/en/exam.json @@ -150,6 +150,7 @@ "falseName": "Entered name is incorrect. Please try again!", "notSet": "Not set", "startExamToolTip": "Button will be activated 5 minutes before the exam start.", + "yourSolution": "Your Solution", "cleanup": { "title": "Cleanup", "question": "Are you sure you want to clean up the exam {{ title }}? This will delete all student programming exercise repositories in the exam. This action can NOT be undone!" From 7ee076eea8894fc09a812ba30034a035f154101e Mon Sep 17 00:00:00 2001 From: EgeDoguKaya Date: Tue, 8 Oct 2024 23:23:40 +0200 Subject: [PATCH 2/2] adapt client tests --- .../exercises/file-upload-exam-submission.component.spec.ts | 5 ++--- .../exercises/modeling-exam-submission.component.spec.ts | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/test/javascript/spec/component/exam/participate/exercises/file-upload-exam-submission.component.spec.ts b/src/test/javascript/spec/component/exam/participate/exercises/file-upload-exam-submission.component.spec.ts index 83319f461faf..9c10ec5ca996 100644 --- a/src/test/javascript/spec/component/exam/participate/exercises/file-upload-exam-submission.component.spec.ts +++ b/src/test/javascript/spec/component/exam/participate/exercises/file-upload-exam-submission.component.spec.ts @@ -77,10 +77,9 @@ describe('FileUploadExamSubmissionComponent', () => { expect(FileUploadExamSubmissionComponent).not.toBeNull(); }); - it('should show exercise group title', () => { - comp.exercise.exerciseGroup = { title: 'Test Group' } as ExerciseGroup; + it('should show static text in header', () => { fixture.detectChanges(); - const el = fixture.debugElement.query((de) => de.nativeElement.textContent === comp.exercise.exerciseGroup?.title); + const el = fixture.debugElement.query((de) => de.nativeElement.textContent === 'artemisApp.exam.yourSolution'); expect(el).not.toBeNull(); }); diff --git a/src/test/javascript/spec/component/exam/participate/exercises/modeling-exam-submission.component.spec.ts b/src/test/javascript/spec/component/exam/participate/exercises/modeling-exam-submission.component.spec.ts index 1277bc869032..60731362866e 100644 --- a/src/test/javascript/spec/component/exam/participate/exercises/modeling-exam-submission.component.spec.ts +++ b/src/test/javascript/spec/component/exam/participate/exercises/modeling-exam-submission.component.spec.ts @@ -16,7 +16,6 @@ import { ArtemisTestModule } from '../../../../test.module'; import { IncludedInScoreBadgeComponent } from 'app/exercises/shared/exercise-headers/included-in-score-badge.component'; import { ExamExerciseUpdateHighlighterComponent } from 'app/exam/participate/exercises/exam-exercise-update-highlighter/exam-exercise-update-highlighter.component'; import { NgbTooltipMocksModule } from '../../../../helpers/mocks/directive/ngbTooltipMocks.module'; -import { ExerciseGroup } from 'app/entities/exercise-group.model'; import { SubmissionVersion } from 'app/entities/submission-version.model'; describe('ModelingExamSubmissionComponent', () => { @@ -69,10 +68,9 @@ describe('ModelingExamSubmissionComponent', () => { expect(ModelingExamSubmissionComponent).not.toBeNull(); }); - it('should show exercise group title', () => { - comp.exercise.exerciseGroup = { title: 'Test Group' } as ExerciseGroup; + it('should show static text in header', () => { fixture.detectChanges(); - const el = fixture.debugElement.query((de) => de.nativeElement.textContent === comp.exercise.exerciseGroup?.title); + const el = fixture.debugElement.query((de) => de.nativeElement.textContent === 'artemisApp.exam.yourSolution'); expect(el).not.toBeNull(); });