Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exam mode: Remove exercise title from solution containers #9442

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
edkaya marked this conversation as resolved.
Show resolved Hide resolved
<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",
edkaya marked this conversation as resolved.
Show resolved Hide resolved
"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();
edkaya marked this conversation as resolved.
Show resolved Hide resolved
});

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();
});
edkaya marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
Loading