-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Programming exercises: Add information box to exercise details page (#…
- Loading branch information
1 parent
afa8543
commit e89f035
Showing
60 changed files
with
1,596 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 12 additions & 17 deletions
29
.../webapp/app/exam/participate/exam-start-information/exam-start-information.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
<div class="d-flex flex-row flex-wrap mb-3"> | ||
<div class="d-flex flex-row flex-wrap gap-2"> | ||
@for (informationBoxData of examInformationBoxData; track informationBoxData) { | ||
<div class="me-3"> | ||
<jhi-information-box [informationBoxData]="informationBoxData"> | ||
<ng-container contentComponent> | ||
@if (informationBoxData.contentComponent === 'formatedDate') { | ||
<span> | ||
{{ informationBoxData.content | artemisDate: 'long-date' }} | ||
- | ||
{{ informationBoxData.content | artemisDate: 'time' }} | ||
</span> | ||
} @else if (informationBoxData.contentComponent === 'workingTime') { | ||
<jhi-student-exam-working-time [studentExam]="studentExam" /> | ||
} | ||
</ng-container> | ||
</jhi-information-box> | ||
</div> | ||
<jhi-information-box [informationBoxData]="informationBoxData"> | ||
<ng-container contentComponent> | ||
@if (informationBoxData.content.type === 'dateTime') { | ||
<span contentComponent>{{ informationBoxData.content.value | artemisDate }}</span> | ||
} | ||
@if (informationBoxData.content.type === 'workingTime') { | ||
<jhi-student-exam-working-time [studentExam]="informationBoxData.content.value" /> | ||
} | ||
</ng-container> | ||
</jhi-information-box> | ||
} | ||
</div> | ||
<span class="mt-3" [innerHTML]="formattedStartText"></span> | ||
<div class="mt-3" [innerHTML]="formattedStartText"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...exercise-headers/exercise-headers-information/exercise-headers-information.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@if (exercise) { | ||
<div id="exercise-headers-information" class="d-flex flex-row flex-wrap gap-2 overflow-auto"> | ||
@for (informationBoxItem of informationBoxItems; track informationBoxItem) { | ||
<jhi-information-box [informationBoxData]="informationBoxItem"> | ||
@switch (informationBoxItem.content.type) { | ||
@case ('difficultyLevel') { | ||
<jhi-difficulty-level contentComponent [difficultyLevel]="informationBoxItem.content.value" /> | ||
} | ||
@case ('categories') { | ||
<jhi-exercise-categories | ||
contentComponent | ||
[exercise]="informationBoxItem.content.value" | ||
[showTags]="{ difficulty: false, notReleased: true, includedInScore: true }" | ||
[ngClass]="'badge-row'" | ||
[isSmall]="true" | ||
/> | ||
} | ||
@case ('timeAgo') { | ||
<span [ngClass]="'text-' + informationBoxItem.contentColor" contentComponent>{{ informationBoxItem.content.value | artemisTimeAgo }}</span> | ||
} | ||
@case ('dateTime') { | ||
<span contentComponent>{{ informationBoxItem.content.value | artemisDate }}</span> | ||
} | ||
@case ('submissionStatus') { | ||
<jhi-submission-result-status | ||
contentComponent | ||
class="text-truncate result" | ||
[exercise]="informationBoxItem.content.value" | ||
[studentParticipation]="studentParticipation" | ||
[triggerLastGraded]="false" | ||
[showCompletion]="false" | ||
[showBadge]="false" | ||
/> | ||
} | ||
} | ||
</jhi-information-box> | ||
} | ||
</div> | ||
} |
Empty file.
Oops, something went wrong.