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: Improve usability and readability of results summary #7204

Merged
merged 108 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from 104 commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
6a38ce9
Adjusting headline
florian-glombik Sep 15, 2023
0fda826
Adjusting general information headline
florian-glombik Sep 15, 2023
0c3907d
Removing exam badge if not test exam
florian-glombik Sep 15, 2023
2e3156a
Moving title to component where it belongs to
florian-glombik Sep 15, 2023
ccfdbd7
Reducing header information according to design and rename component …
florian-glombik Sep 15, 2023
d04ae5c
Display examined student within general information
florian-glombik Sep 15, 2023
78bf7e1
Adjust component naming to exam results
florian-glombik Sep 15, 2023
10bd771
Renaming files
florian-glombik Sep 17, 2023
063c43f
Adjusting result overview headline
florian-glombik Sep 17, 2023
aa2104b
Hide included in score column if all exercises are included in score
florian-glombik Sep 17, 2023
36d1906
Adding visual indicator of clickable effect
florian-glombik Sep 17, 2023
7e6afb3
Adding column for percentage and indicate exercise type by adding icons
florian-glombik Sep 17, 2023
5fa93c5
Renaming components
florian-glombik Sep 17, 2023
84182af
Highlight footer aswell
florian-glombik Sep 17, 2023
e108337
Do not indicate table footer to be clickable
florian-glombik Sep 17, 2023
7f20287
Display achieved percentage in table
florian-glombik Sep 17, 2023
126b883
Scrolling to exercise
florian-glombik Sep 19, 2023
4093251
Reducing scaling up a bit
florian-glombik Sep 19, 2023
b5e78da
Reducing scaling up a bit
florian-glombik Sep 19, 2023
0990b58
Use actual colors for achieved percentages
florian-glombik Sep 19, 2023
a7b370d
Adding color for total achieved percentage
florian-glombik Sep 19, 2023
2f70816
Adjusting translation
florian-glombik Sep 19, 2023
20f49f4
Grading Key: make collapsable instead of linking to new page
florian-glombik Sep 19, 2023
42c66ea
Grading Key: add animation
florian-glombik Sep 19, 2023
a039ea6
Grading Key: indicate button action with chevron
florian-glombik Sep 19, 2023
f3d8bf5
Grading Key: refactor grading key to make the table reusable
florian-glombik Sep 19, 2023
31331c5
Grading Key: removing testing modification
florian-glombik Sep 19, 2023
5877425
Grading Key: Highlight reached grade
florian-glombik Sep 19, 2023
8444c8c
Review open badge: Move to general information head and fix german tr…
florian-glombik Sep 19, 2023
892bc48
Result Overview: align icons and exercise names
florian-glombik Sep 19, 2023
60cfbae
Result Overview: use colors from color scheme
florian-glombik Sep 19, 2023
1ba32f2
Result Overview: simplify grade styling
florian-glombik Sep 19, 2023
ca6f2b3
Result Overview: remove hover effect on grade
florian-glombik Sep 19, 2023
a5e4973
Result Overview: adjusting position of grade and where it uncollapses
florian-glombik Sep 19, 2023
fd9a6eb
Result Overview: adjusting position of grade and where it uncollapses
florian-glombik Sep 19, 2023
d073dda
Result Overview: Make sure grading key is printed together with exerc…
florian-glombik Sep 19, 2023
7af6083
General Information: using table to display general information
florian-glombik Sep 19, 2023
d4b982d
General Information: improve styling of table
florian-glombik Sep 20, 2023
ffa51d2
General Information: Removing unused log
florian-glombik Sep 20, 2023
6c9860f
Fixing tests for gradingKeyTable
florian-glombik Sep 20, 2023
f1c60e2
Grading Key: adjust font sizes
florian-glombik Sep 20, 2023
14dbec7
Result Overview: rename files
florian-glombik Sep 20, 2023
260fadd
Result Overview: rename folder
florian-glombik Sep 20, 2023
0110c04
Result Summary: rename files
florian-glombik Sep 20, 2023
01cc201
Result Overview: adjust how included in score is displayed
florian-glombik Sep 20, 2023
097e009
Result Overview: add visual indicator on not included exercises
florian-glombik Sep 20, 2023
4360e3d
Result Overview: incorporate written result
florian-glombik Sep 20, 2023
d787280
General Information: align review is open badge
florian-glombik Sep 20, 2023
54d1574
General Information: make bonus grading key collapsable aswell
florian-glombik Sep 20, 2023
b8c0ba9
General Information: adjust styling of full sentence
florian-glombik Sep 20, 2023
dce34b4
General Information: removing duplicated translation
florian-glombik Sep 20, 2023
c188c2a
General Information: display grading keys besides each other
florian-glombik Sep 20, 2023
366bbf9
General Information: allow grading keys to be displayed besides each …
florian-glombik Sep 20, 2023
95cccfd
General Information: move grading key buttons to the bottom to make i…
florian-glombik Sep 20, 2023
8a1049d
General Information: hide section title on exam cover page
florian-glombik Sep 20, 2023
2acc61b
General Information: removing unused method
florian-glombik Sep 20, 2023
9667e53
General Information: make sure bonus is aligned right
florian-glombik Sep 20, 2023
0ecb9e2
Merge branch 'develop' into enhancement/exam/review-page
florian-glombik Sep 20, 2023
379b55e
General Information: addressing review
florian-glombik Sep 20, 2023
3dfe2fb
General Information: addressing review
florian-glombik Sep 20, 2023
fc58d5a
General Information: renaming folder and ts file
florian-glombik Sep 20, 2023
a51ef23
General Information: addressing review (adding duration and amount of…
florian-glombik Sep 20, 2023
de5a830
General Information: addressing review (rounding score by course sett…
florian-glombik Sep 20, 2023
0223da4
Merge branch 'develop' into enhancement/exam/review-page
florian-glombik Sep 20, 2023
5727245
Result Overview: fix collapsing grading key animation
florian-glombik Sep 20, 2023
aa00166
Result Overview: fixing styling of collapsable grading keys
florian-glombik Sep 21, 2023
c979347
Result Overview: hide bonus grading key if not defined
florian-glombik Sep 21, 2023
16d5677
Result Overview: do not display grading scale buttons if grading scal…
florian-glombik Sep 21, 2023
d0c795f
Tests: Fixing ExamGeneralInformationComponent
florian-glombik Sep 21, 2023
f70502b
Tests: Fixing ExamGeneralInformationComponent
florian-glombik Sep 21, 2023
3314854
Tests: Adding tests for exam result overview component
florian-glombik Sep 21, 2023
a07faf7
Tests: Adding tests for exam result overview component; testing showI…
florian-glombik Sep 21, 2023
2900c02
Tests: Adding tests for exam result overview component; scrollToExercise
florian-glombik Sep 21, 2023
91356c9
Tests: Adding tests for exam result overview component; getAchievedPe…
florian-glombik Sep 21, 2023
5bfbc23
Tests: Adjusting title
florian-glombik Sep 21, 2023
273b057
Tests: Adding tests for grading key overview
florian-glombik Sep 21, 2023
39ae757
Tests: Adding tests for grading key overview
florian-glombik Sep 21, 2023
bc3c800
Tests: removing unused methods
florian-glombik Sep 21, 2023
a4a655a
Addressing review: do not display title of sub component
florian-glombik Sep 21, 2023
a273885
Addressing review: center the general information
florian-glombik Sep 21, 2023
ab90ce4
Addressing review: center the general information
florian-glombik Sep 21, 2023
06113cd
Addressing review: center the general information (success)
florian-glombik Sep 21, 2023
aab38bb
Addressing review: another solution without alignment problems
florian-glombik Sep 21, 2023
def1f29
Revert "Addressing review: another solution without alignment problems"
florian-glombik Sep 21, 2023
ba7c8e7
Revert "Addressing review: center the general information (success)"
florian-glombik Sep 21, 2023
e878fc4
Revert "Addressing review: center the general information"
florian-glombik Sep 21, 2023
3ef9a5d
Revert "Addressing review: center the general information"
florian-glombik Sep 21, 2023
7f36aa6
Addressing review: reducing padding and start at beginning of container
florian-glombik Sep 21, 2023
3143785
Merge branch 'develop' into enhancement/exam/review-page
florian-glombik Sep 21, 2023
8c0f429
Addressing review: move method to shared participation.utils.ts
florian-glombik Sep 21, 2023
30f65ed
Addressing review: make better usage of angular change detection - ge…
florian-glombik Sep 21, 2023
f44e0c9
Addressing review: make better usage of angular change detection - sh…
florian-glombik Sep 21, 2023
5f31481
Addressing review: make better usage of angular change detection - ge…
florian-glombik Sep 21, 2023
9b3c88a
Addressing review: make better usage of angular change detection - ov…
florian-glombik Sep 21, 2023
3ad970b
Addressing review: make better usage of angular change detection - ge…
florian-glombik Sep 21, 2023
77be9d8
Addressing review: make better usage of angular change detection - up…
florian-glombik Sep 21, 2023
ddda0da
Addressing review: make better usage of angular change detection - re…
florian-glombik Sep 21, 2023
4081fa5
Addressing review: make better usage of angular change detection - ac…
florian-glombik Sep 21, 2023
d5cd956
Addressing review: make better usage of angular change detection - ge…
florian-glombik Sep 21, 2023
61b044f
Addressing review: make better usage of angular change detection - sh…
florian-glombik Sep 21, 2023
ffa4347
Fixing test
florian-glombik Sep 21, 2023
6eb2df7
Addressing review: make better usage of angular change detection - ha…
florian-glombik Sep 21, 2023
1467402
Merge branch 'develop' into enhancement/exam/review-page
florian-glombik Sep 21, 2023
3d89c59
Adding OnChanges lifecycle hook
florian-glombik Sep 21, 2023
7ee8788
Fixing highlighting of grading key table
florian-glombik Sep 22, 2023
e0536c9
Fixing grade steps within grading key table
florian-glombik Sep 22, 2023
e4bf93d
Adjusting naming of variable
florian-glombik Sep 22, 2023
224388b
Merge branch 'develop' into enhancement/exam/review-page
florian-glombik Sep 24, 2023
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 @@ -25,7 +25,7 @@ import { ArtemisMarkdownEditorModule } from 'app/shared/markdown-editor/markdown
import { DurationPipe } from 'app/shared/pipes/artemis-duration.pipe';
import { StudentExamStatusComponent } from 'app/exam/manage/student-exams/student-exam-status/student-exam-status.component';
import { StudentExamSummaryComponent } from 'app/exam/manage/student-exams/student-exam-summary.component';
import { ArtemisParticipationSummaryModule } from 'app/exam/participate/summary/exam-participation-summary.module';
import { ArtemisParticipationSummaryModule } from 'app/exam/participate/summary/exam-result-summary.module';
import { ExamExerciseRowButtonsComponent } from 'app/exercises/shared/exam-exercise-row-buttons/exam-exercise-row-buttons.component';
import { ArtemisProgrammingExerciseStatusModule } from 'app/exercises/programming/manage/status/programming-exercise-status.module';
import { TestRunManagementComponent } from 'app/exam/manage/test-runs/test-run-management.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h2 style="text-align: center; font-weight: normal" *ngIf="startView">
</span>
<br />
</h2>
<jhi-exam-information *ngIf="startView" [exam]="exam" [studentExam]="studentExam"></jhi-exam-information>
<jhi-exam-general-information *ngIf="startView" [exam]="exam" [studentExam]="studentExam" [displayOnExamCover]="true" />
<div><span style="display: table; margin-left: auto; margin-right: auto" [innerHTML]="formattedGeneralInformation"></span></div>
<div *ngIf="studentFailedToSubmit" class="mb-2 font-weight-bold text-danger">
{{ 'artemisApp.studentExam.submissionNotInTime' | artemisTranslate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { ArtemisResultModule } from 'app/exercises/shared/result/result.module';
import { ArtemisProgrammingExerciseActionsModule } from 'app/exercises/programming/shared/actions/programming-exercise-actions.module';
import { ArtemisProgrammingExerciseInstructionsRenderModule } from 'app/exercises/programming/shared/instructions-render/programming-exercise-instructions-render.module';
import { ArtemisCoursesModule } from 'app/overview/courses.module';
import { ArtemisParticipationSummaryModule } from 'app/exam/participate/summary/exam-participation-summary.module';
import { ArtemisParticipationSummaryModule } from 'app/exam/participate/summary/exam-result-summary.module';
import { ExamTimerComponent } from './timer/exam-timer.component';
import { ArtemisExerciseButtonsModule } from 'app/overview/exercise-details/exercise-buttons.module';
import { ArtemisHeaderExercisePageWithDetailsModule } from 'app/exercises/shared/exercise-headers/exercise-headers.module';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<div>
<h3 *ngIf="!displayOnExamCover" id="general-information-title">
{{ 'artemisApp.exam.examSummary.generalInformation' | artemisTranslate }}
</h3>
<div class="mt-3 mb-4 text-center">
<table class="table table-borderless mx-auto d-block">
<tbody>
<tr *ngIf="isTestExam">
<th class="text-end text-right">{{ 'artemisApp.examManagement.testExam.examMode' | artemisTranslate }}:</th>
<td>
<span class="mx-2 badge bg-primary">{{ 'artemisApp.examManagement.testExam.testExam' | artemisTranslate }}</span>
</td>
</tr>
<tr *ngIf="exam?.moduleNumber">
<th>{{ 'artemisApp.examManagement.moduleNumber' | artemisTranslate }}:</th>
<td>{{ exam.moduleNumber }}</td>
</tr>
<tr *ngIf="exam?.courseName">
<th>{{ 'artemisApp.exam.course' | artemisTranslate }}:</th>
<td>{{ exam.courseName }}</td>
</tr>
<tr *ngIf="exam?.examiner">
<th>{{ 'artemisApp.examManagement.examiner' | artemisTranslate }}:</th>
<td>{{ exam.examiner }}</td>
</tr>
<ng-container *ngIf="exam && !isTestExam && exam.startDate">
<tr *ngIf="isExamOverMultipleDays; else examSingleDay">
<th>{{ 'artemisApp.exam.time' | artemisTranslate }}:</th>
<td>
{{ exam.startDate | artemisDate: 'long-date' }} {{ exam.startDate | artemisDate: 'time' }} &nbsp;-&nbsp;{{ examEndDate | artemisDate: 'long-date' }}
{{ examEndDate | artemisDate: 'time' }}
</td>
</tr>
<ng-template #examSingleDay>
<tr class="mb-2">
<th>{{ 'artemisApp.exam.date' | artemisTranslate }}:</th>
<td>{{ exam.startDate | artemisDate: 'long-date' }}</td>
</tr>
<tr class="mb-2">
<th>{{ 'artemisApp.exam.workingTime' | artemisTranslate }}:</th>
<td>{{ exam.startDate | artemisDate: 'time' }} - {{ examEndDate | artemisDate: 'time' }}</td>
</tr>
</ng-template>

<tr *ngIf="exam.endDate && studentExam?.workingTime">
<th>{{ 'artemisApp.exam.duration' | artemisTranslate }}:</th>
<td><jhi-student-exam-working-time [studentExam]="studentExam" /></td>
</tr>
</ng-container>

<ng-container *ngIf="displayOnExamCover">
<tr *ngIf="exam.examMaxPoints">
<th>{{ 'artemisApp.exam.points' | artemisTranslate }}:</th>
<td>{{ exam.examMaxPoints }}</td>
</tr>
<tr *ngIf="exam.numberOfExercisesInExam">
<th>{{ 'artemisApp.exam.exercises' | artemisTranslate }}:</th>
<td>{{ exam.numberOfExercisesInExam }}</td>
</tr>
</ng-container>

<tr *ngIf="exam && studentExam?.ended && (exam.examStudentReviewStart || exam.examStudentReviewEnd)">
<th>{{ 'artemisApp.exam.examStudentReviewTimespan' | artemisTranslate }}:&nbsp;</th>
<td class="d-flex align-items-center">
<span *ngIf="exam.examStudentReviewStart"> {{ exam.examStudentReviewStart | artemisDate }} </span>
<span *ngIf="exam.examStudentReviewStart && exam.examStudentReviewEnd">&nbsp;-&nbsp;</span>
<span *ngIf="exam.examStudentReviewEnd">{{ exam.examStudentReviewEnd | artemisDate }}</span>
<div *ngIf="reviewIsOpen" class="mx-2 badge bg-success">{{ 'artemisApp.exam.studentReviewEnabled' | artemisTranslate }}</div>
</td>
</tr>

<tr *ngIf="studentExam?.user?.name">
<th>{{ 'artemisApp.exam.examinedStudent' | artemisTranslate }}:</th>
<td>{{ studentExam!.user!.name }}</td>
</tr>

<!-- For test exams, the currentDate (analogous to the real exam) and the workingTime should be displayed -->
<ng-container *ngIf="exam && isTestExam">
<tr>
<th>{{ 'artemisApp.exam.date' | artemisTranslate }}:</th>
<td>{{ currentDate! | artemisDate: 'long-date' }}</td>
</tr>
<tr *ngIf="exam?.workingTime">
<th>{{ 'artemisApp.exam.workingTime' | artemisTranslate }}:</th>
<td>{{ exam.workingTime! | artemisDurationFromSeconds }}</td>
<td></td>
</tr>
<tr *ngIf="studentExam.submitted && studentExam.submissionDate && studentExam.startedDate">
<th>{{ 'artemisApp.exam.overview.testExam.workingTimeCalculated' | artemisTranslate }} :</th>
<td>
<jhi-testexam-working-time [studentExam]="studentExam" />
</td>
</tr>
</ng-container>
</tbody>
</table>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
table {
width: fit-content;
}

th,
td {
text-align: start;
padding: 0.25em;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ import { endTime, getAdditionalWorkingTime, isExamOverMultipleDays, normalWorkin
import dayjs from 'dayjs/esm';

@Component({
selector: 'jhi-exam-information',
templateUrl: './exam-information.component.html',
selector: 'jhi-exam-general-information',
styleUrls: ['./exam-general-information.component.scss'],
templateUrl: './exam-general-information.component.html',
})
export class ExamInformationComponent implements OnInit {
export class ExamGeneralInformationComponent implements OnInit {
@Input() exam: Exam;
@Input() studentExam: StudentExam;
@Input() reviewIsOpen?: boolean = false;

/** The exam cover will contain e.g. the number of exercises which is hidden in the exam summary as
florian-glombik marked this conversation as resolved.
Show resolved Hide resolved
* the information is shown in the {@link ExamResultOverviewComponent} */
@Input() displayOnExamCover?: boolean = false;

examEndDate?: dayjs.Dayjs;
normalWorkingTime?: number;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
<div>
<h2 id="exam-title">
<ng-container *ngIf="!instructorView">
{{ 'artemisApp.exam.examSummary.yourSubmissionTo' | artemisTranslate: { examTitle: studentExam?.exam?.title, studentName: studentExam?.user?.name } }}
</ng-container>
<ng-container *ngIf="instructorView">
{{ 'artemisApp.exam.examSummary.studentSubmissionTo' | artemisTranslate: { examTitle: studentExam?.exam?.title, studentName: studentExam?.user?.name } }}
<ng-container>
{{ 'artemisApp.exam.examSummary.examResults' | artemisTranslate }}
</ng-container>
<button id="exportToPDFButton" class="btn btn-primary float-end" (click)="printPDF()">
<fa-icon [icon]="faPrint"></fa-icon>
<span jhiTranslate="artemisApp.exam.examSummary.exportPDF">Export PDF</span>
</button>
</h2>
</div>
<jhi-exam-information *ngIf="studentExam?.exam" [exam]="studentExam.exam!" [studentExam]="studentExam"></jhi-exam-information>
<div class="mb-4 container text-center" *ngIf="studentExam?.exam && isBeforeStudentReviewEnd() && isAfterStudentReviewStart() && !isTestRun">
<div class="row justify-content-center">
<div class="alert alert-success col-12 col-lg-6" role="alert">
{{ 'artemisApp.exam.studentReviewEnabled' | artemisTranslate }}
</div>
</div>
</div>
<div class="mb-4 container exam-points-summary-container" *ngIf="studentExam && studentExam.exercises && studentExam.exam?.course && studentExamGradeInfoDTO">
<jhi-exam-points-summary [studentExamWithGrade]="studentExamGradeInfoDTO"></jhi-exam-points-summary>
<jhi-exam-general-information
*ngIf="studentExam?.exam"
[exam]="studentExam.exam!"
[studentExam]="studentExam"
[reviewIsOpen]="studentExam?.exam && isBeforeStudentReviewEnd() && isAfterStudentReviewStart() && !isTestRun"
/>
<div class="mb-4" *ngIf="studentExam && studentExam.exercises && studentExam.exam?.course && studentExamGradeInfoDTO">
<jhi-exam-result-overview
[studentExamWithGrade]="studentExamGradeInfoDTO"
[isGradingKeyCollapsed]="isGradingKeyCollapsed"
[isBonusGradingKeyCollapsed]="isBonusGradingKeyCollapsed"
/>
</div>
<div *ngIf="!resultsPublished" class="mb-0">
<fa-icon [icon]="faInfoCircle" class="info-icon"></fa-icon>
Expand Down Expand Up @@ -91,7 +90,7 @@ <h5>
</span>
<!-- prettier-ignore -->
<h5 class="exercise-title">{{ exercise?.exerciseGroup?.title ?? '-' }}
[{{ exercise.maxPoints }} {{ 'artemisApp.examParticipation.points' | artemisTranslate }}<span
[{{ exercise.maxPoints }} {{ 'artemisApp.examParticipation.points' | artemisTranslate }}<span
*ngIf="exercise.bonusPoints">, {{ exercise.bonusPoints }} {{ 'artemisApp.examParticipation.bonus' | artemisTranslate }}</span>]
<jhi-included-in-score-badge
*ngIf="exercise.includedInOverallScore !== IncludedInOverallScore.INCLUDED_COMPLETELY"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import { PlagiarismVerdict } from 'app/exercises/shared/plagiarism/types/Plagiar

@Component({
selector: 'jhi-exam-participation-summary',
templateUrl: './exam-participation-summary.component.html',
styleUrls: ['../../../course/manage/course-exercise-card.component.scss', '../../../exercises/quiz/shared/quiz.scss', 'exam-participation-summary.component.scss'],
templateUrl: './exam-result-summary.component.html',
styleUrls: ['../../../course/manage/course-exercise-card.component.scss', '../../../exercises/quiz/shared/quiz.scss', 'exam-result-summary.component.scss'],
})
export class ExamParticipationSummaryComponent implements OnInit {
export class ExamResultSummaryComponent implements OnInit {
// make constants available to html for comparison
readonly TEXT = ExerciseType.TEXT;
readonly QUIZ = ExerciseType.QUIZ;
Expand Down Expand Up @@ -58,6 +58,9 @@ export class ExamParticipationSummaryComponent implements OnInit {
*/
studentExamGradeInfoDTO: StudentExamWithGradeDTO;

isGradingKeyCollapsed: boolean = true;
isBonusGradingKeyCollapsed: boolean = true;

@Input()
instructorView = false;

Expand Down Expand Up @@ -142,10 +145,6 @@ export class ExamParticipationSummaryComponent implements OnInit {
return exam?.publishResultsDate && dayjs(exam.publishResultsDate).isBefore(this.serverDateService.now());
}

getIcon(exerciseType: ExerciseType) {
return getIcon(exerciseType);
}

asProgrammingExercise(exercise: Exercise): ProgrammingExercise {
return exercise as ProgrammingExercise;
}
Expand All @@ -163,11 +162,16 @@ export class ExamParticipationSummaryComponent implements OnInit {
* called for exportPDF Button
*/
printPDF() {
// expand all exercises before printing
this.collapsedExerciseIds = [];
this.expandExercisesAndGradingKeysBeforePrinting();
setTimeout(() => this.themeService.print());
}

private expandExercisesAndGradingKeysBeforePrinting() {
this.collapsedExerciseIds = [];
this.isGradingKeyCollapsed = false;
this.isBonusGradingKeyCollapsed = false;
}

public generateLink(exercise: Exercise) {
if (exercise?.studentParticipations?.length) {
return ['/courses', this.courseId, `${exercise.type}-exercises`, exercise.id, 'participate', exercise.studentParticipations[0].id];
Expand Down Expand Up @@ -248,4 +252,6 @@ export class ExamParticipationSummaryComponent implements OnInit {
}
return false;
}

protected readonly getIcon = getIcon;
}
Loading
Loading