Skip to content

Commit 361fa4e

Browse files
committed
MOBILE-4638 chore: Adapt icons to match LMS on MDL-82497
1 parent a1c547b commit 361fa4e

File tree

10 files changed

+31
-15
lines changed

10 files changed

+31
-15
lines changed

src/addons/messages/pages/discussion/discussion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
9696
groupMessagingEnabled: boolean;
9797
isGroup = false;
9898
members: {[id: number]: AddonMessagesConversationMember} = {}; // Members that wrote a message, indexed by ID.
99-
favouriteIcon = 'fa-star';
99+
favouriteIcon = 'fas-star';
100100
deleteIcon = 'fas-trash';
101101
blockIcon = 'fas-user-lock';
102102
addRemoveIcon = 'fas-user-plus';

src/addons/qtype/calculated/component/addon-qtype-calculated.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</ng-container>
3030
</div>
3131
<ion-icon *ngIf="question.input.correctIcon" class="core-correct-icon ion-align-self-center" slot="end"
32-
[name]="question.input.correctIcon" [color]="[question.input.correctIconColor]" />
32+
[name]="question.input.correctIcon" [color]="[question.input.correctIconColor]" [ariaLabel]="question.input.correctIconLabel" />
3333
</ion-item>
3434

3535
<!-- Display unit options after the answer input. -->

src/addons/qtype/ordering/component/addon-qtype-ordering.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919

2020
@if (dragDisabled) {
2121
@if (item.correctClass === 'correct') {
22-
<ion-icon name="fas-check" slot="start" />
22+
<ion-icon name="fas-check-double" slot="start" [ariaLabel]="'core.question.correct' | translate" color="success" />
2323
} @else if (item.correctClass === 'incorrect') {
24-
<ion-icon name="fas-xmark" slot="start" />
24+
<ion-icon name="fas-xmark" slot="start" [ariaLabel]="'core.question.incorrect' | translate" color="danger" />
2525
} @else if (item.correctClass.startsWith('partial')) {
26-
<ion-icon name="far-square-check" slot="start" />
26+
<ion-icon name="fas-check" slot="start" [ariaLabel]="'core.question.partiallycorrect' | translate" color="warning" />
2727
}
2828
}
2929

src/addons/qtype/ordering/component/ordering.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ export class AddonQtypeOrderingComponent extends CoreQuestionBaseComponent<Addon
7474
this.question.items = itemsElements.map(element => {
7575
// Remove correctness icons from the content.
7676
const itemContentEl = element.querySelector<HTMLElement>('[data-itemcontent]');
77-
itemContentEl?.querySelector('.icon.fa-check, .icon.fa-remove, .icon.fa-check-square')?.remove();
77+
itemContentEl?.querySelector(
78+
'.icon.fa-check, .icon.fa-remove, .icon.fa-check-square, .icon.fa-check-double, .icon.fa-xmark',
79+
)?.remove();
7880

7981
return {
8082
id: element.id,

src/addons/qtype/shortanswer/component/addon-qtype-shortanswer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
[attr.name]="question.input.name" [value]="question.input.value" autocorrect="off" [disabled]="question.input.readOnly"
1212
[label]="'addon.mod_quiz.answercolon' | translate" />
1313
<ion-icon *ngIf="question.input.correctIcon" class="core-correct-icon" slot="end" [name]="question.input.correctIcon"
14-
[color]="[question.input.correctIconColor]" />
14+
[color]="[question.input.correctIconColor]" [ariaLabel]="question.input.correctIconLabel" />
1515
</ion-item>
1616
</ion-list>

src/core/features/fileuploader/components/audio-recorder/audio-recorder.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ <h1>{{ 'core.fileuploader.audiotitle' | translate }}</h1>
4343
<div class="core-audio-recorder--control">
4444
<ion-button shape="round" fill="clear" [ariaLabel]="'core.fileuploader.stoprecording' | translate"
4545
(click)="stopRecording()">
46-
<ion-icon slot="icon-only" name="fa-check" />
46+
<ion-icon slot="icon-only" name="fas-check" aria-hidden="true" />
4747
</ion-button>
4848
</div>
4949
</div>

src/core/features/grades/services/grades-helper.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,17 +553,26 @@ export class CoreGradesHelperProvider {
553553
row.itemtype = 'agg_sum';
554554
row.icon = 'moodle-agg-sum';
555555
row.iconAlt = Translate.instant('core.grades.aggregatesum');
556-
} else if (text.indexOf('/outcomes') > -1 || text.indexOf('fa-tasks') > -1 || text.indexOf('fa-list-check') > -1) {
556+
} else if (
557+
text.indexOf('/outcomes') > -1 ||
558+
text.indexOf('fa-tasks') > -1 ||
559+
text.indexOf('fa-list-check') > -1
560+
) {
557561
row.itemtype = 'outcome';
558562
row.icon = 'fas-list-check';
559563
row.iconAlt = Translate.instant('core.grades.outcome');
560564
} else if (text.indexOf('i/folder') > -1 || text.indexOf('fa-folder') > -1 || text.indexOf('category-content') > -1) {
561565
row.itemtype = 'category';
562566
row.icon = 'fas-folder';
563567
row.iconAlt = Translate.instant('core.grades.category');
564-
} else if (text.indexOf('/manual_item') > -1 || text.indexOf('fa-square-o') > -1) {
568+
} else if (
569+
text.indexOf('/manual_item') > -1 ||
570+
text.indexOf('fa-square-o') > -1 ||
571+
text.indexOf('fa-pencil-square-o') > -1 ||
572+
text.indexOf('fa-pen-to-square') > -1
573+
) {
565574
row.itemtype = 'manual';
566-
row.icon = 'far-square';
575+
row.icon = 'fas-pen-to-square';
567576
row.iconAlt = Translate.instant('core.grades.manualitem');
568577
} else if (text.indexOf('/calc') > -1 || text.indexOf('fa-calculator') > -1) {
569578
row.itemtype = 'calc';

src/core/features/mainmenu/services/mainmenu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class CoreMainMenuProvider {
113113
const id = url + '#' + type;
114114
if (!icon) {
115115
// Icon not defined, use default one.
116-
icon = type == 'embedded' ? 'fa-expand' : 'fa-link'; // @todo Find a better icon for embedded.
116+
icon = type == 'embedded' ? 'fas-expand' : 'fas-link'; // @todo Find a better icon for embedded.
117117
}
118118

119119
if (!map[id]) {

src/core/features/question/classes/base-question-component.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,18 +494,22 @@ export class CoreQuestionBaseComponent<T extends AddonModQuizQuestion = AddonMod
494494
question.input.correctClass = 'core-question-incorrect';
495495
question.input.correctIcon = 'fas-xmark';
496496
question.input.correctIconColor = CoreIonicColorNames.DANGER;
497+
question.input.correctIconLabel = 'core.question.incorrect';
497498
} else if (input.classList.contains('correct')) {
498499
question.input.correctClass = 'core-question-correct';
499-
question.input.correctIcon = 'fas-check';
500+
question.input.correctIcon = 'fas-check-double';
500501
question.input.correctIconColor = CoreIonicColorNames.SUCCESS;
502+
question.input.correctIconLabel = 'core.question.correct';
501503
} else if (input.classList.contains('partiallycorrect')) {
502504
question.input.correctClass = 'core-question-partiallycorrect';
503-
question.input.correctIcon = 'fas-square-check';
505+
question.input.correctIcon = 'fas-check';
504506
question.input.correctIconColor = CoreIonicColorNames.WARNING;
507+
question.input.correctIconLabel = 'core.question.partiallycorrect';
505508
} else {
506509
question.input.correctClass = '';
507510
question.input.correctIcon = '';
508511
question.input.correctIconColor = '';
512+
question.input.correctIconLabel = '';
509513
}
510514

511515
if (question.input.isInline) {
@@ -829,6 +833,7 @@ export type AddonModQuizQuestionTextInput = {
829833
correctClass?: string;
830834
correctIcon?: string;
831835
correctIconColor?: string;
836+
correctIconLabel?: string;
832837
};
833838

834839
/**

src/core/features/search/components/global-search-result/global-search-result.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class CoreSearchGlobalSearchResultComponent implements OnChanges {
6161
*/
6262
private computeRenderedIcon(): string | null {
6363
return this.result.module?.name === 'forum' && this.result.module.area === 'post'
64-
? 'fa-message'
64+
? 'fas-message'
6565
: null;
6666
}
6767

0 commit comments

Comments
 (0)