Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-boehm committed Oct 18, 2023
1 parent 2e61296 commit 850835f
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/config/liquibase/master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
<include file="classpath:config/liquibase/changelog/20230922222222_changelog.xml" relativeToChangelogFile="false"/>
<include file="classpath:config/liquibase/changelog/20230920133000_changelog.xml" relativeToChangelogFile="false"/>
<include file="classpath:config/liquibase/changelog/20230927125606_changelog.xml" relativeToChangelogFile="false"/>
<include file="classpath:config/liquibase/changelog/20231016123944_changelog.xml" relativeToChangelogFile="false"/>
<include file="classpath:config/liquibase/changelog/20230524102945_changelog.xml" relativeToChangelogFile="false"/>
<include file="classpath:config/liquibase/changelog/20231016123944_changelog.xml" relativeToChangelogFile="false"/>
<!-- NOTE: please use the format "YYYYMMDDhhmmss_changelog.xml", i.e. year month day hour minutes seconds and not something else! -->
<!-- we should also stay in a chronological order! -->
<!-- you can use the command 'date '+%Y%m%d%H%M%S'' to get the current date and time in the correct format -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class ExamNavigationBarComponent implements OnInit {
@Output() onPageChanged = new EventEmitter<{ overViewChange: boolean; exercise?: Exercise; forceSave: boolean }>();
@Output() examAboutToEnd = new EventEmitter<void>();
@Output() onExamHandInEarly = new EventEmitter<void>();

@Output() onAbandon = new EventEmitter<void>();

static itemsVisiblePerSideDefault = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { ExamExerciseUpdateHighlighterModule } from 'app/exam/participate/exerci
import { ExamLiveEventsButtonComponent } from 'app/exam/participate/events/exam-live-events-button.component';
import { ExamLiveEventsOverlayComponent } from 'app/exam/participate/events/exam-live-events-overlay.component';
import { ArtemisExamSharedModule } from 'app/exam/shared/exam-shared.module';
import { ExamTerminationConfirmationComponent } from './exam-termination/exam-termination-confirmation/exam-termination-confirmation.component';
import { ExamTerminationConfirmationComponent } from 'app/exam/participate/exam-termination-confirmation/exam-termination-confirmation.component';

const ENTITY_STATES = [...examParticipationState];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,8 @@ export class ExamParticipationService {
ExamParticipationService.breakCircularDependency(studentExamCopy);

return this.httpClient.post<void>(url, studentExamCopy).pipe(
catchError((error: HttpErrorResponse) => {
if (error.status === 403 && error.headers.get('x-null-error') === 'error.submissionNotInTime') {
return throwError(() => new Error('artemisApp.studentExam.submissionNotInTime'));
} else if (error.status === 409 && error.headers.get('x-null-error') === 'error.alreadySubmitted') {
return throwError(() => new Error('artemisApp.studentExam.alreadySubmitted'));
} else {
return throwError(() => new Error('artemisApp.studentExam.handInFailed'));
}
catchError(() => {
return throwError(() => new Error('artemisApp.studentExam.abandonFailed'));
}),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
@Component({
selector: 'jhi-exam-termination-confirmation',
templateUrl: './exam-termination-confirmation.component.html',
styleUrls: ['./exam-termination-confirmation.component.scss'],
})
export class ExamTerminationConfirmationComponent implements OnChanges {
@Input() exam: Exam;
Expand Down
Empty file.
6 changes: 4 additions & 2 deletions src/main/webapp/i18n/de/exam.json
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,8 @@
"studentExam": {
"alreadySubmitted": "Du hast bereits abgegeben.",
"submissionNotInTime": "Du hast die Klausur nicht rechtzeitig abgegeben. Sie wird nicht bewertet!",
"handInFailed": "Die Abgabe der Klausur ist fehlgeschlagen. Bitte versuche es erneut!"
"handInFailed": "Die Abgabe der Klausur ist fehlgeschlagen. Bitte versuche es erneut!",
"abandonFailed": "Der Abbruch der Klausur ist fehlgeschlagen. Bitte versuche es erneut!"
},
"examStatus": {
"columnTitle": "Klausurstatus",
Expand Down Expand Up @@ -789,7 +790,8 @@
"numberOfStudents": "Anzahl der Studierenden",
"startedExams": "Begonnene Testklausuren",
"submittedExams": "Abgegebene Testklausuren",
"conductionSuspended": "Studierende können keine Testklausuren starten!"
"conductionSuspended": "Studierende können keine Testklausuren starten!",
"abandonedExams": "Abgebrochene Testklausuren"
}
},
"correction": {
Expand Down
6 changes: 4 additions & 2 deletions src/main/webapp/i18n/en/exam.json
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,8 @@
"studentExam": {
"alreadySubmitted": "You have already submitted.",
"submissionNotInTime": "You have not submitted your exam on time. It will not be graded!",
"handInFailed": "Submission of your exam failed. Please try again!"
"handInFailed": "Submission of your exam failed. Please try again!",
"abandonFailed": "Abandon failed. Please try again!"
},
"examStatus": {
"columnTitle": "Exam status",
Expand Down Expand Up @@ -790,7 +791,8 @@
"numberOfStudents": "Number of students",
"startedExams": "Started Test Exams",
"submittedExams": "Submitted Test Exams",
"conductionSuspended": "Students cannot start a Test Exam!"
"conductionSuspended": "Students cannot start a Test Exam!",
"abandonedExams": "Abandoned Test Exams"
}
},
"correction": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
import { ExamTerminationConfirmationComponent } from 'app/exam/participate/exam-termination/exam-termination-confirmation/exam-termination-confirmation.component';
import { ExamTerminationConfirmationComponent } from 'app/exam/participate/exam-termination-confirmation/exam-termination-confirmation.component';
import { AccountService } from 'app/core/auth/account.service';
import { MockAccountService } from '../../../helpers/mocks/service/mock-account.service';
import { ArtemisTranslatePipe } from 'app/shared/pipes/artemis-translate.pipe';
Expand Down

0 comments on commit 850835f

Please sign in to comment.