From 93dad58ebe0ec7c22f646f247bb2f247ba572eda Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 23 Nov 2023 15:25:36 +0100 Subject: [PATCH] MOBILE-3947 app: Fix linting errors --- .../pages/issued-badge/issued-badge.html | 4 +- .../myoverview/addon-block-myoverview.html | 2 +- .../addon-block-recentlyaccessedcourses.html | 2 +- .../addon-block-starredcourses.html | 2 +- src/addons/blog/pages/entries/entries.html | 4 +- .../calendar/addon-calendar-calendar.html | 2 +- .../calendar/pages/edit-event/edit-event.html | 2 +- .../pages/competency/competency.html | 4 +- .../coursecompetencies.html | 6 +-- src/addons/competency/pages/plan/plan.html | 2 +- .../services/coursecompletion.ts | 3 +- .../mediaplugin/classes/videojs-ogvjs.ts | 22 +++++----- .../messages/pages/contacts-35/contacts.html | 2 +- .../messages/pages/contacts/contacts.html | 4 +- .../messages/pages/discussion/discussion.html | 2 +- .../pages/discussions-35/discussions.html | 4 +- .../group-conversations.html | 14 +++---- src/addons/messages/pages/search/search.html | 2 +- .../addon-mod-assign-submission.html | 20 +++++----- .../index/addon-mod-book-index.html | 2 +- src/addons/mod/book/components/toc/toc.html | 5 ++- .../components/users-modal/users-modal.html | 4 +- src/addons/mod/chat/pages/chat/chat.html | 2 +- .../session-messages/session-messages.html | 2 +- .../components/actionsmenu/actionsmenu.ts | 2 +- .../index/addon-mod-folder-index.html | 2 +- .../mod/forum/components/post/post.html | 2 +- .../sort-order-selector.html | 2 +- src/addons/mod/imscp/components/toc/toc.html | 2 +- .../index/addon-mod-lesson-index.html | 40 +++++++++---------- .../components/menu-modal/menu-modal.html | 2 +- .../navigation-modal/navigation-modal.html | 6 +-- src/addons/mod/quiz/pages/player/player.html | 2 +- .../index/addon-mod-scorm-index.html | 16 ++++---- src/addons/mod/scorm/components/toc/toc.html | 2 +- .../index/addon-mod-survey-index.html | 4 +- src/addons/mod/wiki/components/map/map.html | 2 +- .../addon-mod-workshop-assessment.html | 2 +- .../index/addon-mod-workshop-index.html | 14 +++---- .../mod/workshop/components/phase/phase.html | 8 ++-- .../workshop/pages/assessment/assessment.html | 2 +- src/addons/notes/pages/list/list.html | 2 +- .../pages/course-storage/course-storage.html | 14 +++---- .../addon-user-profile-field-checkbox.html | 4 +- .../FrameElementController.ts | 2 +- src/core/classes/sites/authenticated-site.ts | 5 +-- src/core/classes/sites/site.ts | 2 +- .../classes/sites/unauthenticated-site.ts | 2 +- .../core-download-refresh.html | 6 +-- .../tabs-outlet/core-tabs-outlet.html | 8 ++-- .../autologout/services/autologout.ts | 2 +- .../components/side-blocks/side-blocks.html | 2 +- .../course-format/course-format.html | 6 +-- .../components/course-index/course-index.html | 4 +- .../module-description/module-description.ts | 2 +- .../pages/course-summary/course-summary.html | 2 +- .../features/course/pages/index/index.html | 2 +- src/core/features/course/services/course.ts | 3 +- .../core-courses-course-list-item.html | 4 +- .../course-progress/course-progress.ts | 2 +- .../courses/services/courses-helper.ts | 4 +- src/core/features/courses/services/courses.ts | 4 +- .../features/courses/services/dashboard.ts | 3 +- .../features/filter/services/filter-helper.ts | 2 +- .../site-onboarding/site-onboarding.html | 6 +-- .../features/mainmenu/pages/home/home.html | 2 +- .../features/mainmenu/pages/menu/menu.html | 4 +- .../components/rate/core-rating-rate.html | 2 +- .../components/ratings/ratings-modal.html | 2 +- .../reportbuilder/services/reportbuilder.ts | 2 +- .../settings/pages/licenses/licenses.ts | 3 +- src/core/services/lang.ts | 3 +- src/core/services/sites.ts | 3 +- src/core/services/ws.ts | 6 +-- src/core/singletons/icons.ts | 4 +- src/core/singletons/subscriptions.ts | 10 ++--- src/core/utils/rxjs.ts | 25 +----------- src/core/utils/tests/rxjs.test.ts | 32 +-------------- 78 files changed, 186 insertions(+), 233 deletions(-) diff --git a/src/addons/badges/pages/issued-badge/issued-badge.html b/src/addons/badges/pages/issued-badge/issued-badge.html index abb339c92..7a609db0b 100644 --- a/src/addons/badges/pages/issued-badge/issued-badge.html +++ b/src/addons/badges/pages/issued-badge/issued-badge.html @@ -217,7 +217,7 @@

{{ relatedBadge.name }}

- +

{{ 'addon.badges.norelated' | translate}}

@@ -237,7 +237,7 @@

{{ alignment.targetname }}

- +

{{ 'addon.badges.noalignment' | translate}}

diff --git a/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html b/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html index 176c08c90..1a1f2e148 100644 --- a/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html +++ b/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html @@ -99,7 +99,7 @@ - +

{{'addon.block_myoverview.noresult' | translate}}

diff --git a/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/addon-block-recentlyaccessedcourses.html b/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/addon-block-recentlyaccessedcourses.html index 66e1245d7..ea4e9891a 100644 --- a/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/addon-block-recentlyaccessedcourses.html +++ b/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/addon-block-recentlyaccessedcourses.html @@ -8,7 +8,7 @@ -
-
{{ 'addon.blog.showonlyyourentries' | translate }} - + - + diff --git a/src/addons/calendar/components/calendar/addon-calendar-calendar.html b/src/addons/calendar/components/calendar/addon-calendar-calendar.html index 3578f740c..02bab4b3b 100644 --- a/src/addons/calendar/components/calendar/addon-calendar-calendar.html +++ b/src/addons/calendar/components/calendar/addon-calendar-calendar.html @@ -71,7 +71,7 @@
-
diff --git a/src/addons/calendar/pages/edit-event/edit-event.html b/src/addons/calendar/pages/edit-event/edit-event.html index 102ac07dc..09a702814 100644 --- a/src/addons/calendar/pages/edit-event/edit-event.html +++ b/src/addons/calendar/pages/edit-event/edit-event.html @@ -41,7 +41,7 @@

{{ 'addon.calendar.eventkind' | translate }}

-

{{eventTypes[0].name | translate }}

+

{{eventTypes[0].name | translate }}

diff --git a/src/addons/competency/pages/competency/competency.html b/src/addons/competency/pages/competency/competency.html index 37d6cbbcf..9d98ab3d9 100644 --- a/src/addons/competency/pages/competency/competency.html +++ b/src/addons/competency/pages/competency/competency.html @@ -86,7 +86,7 @@

{{ 'addon.competency.activities' | translate }}

-

+

{{ 'addon.competency.noactivities' | translate }}

{{ 'addon.competency.evidence' | translate }}

-

+

{{ 'addon.competency.noevidence' | translate }}

diff --git a/src/addons/competency/pages/coursecompetencies/coursecompetencies.html b/src/addons/competency/pages/coursecompetencies/coursecompetencies.html index 5d5369b94..687d8f88c 100644 --- a/src/addons/competency/pages/coursecompetencies/coursecompetencies.html +++ b/src/addons/competency/pages/coursecompetencies/coursecompetencies.html @@ -58,7 +58,7 @@
- @@ -121,7 +121,7 @@

{{ 'addon.competency.activities' | translate }}

-

+

{{ 'addon.competency.noactivities' | translate }}

{{ 'addon.competency.userplans' | translate }}

-

+

{{ 'addon.competency.nouserplanswithcompetency' | translate }}

{{ 'addon.competency.learningplancompetencies' | translate }} - +

{{ 'addon.competency.nocompetencies' | translate }}

diff --git a/src/addons/coursecompletion/services/coursecompletion.ts b/src/addons/coursecompletion/services/coursecompletion.ts index 53825c48c..44c1e1e5f 100644 --- a/src/addons/coursecompletion/services/coursecompletion.ts +++ b/src/addons/coursecompletion/services/coursecompletion.ts @@ -21,9 +21,10 @@ import { CoreSite } from '@classes/sites/site'; import { CoreStatusWithWarningsWSResponse, CoreWSExternalWarning } from '@services/ws'; import { makeSingleton } from '@singletons'; import { CoreError } from '@classes/errors/error'; -import { asyncObservable, firstValueFrom } from '@/core/utils/rxjs'; +import { asyncObservable } from '@/core/utils/rxjs'; import { map } from 'rxjs/operators'; import { CoreSiteWSPreSets, WSObservable } from '@classes/sites/authenticated-site'; +import { firstValueFrom } from 'rxjs'; const ROOT_CACHE_KEY = 'mmaCourseCompletion:'; diff --git a/src/addons/filter/mediaplugin/classes/videojs-ogvjs.ts b/src/addons/filter/mediaplugin/classes/videojs-ogvjs.ts index 151d4c235..e3a2aaf43 100644 --- a/src/addons/filter/mediaplugin/classes/videojs-ogvjs.ts +++ b/src/addons/filter/mediaplugin/classes/videojs-ogvjs.ts @@ -147,7 +147,7 @@ export class VideoJSOgvJS extends Tech { if (el.hasOwnProperty(name)) { el[name] = value; } - }; + } /** * Check if browser/device is supported by Ogv.JS. @@ -156,7 +156,7 @@ export class VideoJSOgvJS extends Tech { */ static isSupported(): boolean { return OGVCompat.supported('OGVPlayer'); - }; + } /** * Check if the tech can support the given type. @@ -166,7 +166,7 @@ export class VideoJSOgvJS extends Tech { */ static canPlayType(type: string): string { return (type.indexOf('/ogg') !== -1 || type.indexOf('/webm')) ? 'maybe' : ''; - }; + } /** * Check if the tech can support the given source. @@ -176,7 +176,7 @@ export class VideoJSOgvJS extends Tech { */ static canPlaySource(srcObj: TechSourceObject): string { return VideoJSOgvJS.canPlayType(srcObj.type); - }; + } /** * Check if the volume can be changed in this browser/device. @@ -194,7 +194,7 @@ export class VideoJSOgvJS extends Tech { // eslint-disable-next-line no-prototype-builtins return player.hasOwnProperty('volume'); - }; + } /** * Check if the volume can be muted in this browser/device. @@ -203,7 +203,7 @@ export class VideoJSOgvJS extends Tech { */ static canMuteVolume(): boolean { return true; - }; + } /** * Check if the playback rate can be changed in this browser/device. @@ -212,7 +212,7 @@ export class VideoJSOgvJS extends Tech { */ static canControlPlaybackRate(): boolean { return true; - }; + } /** * Check to see if native 'TextTracks' are supported by this browser/device. @@ -221,7 +221,7 @@ export class VideoJSOgvJS extends Tech { */ static supportsNativeTextTracks(): boolean { return false; - }; + } /** * Check if the fullscreen resize is supported by this browser/device. @@ -230,7 +230,7 @@ export class VideoJSOgvJS extends Tech { */ static supportsFullscreenResize(): boolean { return true; - }; + } /** * Check if the progress events is supported by this browser/device. @@ -239,7 +239,7 @@ export class VideoJSOgvJS extends Tech { */ static supportsProgressEvents(): boolean { return true; - }; + } /** * Check if the time update events is supported by this browser/device. @@ -248,7 +248,7 @@ export class VideoJSOgvJS extends Tech { */ static supportsTimeupdateEvents(): boolean { return true; - }; + } /** * Create the 'OgvJS' Tech's DOM element. diff --git a/src/addons/messages/pages/contacts-35/contacts.html b/src/addons/messages/pages/contacts-35/contacts.html index e79d83c11..4086c4c08 100644 --- a/src/addons/messages/pages/contacts-35/contacts.html +++ b/src/addons/messages/pages/contacts-35/contacts.html @@ -43,7 +43,7 @@ + [attr.aria-current]="contact.id === discussionUserId ? 'page' : 'false'">

{{ contact.fullname }}

diff --git a/src/addons/messages/pages/contacts/contacts.html b/src/addons/messages/pages/contacts/contacts.html index 1ac693568..5903b00ee 100644 --- a/src/addons/messages/pages/contacts/contacts.html +++ b/src/addons/messages/pages/contacts/contacts.html @@ -29,7 +29,7 @@ + [attr.aria-current]="contact.id === selectedUserId ? 'page' : 'false'"> @@ -67,7 +67,7 @@ + [attr.aria-current]="request.id === selectedUserId ? 'page' : 'false'" [detail]="true"> diff --git a/src/addons/messages/pages/discussion/discussion.html b/src/addons/messages/pages/discussion/discussion.html index 0e402e14f..3a6610ec0 100644 --- a/src/addons/messages/pages/discussion/discussion.html +++ b/src/addons/messages/pages/discussion/discussion.html @@ -76,7 +76,7 @@ {{ message.timecreated | coreFormatDate: "strftimedayshort" }} - + {{ 'addon.messages.newmessages' | translate }} diff --git a/src/addons/messages/pages/discussions-35/discussions.html b/src/addons/messages/pages/discussions-35/discussions.html index a95d142d8..a778f18f2 100644 --- a/src/addons/messages/pages/discussions-35/discussions.html +++ b/src/addons/messages/pages/discussions-35/discussions.html @@ -46,7 +46,7 @@ + [attr.aria-current]="result.userid === discussionUserId ? 'page' : 'false'" [detail]="false">

{{ result.fullname }}

@@ -60,7 +60,7 @@ + [attr.aria-current]="discussion.message!.user === discussionUserId ? 'page' : 'false'" [detail]="false">
diff --git a/src/addons/messages/pages/group-conversations/group-conversations.html b/src/addons/messages/pages/group-conversations/group-conversations.html index eb9e0fdd7..7a9af7157 100644 --- a/src/addons/messages/pages/group-conversations/group-conversations.html +++ b/src/addons/messages/pages/group-conversations/group-conversations.html @@ -60,7 +60,7 @@ - +

{{ 'addon.messages.nofavourites' | translate }}

@@ -94,7 +94,7 @@ - +

{{ 'addon.messages.nogroupconversations' | translate }}

@@ -128,7 +128,7 @@ - +

{{ 'addon.messages.noindividualconversations' | translate }}

@@ -150,17 +150,17 @@ - + - @@ -189,7 +189,7 @@ {{ 'addon.messages.you' | translate }} - {{ conversation.members[0].fullname + ':' }} diff --git a/src/addons/messages/pages/search/search.html b/src/addons/messages/pages/search/search.html index 72cc82dfe..933c0b2bb 100644 --- a/src/addons/messages/pages/search/search.html +++ b/src/addons/messages/pages/search/search.html @@ -45,7 +45,7 @@ + (click)="openConversation(result)" [attr.aria-current]="result === selectedResult ? 'page' : 'false'" [detail]="true" button>

diff --git a/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html b/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html index 475acc689..fc5a16654 100644 --- a/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html +++ b/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html @@ -45,11 +45,11 @@

{{ 'addon.mod_assign.attemptnumber' | translate }}

-

+

{{ 'addon.mod_assign.outof' | translate : {'$a': {'current': currentAttempt, 'total': maxAttemptsText} } }}

-

+

{{ 'addon.mod_assign.outof' | translate : {'$a': {'current': currentAttempt, 'total': assign!.maxattempts} } }}

@@ -128,7 +128,7 @@ + *ngIf="userSubmission && userSubmission!.status !== statusNew && userSubmission!.timemodified">

{{ 'addon.mod_assign.timemodified' | translate }}

{{ userSubmission!.timemodified * 1000 | coreFormatDate }}

@@ -175,7 +175,7 @@ + (!userSubmission || !userSubmission!.status || userSubmission!.status === statusNew)"> {{ 'addon.mod_assign.addsubmission' | translate }} @@ -184,7 +184,7 @@ - + {{ 'addon.mod_assign.addnewattemptfromprevious' | translate }} @@ -195,8 +195,8 @@ + userSubmission!.status && userSubmission!.status !== statusNew && + userSubmission!.status !== statusReopened" (click)="goToEdit()"> {{ 'addon.mod_assign.editsubmission' | translate }} @@ -367,15 +367,15 @@
- +

{{ 'addon.mod_assign.attemptsettings' | translate }}

-

+

{{ 'addon.mod_assign.outof' | translate : {'$a': {'current': currentAttempt, 'total': maxAttemptsText} } }}

-

+

{{ 'addon.mod_assign.outof' | translate : {'$a': {'current': currentAttempt, 'total': assign!.maxattempts} } }}

diff --git a/src/addons/mod/book/components/index/addon-mod-book-index.html b/src/addons/mod/book/components/index/addon-mod-book-index.html index 4d62979c4..704677aee 100644 --- a/src/addons/mod/book/components/index/addon-mod-book-index.html +++ b/src/addons/mod/book/components/index/addon-mod-book-index.html @@ -23,7 +23,7 @@ -

+

{{chapter.indexNumber}} diff --git a/src/addons/mod/book/components/toc/toc.html b/src/addons/mod/book/components/toc/toc.html index f633ab0ff..64a99d665 100644 --- a/src/addons/mod/book/components/toc/toc.html +++ b/src/addons/mod/book/components/toc/toc.html @@ -14,9 +14,10 @@