From 361fa4ee989cef6b0a54966f35b120b8fcf09930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 19 Aug 2024 10:12:48 +0200 Subject: [PATCH 1/2] MOBILE-4638 chore: Adapt icons to match LMS on MDL-82497 --- .../messages/pages/discussion/discussion.ts | 2 +- .../component/addon-qtype-calculated.html | 2 +- .../ordering/component/addon-qtype-ordering.html | 6 +++--- src/addons/qtype/ordering/component/ordering.ts | 4 +++- .../component/addon-qtype-shortanswer.html | 2 +- .../components/audio-recorder/audio-recorder.html | 2 +- .../features/grades/services/grades-helper.ts | 15 ++++++++++++--- src/core/features/mainmenu/services/mainmenu.ts | 2 +- .../question/classes/base-question-component.ts | 9 +++++++-- .../global-search-result/global-search-result.ts | 2 +- 10 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/addons/messages/pages/discussion/discussion.ts b/src/addons/messages/pages/discussion/discussion.ts index 9f0f18050..7fa11ca02 100644 --- a/src/addons/messages/pages/discussion/discussion.ts +++ b/src/addons/messages/pages/discussion/discussion.ts @@ -96,7 +96,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView groupMessagingEnabled: boolean; isGroup = false; members: {[id: number]: AddonMessagesConversationMember} = {}; // Members that wrote a message, indexed by ID. - favouriteIcon = 'fa-star'; + favouriteIcon = 'fas-star'; deleteIcon = 'fas-trash'; blockIcon = 'fas-user-lock'; addRemoveIcon = 'fas-user-plus'; diff --git a/src/addons/qtype/calculated/component/addon-qtype-calculated.html b/src/addons/qtype/calculated/component/addon-qtype-calculated.html index 9767e13cc..e9a643c33 100644 --- a/src/addons/qtype/calculated/component/addon-qtype-calculated.html +++ b/src/addons/qtype/calculated/component/addon-qtype-calculated.html @@ -29,7 +29,7 @@ + [name]="question.input.correctIcon" [color]="[question.input.correctIconColor]" [ariaLabel]="question.input.correctIconLabel" /> diff --git a/src/addons/qtype/ordering/component/addon-qtype-ordering.html b/src/addons/qtype/ordering/component/addon-qtype-ordering.html index 986c3514e..14675811c 100644 --- a/src/addons/qtype/ordering/component/addon-qtype-ordering.html +++ b/src/addons/qtype/ordering/component/addon-qtype-ordering.html @@ -19,11 +19,11 @@ @if (dragDisabled) { @if (item.correctClass === 'correct') { - + } @else if (item.correctClass === 'incorrect') { - + } @else if (item.correctClass.startsWith('partial')) { - + } } diff --git a/src/addons/qtype/ordering/component/ordering.ts b/src/addons/qtype/ordering/component/ordering.ts index bd4da3eda..89e68a4f3 100644 --- a/src/addons/qtype/ordering/component/ordering.ts +++ b/src/addons/qtype/ordering/component/ordering.ts @@ -74,7 +74,9 @@ export class AddonQtypeOrderingComponent extends CoreQuestionBaseComponent { // Remove correctness icons from the content. const itemContentEl = element.querySelector('[data-itemcontent]'); - itemContentEl?.querySelector('.icon.fa-check, .icon.fa-remove, .icon.fa-check-square')?.remove(); + itemContentEl?.querySelector( + '.icon.fa-check, .icon.fa-remove, .icon.fa-check-square, .icon.fa-check-double, .icon.fa-xmark', + )?.remove(); return { id: element.id, diff --git a/src/addons/qtype/shortanswer/component/addon-qtype-shortanswer.html b/src/addons/qtype/shortanswer/component/addon-qtype-shortanswer.html index ff6c2bf61..d91318545 100644 --- a/src/addons/qtype/shortanswer/component/addon-qtype-shortanswer.html +++ b/src/addons/qtype/shortanswer/component/addon-qtype-shortanswer.html @@ -11,6 +11,6 @@ [attr.name]="question.input.name" [value]="question.input.value" autocorrect="off" [disabled]="question.input.readOnly" [label]="'addon.mod_quiz.answercolon' | translate" /> + [color]="[question.input.correctIconColor]" [ariaLabel]="question.input.correctIconLabel" /> diff --git a/src/core/features/fileuploader/components/audio-recorder/audio-recorder.html b/src/core/features/fileuploader/components/audio-recorder/audio-recorder.html index b309bfa6b..6ae9099d8 100644 --- a/src/core/features/fileuploader/components/audio-recorder/audio-recorder.html +++ b/src/core/features/fileuploader/components/audio-recorder/audio-recorder.html @@ -43,7 +43,7 @@
- +
diff --git a/src/core/features/grades/services/grades-helper.ts b/src/core/features/grades/services/grades-helper.ts index e7a6b6632..d09fa96c8 100644 --- a/src/core/features/grades/services/grades-helper.ts +++ b/src/core/features/grades/services/grades-helper.ts @@ -553,7 +553,11 @@ export class CoreGradesHelperProvider { row.itemtype = 'agg_sum'; row.icon = 'moodle-agg-sum'; row.iconAlt = Translate.instant('core.grades.aggregatesum'); - } else if (text.indexOf('/outcomes') > -1 || text.indexOf('fa-tasks') > -1 || text.indexOf('fa-list-check') > -1) { + } else if ( + text.indexOf('/outcomes') > -1 || + text.indexOf('fa-tasks') > -1 || + text.indexOf('fa-list-check') > -1 + ) { row.itemtype = 'outcome'; row.icon = 'fas-list-check'; row.iconAlt = Translate.instant('core.grades.outcome'); @@ -561,9 +565,14 @@ export class CoreGradesHelperProvider { row.itemtype = 'category'; row.icon = 'fas-folder'; row.iconAlt = Translate.instant('core.grades.category'); - } else if (text.indexOf('/manual_item') > -1 || text.indexOf('fa-square-o') > -1) { + } else if ( + text.indexOf('/manual_item') > -1 || + text.indexOf('fa-square-o') > -1 || + text.indexOf('fa-pencil-square-o') > -1 || + text.indexOf('fa-pen-to-square') > -1 + ) { row.itemtype = 'manual'; - row.icon = 'far-square'; + row.icon = 'fas-pen-to-square'; row.iconAlt = Translate.instant('core.grades.manualitem'); } else if (text.indexOf('/calc') > -1 || text.indexOf('fa-calculator') > -1) { row.itemtype = 'calc'; diff --git a/src/core/features/mainmenu/services/mainmenu.ts b/src/core/features/mainmenu/services/mainmenu.ts index 58ee9df22..1ad919e16 100644 --- a/src/core/features/mainmenu/services/mainmenu.ts +++ b/src/core/features/mainmenu/services/mainmenu.ts @@ -113,7 +113,7 @@ export class CoreMainMenuProvider { const id = url + '#' + type; if (!icon) { // Icon not defined, use default one. - icon = type == 'embedded' ? 'fa-expand' : 'fa-link'; // @todo Find a better icon for embedded. + icon = type == 'embedded' ? 'fas-expand' : 'fas-link'; // @todo Find a better icon for embedded. } if (!map[id]) { diff --git a/src/core/features/question/classes/base-question-component.ts b/src/core/features/question/classes/base-question-component.ts index 2c7c13cd5..33e67ada1 100644 --- a/src/core/features/question/classes/base-question-component.ts +++ b/src/core/features/question/classes/base-question-component.ts @@ -494,18 +494,22 @@ export class CoreQuestionBaseComponent Date: Mon, 19 Aug 2024 10:13:08 +0200 Subject: [PATCH 2/2] MOBILE-4638 data: Remove deprecated language string --- scripts/langindex.json | 2 +- .../index/addon-mod-data-index.html | 8 ++++---- src/addons/mod/data/components/index/index.ts | 4 ++-- src/addons/mod/data/lang.json | 2 +- .../mod/data/tests/behat/entries.feature | 20 +++++++++---------- src/addons/mod/data/tests/behat/sync.feature | 6 +++--- .../comments/tests/behat/basic_usage.feature | 4 ++-- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/scripts/langindex.json b/scripts/langindex.json index aebe2caf0..c741bd67b 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -546,7 +546,7 @@ "addon.mod_choice.userchoosethisoption": "choice", "addon.mod_choice.yourselection": "choice", "addon.mod_data.actionsmenu": "data", - "addon.mod_data.addentries": "data", + "addon.mod_data.add": "data", "addon.mod_data.advancedsearch": "data", "addon.mod_data.alttext": "data", "addon.mod_data.approve": "data", diff --git a/src/addons/mod/data/components/index/addon-mod-data-index.html b/src/addons/mod/data/components/index/addon-mod-data-index.html index d521f8e60..c2bf4e15b 100644 --- a/src/addons/mod/data/components/index/addon-mod-data-index.html +++ b/src/addons/mod/data/components/index/addon-mod-data-index.html @@ -4,8 +4,8 @@