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>
30
30
< ion-icon *ngIf ="question.type === 'description' || !question.questionnumber " name ="fas-circle-info " slot ="end "
31
31
aria-hidden ="true " />
32
32
< 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 " />
38
38
< 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 " />
41
41
</ ion-item >
42
42
</ ion-list >
43
43
</ nav >
Original file line number Diff line number Diff line change 14
14
15
15
import { CoreSharedModule } from '@/core/shared.module' ;
16
16
import { toBoolean } from '@/core/transforms/boolean' ;
17
- import { Component , Input } from '@angular/core' ;
17
+ import { Component , Input , OnInit } from '@angular/core' ;
18
18
19
19
import { CoreQuestionQuestionParsed } from '@features/question/services/question' ;
20
+ import { CoreQuestionHelper } from '@features/question/services/question-helper' ;
20
21
import { ModalController } from '@singletons' ;
21
22
22
23
/**
@@ -30,7 +31,7 @@ import { ModalController } from '@singletons';
30
31
CoreSharedModule ,
31
32
] ,
32
33
} )
33
- export class AddonModQuizNavigationModalComponent {
34
+ export class AddonModQuizNavigationModalComponent implements OnInit {
34
35
35
36
@Input ( ) navigation ?: AddonModQuizNavigationQuestion [ ] ; // Whether the user is reviewing the attempt.
36
37
@Input ( { transform : toBoolean } ) summaryShown = false ; // Whether summary is currently being shown.
@@ -39,6 +40,19 @@ export class AddonModQuizNavigationModalComponent {
39
40
@Input ( { transform : toBoolean } ) isReview = false ; // Whether the user is reviewing the attempt.
40
41
@Input ( { transform : toBoolean } ) isSequential = false ; // Whether quiz navigation is sequential.
41
42
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
+
42
56
/**
43
57
* Close modal.
44
58
*/
You can’t perform that action at this time.
0 commit comments