Skip to content

Commit

Permalink
Add conditional tooltip for edit button in exam exercise row
Browse files Browse the repository at this point in the history
  • Loading branch information
laxerhd committed Nov 30, 2024
1 parent 2611d04 commit 1ebdd8d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,16 @@
[ngbTooltip]="'artemisApp.quizExercise.edit.testRunSubmissionsExist' | artemisTranslate"
/>
}
<a
[class.disabled]="hasExamStarted()"
[routerLink]="['/course-management', course.id, 'exams', exam.id, 'exercise-groups', exerciseGroupId, exercise.type + '-exercises', exercise.id, 'edit']"
class="btn btn-warning btn-sm me-1"
>
<fa-icon [icon]="faWrench" />
<span class="d-none d-md-inline" jhiTranslate="entity.action.edit"></span>
</a>
<span [ngbTooltip]="hasExamStarted() ? ('artemisApp.quizExercise.edit.examStartedNoEdit' | artemisTranslate) : undefined">
<a
[class.disabled]="hasExamStarted()"
[routerLink]="['/course-management', course.id, 'exams', exam.id, 'exercise-groups', exerciseGroupId, exercise.type + '-exercises', exercise.id, 'edit']"
class="btn btn-warning btn-sm me-1"
>
<fa-icon [icon]="faWrench" />
<span class="d-none d-md-inline" jhiTranslate="entity.action.edit"></span>
</a>
</span>
</div>
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/i18n/de/quizExercise.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"saving": "Speichern...",
"saved": "Gespeichert!",
"quizHasStarted": "Das Quiz hat angefangen. Es sind keine Änderungen mehr möglich.<br><br>Nachträgliche Korrekturen können vorgenommen werden, sobald das Quiz beendet wurde. Gehe zurück zur Übersicht und klicke auf \"Re-evaluate\", sobald das Quiz beendet wurde. (\"Re-evaluate\" ist nicht für TAs verfügbar.)",
"testRunSubmissionsExist": "Dieses Quiz enthält Abgaben für einen der Testläufe der Klausur. Lösche den Testlauf, um die Antwortoptionen zu bearbeiten."
"testRunSubmissionsExist": "Dieses Quiz enthält Abgaben für einen der Testläufe der Klausur. Lösche den Testlauf, um die Antwortoptionen zu bearbeiten.",
"examStartedNoEdit": "Die Prüfung hat begonnen. Das Quiz kann für die Dauer der Prüfung nicht bearbeitet werden."
},
"saveError": "Beim Speichern ist ein Fehler ist aufgetreten. Bitte überprüfe deine Eingabe und versuche es später noch einmal.",
"export": {
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/i18n/en/quizExercise.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"saving": "Saving...",
"saved": "Saved!",
"quizHasStarted": "The quiz has started. No more changes allowed.<br><br>Retroactive corrections can be made once the quiz has ended. To do so, go back to the overview and click on \"Re-evaluate\" once the quiz has ended. (\"Re-evaluate\" is not available to TAs.)",
"testRunSubmissionsExist": "This quiz contains submissions in one of the test runs for this exam. Delete the test run to edit the answer options."
"testRunSubmissionsExist": "This quiz contains submissions in one of the test runs for this exam. Delete the test run to edit the answer options.",
"examStartedNoEdit": "The exam has started. The quiz cannot be edited for the duration of the exam."
},
"saveError": "An error occurred while saving. Please review your input data and try again later.",
"export": {
Expand Down

0 comments on commit 1ebdd8d

Please sign in to comment.