Skip to content

Commit

Permalink
Exam mode: Remove exercise title from solution containers (#9442)
Browse files Browse the repository at this point in the history
  • Loading branch information
edkaya authored Oct 11, 2024
1 parent 93dae1b commit 607e8f7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h3 class="text-align-left fw-normal">
<hr />
<jhi-resizeable-container [examTimeline]="examTimeline">
<!--region Left Panel-->
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : (exercise?.exerciseGroup?.title ?? '-') }}</span>
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : ('artemisApp.exam.yourSolution' | artemisTranslate) }}</span>
<div left-body class="px-2 pb-2 w-100">
<div class="row">
@if (isActive && !result && exercise && studentSubmission && !readonly) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h3 class="text-align-left fw-normal">

<jhi-resizeable-container class="col-12" [examTimeline]="examTimeline">
<!--region Left Panel-->
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : (exercise?.exerciseGroup?.title ?? '-') }}</span>
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : ('artemisApp.exam.yourSolution' | artemisTranslate) }}</span>
<div left-body class="submission-container d-flex flex-column ps-2 mt-3 w-100">
<jhi-fullscreen>
<div class="row flex-grow-1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h3 class="text-align-left fw-normal">
<!--resizable container-->
<jhi-resizeable-container class="col-12" [examTimeline]="examTimeline">
<!--region Left Panel-->
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : (exercise?.exerciseGroup?.title ?? '-') }}</span>
<span class="exercise-title" left-header>{{ examTimeline ? exercise.title : ('artemisApp.exam.yourSolution' | artemisTranslate) }}</span>
<div left-body class="text-editor-grid mt-4 ps-2 pb-2 w-100">
<div class="grid-area-main">
<div>
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/i18n/de/exam.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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!"
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/i18n/en/exam.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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();
});

Expand Down

0 comments on commit 607e8f7

Please sign in to comment.