File tree Expand file tree Collapse file tree 2 files changed +23
-9
lines changed
src/addons/mod/quiz/components/navigation-modal Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,14 @@ <h1>{{ 'addon.mod_quiz.quiznavigation' | translate }}</h1>
3030 < ion-icon *ngIf ="question.type === 'description' || !question.questionnumber " name ="fas-circle-info " slot ="end "
3131 aria-hidden ="true " />
3232 < ion-icon *ngIf ="question.stateClass === 'core-question-requiresgrading' " name ="fas-circle-question "
33- [attr.aria-label ] ="question.status " slot ="end " />
34- < ion-icon *ngIf ="question.stateClass === 'core-question-correct' " name =" fas-check " color ="success "
35- [attr.aria-label ] ="question.status " slot ="end " />
36- < ion-icon *ngIf ="question.stateClass === 'core-question-partiallycorrect' " name =" fas-square-check " color ="warning "
37- [attr.aria-label ] ="question.status " slot ="end " />
33+ [title ] ="question.status " slot ="end " />
34+ < ion-icon *ngIf ="question.stateClass === 'core-question-correct' " [ name] =" correctIcon " color ="success "
35+ [title ] ="question.status " slot ="end " />
36+ < ion-icon *ngIf ="question.stateClass === 'core-question-partiallycorrect' " [ name] =" partialCorrectIcon " color ="warning "
37+ [title ] ="question.status " slot ="end " />
3838 < ion-icon *ngIf ="question.stateClass === 'core-question-incorrect' ||
39- question.stateClass === 'core-question-notanswered' " name =" fas-xmark " color ="danger "
40- [attr.aria-label] =" question.status " slot ="end " />
39+ question.stateClass === 'core-question-notanswered' " [ name] =" incorrectIcon " color ="danger " [title] =" question.status "
40+ slot ="end " />
4141 </ ion-item >
4242 </ ion-list >
4343 </ nav >
Original file line number Diff line number Diff line change 1414
1515import { CoreSharedModule } from '@/core/shared.module' ;
1616import { toBoolean } from '@/core/transforms/boolean' ;
17- import { Component , Input } from '@angular/core' ;
17+ import { Component , Input , OnInit } from '@angular/core' ;
1818
1919import { CoreQuestionQuestionParsed } from '@features/question/services/question' ;
20+ import { CoreQuestionHelper } from '@features/question/services/question-helper' ;
2021import { ModalController } from '@singletons' ;
2122
2223/**
@@ -30,7 +31,7 @@ import { ModalController } from '@singletons';
3031 CoreSharedModule ,
3132 ] ,
3233} )
33- export class AddonModQuizNavigationModalComponent {
34+ export class AddonModQuizNavigationModalComponent implements OnInit {
3435
3536 @Input ( ) navigation ?: AddonModQuizNavigationQuestion [ ] ; // Whether the user is reviewing the attempt.
3637 @Input ( { transform : toBoolean } ) summaryShown = false ; // Whether summary is currently being shown.
@@ -39,6 +40,19 @@ export class AddonModQuizNavigationModalComponent {
3940 @Input ( { transform : toBoolean } ) isReview = false ; // Whether the user is reviewing the attempt.
4041 @Input ( { transform : toBoolean } ) isSequential = false ; // Whether quiz navigation is sequential.
4142
43+ correctIcon = '' ;
44+ incorrectIcon = '' ;
45+ partialCorrectIcon = '' ;
46+
47+ /**
48+ * @inheritdoc
49+ */
50+ ngOnInit ( ) : void {
51+ this . correctIcon = CoreQuestionHelper . getCorrectIcon ( ) . fullName ;
52+ this . incorrectIcon = CoreQuestionHelper . getIncorrectIcon ( ) . fullName ;
53+ this . partialCorrectIcon = CoreQuestionHelper . getPartiallyCorrectIcon ( ) . fullName ;
54+ }
55+
4256 /**
4357 * Close modal.
4458 */
You can’t perform that action at this time.
0 commit comments