Skip to content

Commit 607e8f7

Browse files
authored
Exam mode: Remove exercise title from solution containers (#9442)
1 parent 93dae1b commit 607e8f7

File tree

7 files changed

+9
-10
lines changed

7 files changed

+9
-10
lines changed

src/main/webapp/app/exam/participate/exercises/file-upload/file-upload-exam-submission.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h3 class="text-align-left fw-normal">
1515
<hr />
1616
<jhi-resizeable-container [examTimeline]="examTimeline">
1717
<!--region Left Panel-->
18-
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : (exercise?.exerciseGroup?.title ?? '-') }}</span>
18+
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : ('artemisApp.exam.yourSolution' | artemisTranslate) }}</span>
1919
<div left-body class="px-2 pb-2 w-100">
2020
<div class="row">
2121
@if (isActive && !result && exercise && studentSubmission && !readonly) {

src/main/webapp/app/exam/participate/exercises/modeling/modeling-exam-submission.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h3 class="text-align-left fw-normal">
1616

1717
<jhi-resizeable-container class="col-12" [examTimeline]="examTimeline">
1818
<!--region Left Panel-->
19-
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : (exercise?.exerciseGroup?.title ?? '-') }}</span>
19+
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : ('artemisApp.exam.yourSolution' | artemisTranslate) }}</span>
2020
<div left-body class="submission-container d-flex flex-column ps-2 mt-3 w-100">
2121
<jhi-fullscreen>
2222
<div class="row flex-grow-1">

src/main/webapp/app/exam/participate/exercises/text/text-exam-submission.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h3 class="text-align-left fw-normal">
1616
<!--resizable container-->
1717
<jhi-resizeable-container class="col-12" [examTimeline]="examTimeline">
1818
<!--region Left Panel-->
19-
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : (exercise?.exerciseGroup?.title ?? '-') }}</span>
19+
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : ('artemisApp.exam.yourSolution' | artemisTranslate) }}</span>
2020
<div left-body class="text-editor-grid mt-4 ps-2 pb-2 w-100">
2121
<div class="grid-area-main">
2222
<div>

src/main/webapp/i18n/de/exam.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
"falseName": "Der angegebene Name ist nicht korrekt. Bitte versuche es erneut!",
151151
"notSet": "Nicht gesetzt",
152152
"startExamToolTip": "Button wird 5 Minuten vor der Klausur aktiviert.",
153+
"yourSolution": "Deine Lösung",
153154
"cleanup": {
154155
"title": "Aufräumen",
155156
"question": "Möchtest du die Prüfung <strong>{{title}}</strong> wirklich bereinigen? Dadurch werden alle Studierenden-Repositories in der Prüfung gelöscht. Diese Aktion kann <strong class='text-danger'>NICHT</strong> rückgängig gemacht werden!"

src/main/webapp/i18n/en/exam.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
"falseName": "Entered name is incorrect. Please try again!",
151151
"notSet": "Not set",
152152
"startExamToolTip": "Button will be activated 5 minutes before the exam start.",
153+
"yourSolution": "Your Solution",
153154
"cleanup": {
154155
"title": "Cleanup",
155156
"question": "Are you sure you want to clean up the exam <strong>{{ title }}</strong>? This will delete all student programming exercise repositories in the exam. This action can <strong class='text-danger'>NOT</strong> be undone!"

src/test/javascript/spec/component/exam/participate/exercises/file-upload-exam-submission.component.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,9 @@ describe('FileUploadExamSubmissionComponent', () => {
7777
expect(FileUploadExamSubmissionComponent).not.toBeNull();
7878
});
7979

80-
it('should show exercise group title', () => {
81-
comp.exercise.exerciseGroup = { title: 'Test Group' } as ExerciseGroup;
80+
it('should show static text in header', () => {
8281
fixture.detectChanges();
83-
const el = fixture.debugElement.query((de) => de.nativeElement.textContent === comp.exercise.exerciseGroup?.title);
82+
const el = fixture.debugElement.query((de) => de.nativeElement.textContent === 'artemisApp.exam.yourSolution');
8483
expect(el).not.toBeNull();
8584
});
8685

src/test/javascript/spec/component/exam/participate/exercises/modeling-exam-submission.component.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { ArtemisTestModule } from '../../../../test.module';
1616
import { IncludedInScoreBadgeComponent } from 'app/exercises/shared/exercise-headers/included-in-score-badge.component';
1717
import { ExamExerciseUpdateHighlighterComponent } from 'app/exam/participate/exercises/exam-exercise-update-highlighter/exam-exercise-update-highlighter.component';
1818
import { NgbTooltipMocksModule } from '../../../../helpers/mocks/directive/ngbTooltipMocks.module';
19-
import { ExerciseGroup } from 'app/entities/exercise-group.model';
2019
import { SubmissionVersion } from 'app/entities/submission-version.model';
2120

2221
describe('ModelingExamSubmissionComponent', () => {
@@ -69,10 +68,9 @@ describe('ModelingExamSubmissionComponent', () => {
6968
expect(ModelingExamSubmissionComponent).not.toBeNull();
7069
});
7170

72-
it('should show exercise group title', () => {
73-
comp.exercise.exerciseGroup = { title: 'Test Group' } as ExerciseGroup;
71+
it('should show static text in header', () => {
7472
fixture.detectChanges();
75-
const el = fixture.debugElement.query((de) => de.nativeElement.textContent === comp.exercise.exerciseGroup?.title);
73+
const el = fixture.debugElement.query((de) => de.nativeElement.textContent === 'artemisApp.exam.yourSolution');
7674
expect(el).not.toBeNull();
7775
});
7876

0 commit comments

Comments
 (0)