Skip to content

Commit

Permalink
Assessment: Don't allow activating presentations if no presentation s…
Browse files Browse the repository at this point in the history
…coring is set (#9251)
  • Loading branch information
Strohgelaender authored and JohannesWt committed Sep 23, 2024
1 parent 0f901c3 commit 41080d2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<th jhiSortBy="maxPoints"><span jhiTranslate="artemisApp.exercise.points"></span>&nbsp;<fa-icon [icon]="faSort" /></th>
<th jhiSortBy="bonusPoints"><span jhiTranslate="artemisApp.exercise.bonus"></span>&nbsp;<fa-icon [icon]="faSort" /></th>
<th jhiSortBy="includedInOverallScore"><span jhiTranslate="artemisApp.exercise.includedCompletely"></span>&nbsp;<fa-icon [icon]="faSort" /></th>
@if (course.presentationScore !== 0) {
@if (course.presentationScore) {
<th jhiSortBy="presentationScoreEnabled">
<span jhiTranslate="artemisApp.exercise.presentationScoreEnabled.title"></span>&nbsp;<fa-icon [icon]="faSort" />
</th>
Expand Down Expand Up @@ -58,7 +58,7 @@
<td>{{ fileUploadExercise.maxPoints }}</td>
<td>{{ fileUploadExercise.bonusPoints }}</td>
<td>{{ exerciseService.isIncludedInScore(fileUploadExercise) }}</td>
@if (course.presentationScore !== 0) {
@if (course.presentationScore) {
<td>{{ fileUploadExercise.presentationScoreEnabled }}</td>
}
<td>{{ fileUploadExercise.filePattern }}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<th jhiSortBy="maxPoints"><span jhiTranslate="artemisApp.exercise.points"></span>&nbsp;<fa-icon [icon]="faSort" /></th>
<th jhiSortBy="bonusPoints"><span jhiTranslate="artemisApp.exercise.bonus"></span>&nbsp;<fa-icon [icon]="faSort" /></th>
<th jhiSortBy="includedInOverallScore"><span jhiTranslate="artemisApp.exercise.includedCompletely"></span>&nbsp;<fa-icon [icon]="faSort" /></th>
@if (course.presentationScore !== 0) {
@if (course.presentationScore) {
<th jhiSortBy="presentationScoreEnabled">
<span jhiTranslate="artemisApp.exercise.presentationScoreEnabled.title"></span>&nbsp;<fa-icon [icon]="faSort" />
</th>
Expand Down Expand Up @@ -58,7 +58,7 @@
<td id="modeling-exercise-{{ modelingExercise.id }}-maxPoints">{{ modelingExercise.maxPoints }}</td>
<td id="modeling-exercise-{{ modelingExercise.id }}-bonusPoints">{{ modelingExercise.bonusPoints }}</td>
<td id="modeling-exercise-{{ modelingExercise.id }}-included">{{ exerciseService.isIncludedInScore(modelingExercise) }}</td>
@if (course.presentationScore !== 0) {
@if (course.presentationScore) {
<td>{{ modelingExercise.presentationScoreEnabled }}</td>
}
<td jhiTranslate="{{ 'artemisApp.DiagramType.' + modelingExercise.diagramType }}">{{ modelingExercise.diagramType }}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<th class="d-md-table-cell">
<span jhiTranslate="artemisApp.exercise.mode"></span>
</th>
@if (course.presentationScore !== 0) {
@if (course.presentationScore) {
<th class="d-md-table-cell" jhiSortBy="presentationScoreEnabled">
<span jhiTranslate="artemisApp.exercise.presentationScoreEnabled.title"></span>&nbsp;<fa-icon [icon]="faSort" />
</th>
Expand Down Expand Up @@ -151,7 +151,7 @@
<span [jhiTranslate]="programmingExercise.allowOnlineIde ? 'artemisApp.exercise.yes' : 'artemisApp.exercise.no'"></span>
</div>
</td>
@if (course.presentationScore !== 0) {
@if (course.presentationScore) {
<td class="d-md-table-cell">{{ programmingExercise.presentationScoreEnabled }}</td>
}
<td class="d-md-table-cell">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class PresentationScoreComponent implements DoCheck, OnDestroy {
}

private isBasicPresentation(): boolean {
return !!(this.exercise.course && this.exercise.course.presentationScore !== 0);
return !!this.exercise.course?.presentationScore;
}

private isGradedPresentation(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<th jhiSortBy="maxPoints"><span jhiTranslate="artemisApp.exercise.points"></span>&nbsp;<fa-icon [icon]="faSort" /></th>
<th jhiSortBy="bonusPoints"><span jhiTranslate="artemisApp.exercise.bonus"></span>&nbsp;<fa-icon [icon]="faSort" /></th>
<th jhiSortBy="includedInOverallScore"><span jhiTranslate="artemisApp.exercise.includedCompletely"></span>&nbsp;<fa-icon [icon]="faSort" /></th>
@if (course.presentationScore !== 0) {
@if (course.presentationScore) {
<th jhiSortBy="presentationScoreEnabled">
<span jhiTranslate="artemisApp.exercise.presentationScoreEnabled.title"></span>&nbsp;<fa-icon [icon]="faSort" />
</th>
Expand Down Expand Up @@ -53,7 +53,7 @@
<td>{{ textExercise.maxPoints }}</td>
<td>{{ textExercise.bonusPoints }}</td>
<td>{{ exerciseService.isIncludedInScore(textExercise) }}</td>
@if (course.presentationScore !== 0) {
@if (course.presentationScore) {
<td>{{ textExercise.presentationScoreEnabled }}</td>
}
<td class="d-md-table-cell"><jhi-exercise-categories [exercise]="textExercise" /></td>
Expand Down

0 comments on commit 41080d2

Please sign in to comment.