From 3e44a3c17415e94137c94f680efe217076af37a5 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 12 Aug 2021 14:03:13 +0200 Subject: [PATCH] MOBILE-3833 chore: Clean up initializers --- src/addons/badges/badges.module.ts | 3 +-- src/addons/blog/blog.module.ts | 3 +-- src/addons/calendar/calendar.module.ts | 3 +-- src/addons/competency/competency.module.ts | 3 +-- src/addons/coursecompletion/coursecompletion.module.ts | 3 +-- src/addons/filter/activitynames/activitynames.module.ts | 3 +-- src/addons/filter/algebra/algebra.module.ts | 3 +-- src/addons/filter/censor/censor.module.ts | 3 +-- src/addons/filter/data/data.module.ts | 3 +-- src/addons/filter/displayh5p/displayh5p.module.ts | 3 +-- src/addons/filter/emailprotect/emailprotect.module.ts | 3 +-- src/addons/filter/emoticon/emoticon.module.ts | 3 +-- src/addons/filter/glossary/glossary.module.ts | 3 +-- src/addons/filter/mathjaxloader/mathjaxloader.module.ts | 3 +-- src/addons/filter/mediaplugin/mediaplugin.module.ts | 3 +-- src/addons/filter/multilang/multilang.module.ts | 3 +-- src/addons/filter/tex/tex.module.ts | 3 +-- src/addons/filter/tidy/tidy.module.ts | 3 +-- src/addons/filter/urltolink/urltolink.module.ts | 3 +-- src/addons/messageoutput/airnotifier/airnotifier.module.ts | 3 +-- src/addons/messages/messages.module.ts | 3 +-- src/addons/mod/assign/assign.module.ts | 3 +-- src/addons/mod/assign/feedback/comments/comments.module.ts | 3 +-- src/addons/mod/assign/feedback/editpdf/editpdf.module.ts | 3 +-- src/addons/mod/assign/feedback/file/file.module.ts | 3 +-- .../mod/assign/submission/comments/comments.module.ts | 3 +-- src/addons/mod/assign/submission/file/file.module.ts | 3 +-- .../mod/assign/submission/onlinetext/onlinetext.module.ts | 3 +-- src/addons/mod/book/book.module.ts | 3 +-- src/addons/mod/chat/chat.module.ts | 3 +-- src/addons/mod/choice/choice.module.ts | 3 +-- src/addons/mod/data/data.module.ts | 3 +-- src/addons/mod/data/fields/checkbox/checkbox.module.ts | 3 +-- src/addons/mod/data/fields/date/date.module.ts | 3 +-- src/addons/mod/data/fields/file/file.module.ts | 3 +-- src/addons/mod/data/fields/latlong/latlong.module.ts | 3 +-- src/addons/mod/data/fields/menu/menu.module.ts | 3 +-- src/addons/mod/data/fields/multimenu/multimenu.module.ts | 3 +-- src/addons/mod/data/fields/number/number.module.ts | 3 +-- src/addons/mod/data/fields/picture/picture.module.ts | 3 +-- .../mod/data/fields/radiobutton/radiobutton.module.ts | 3 +-- src/addons/mod/data/fields/text/text.module.ts | 3 +-- src/addons/mod/data/fields/textarea/textarea.module.ts | 3 +-- src/addons/mod/data/fields/url/url.module.ts | 3 +-- src/addons/mod/feedback/feedback.module.ts | 3 +-- src/addons/mod/folder/folder.module.ts | 3 +-- src/addons/mod/glossary/glossary.module.ts | 3 +-- src/addons/mod/h5pactivity/h5pactivity.module.ts | 3 +-- src/addons/mod/imscp/imscp.module.ts | 3 +-- src/addons/mod/label/label.module.ts | 3 +-- src/addons/mod/lesson/lesson.module.ts | 3 +-- src/addons/mod/lti/lti.module.ts | 6 +++--- src/addons/mod/page/page.module.ts | 3 +-- .../delaybetweenattempts/delaybetweenattempts.module.ts | 3 +-- .../mod/quiz/accessrules/ipaddress/ipaddress.module.ts | 3 +-- .../mod/quiz/accessrules/numattempts/numattempts.module.ts | 3 +-- .../accessrules/offlineattempts/offlineattempts.module.ts | 3 +-- .../quiz/accessrules/openclosedate/openclosedate.module.ts | 3 +-- src/addons/mod/quiz/accessrules/password/password.module.ts | 3 +-- .../mod/quiz/accessrules/safebrowser/safebrowser.module.ts | 3 +-- .../quiz/accessrules/securewindow/securewindow.module.ts | 3 +-- .../mod/quiz/accessrules/timelimit/timelimit.module.ts | 3 +-- src/addons/mod/quiz/quiz.module.ts | 3 +-- src/addons/mod/resource/resource.module.ts | 3 +-- src/addons/mod/scorm/scorm.module.ts | 3 +-- src/addons/mod/survey/survey.module.ts | 3 +-- src/addons/mod/url/url.module.ts | 3 +-- src/addons/mod/wiki/wiki.module.ts | 3 +-- .../workshop/assessment/accumulative/accumulative.module.ts | 3 +-- .../mod/workshop/assessment/comments/comments.module.ts | 3 +-- .../mod/workshop/assessment/numerrors/numerrors.module.ts | 3 +-- src/addons/mod/workshop/assessment/rubric/rubric.module.ts | 3 +-- src/addons/mod/workshop/workshop.module.ts | 3 +-- src/addons/notes/notes.module.ts | 3 +-- src/addons/notifications/notifications.module.ts | 3 +-- src/addons/privatefiles/privatefiles.module.ts | 3 +-- src/addons/qbehaviour/adaptive/adaptive.module.ts | 3 +-- .../adaptivenopenalty/adaptivenopenalty.module.ts | 3 +-- src/addons/qbehaviour/deferredcbm/deferredcbm.module.ts | 3 +-- .../qbehaviour/deferredfeedback/deferredfeedback.module.ts | 3 +-- src/addons/qbehaviour/immediatecbm/immediatecbm.module.ts | 3 +-- .../immediatefeedback/immediatefeedback.module.ts | 3 +-- .../qbehaviour/informationitem/informationitem.module.ts | 3 +-- src/addons/qbehaviour/interactive/interactive.module.ts | 3 +-- .../interactivecountback/interactivecountback.module.ts | 3 +-- src/addons/qbehaviour/manualgraded/manualgraded.module.ts | 3 +-- src/addons/qtype/calculated/calculated.module.ts | 3 +-- src/addons/qtype/calculatedmulti/calculatedmulti.module.ts | 3 +-- .../qtype/calculatedsimple/calculatedsimple.module.ts | 3 +-- src/addons/qtype/ddimageortext/ddimageortext.module.ts | 3 +-- src/addons/qtype/ddmarker/ddmarker.module.ts | 3 +-- src/addons/qtype/ddwtos/ddwtos.module.ts | 3 +-- src/addons/qtype/description/description.module.ts | 3 +-- src/addons/qtype/essay/essay.module.ts | 3 +-- src/addons/qtype/gapselect/gapselect.module.ts | 3 +-- src/addons/qtype/match/match.module.ts | 3 +-- src/addons/qtype/multianswer/multianswer.module.ts | 3 +-- src/addons/qtype/multichoice/multichoice.module.ts | 3 +-- src/addons/qtype/numerical/numerical.module.ts | 3 +-- src/addons/qtype/randomsamatch/randomsamatch.module.ts | 3 +-- src/addons/qtype/shortanswer/shortanswer.module.ts | 3 +-- src/addons/qtype/truefalse/truefalse.module.ts | 3 +-- src/addons/remotethemes/remotethemes.module.ts | 3 +-- src/addons/storagemanager/storagemanager.module.ts | 3 +-- src/addons/userprofilefield/checkbox/checkbox.module.ts | 6 +++--- src/addons/userprofilefield/datetime/datetime.module.ts | 6 +++--- src/addons/userprofilefield/menu/menu.module.ts | 6 +++--- src/addons/userprofilefield/text/text.module.ts | 6 +++--- src/addons/userprofilefield/textarea/textarea.module.ts | 6 +++--- src/app/app.module.ts | 5 ++--- src/core/features/course/course.module.ts | 3 +-- .../course/format/singleactivity/singleactivity.module.ts | 3 +-- src/core/features/course/format/social/social.module.ts | 3 +-- src/core/features/course/format/topics/topics.module.ts | 3 +-- src/core/features/course/format/weeks/weeks.module.ts | 3 +-- src/core/features/courses/courses.module.ts | 3 +-- src/core/features/fileuploader/fileuploader.module.ts | 3 +-- src/core/features/grades/grades.module.ts | 1 - src/core/features/h5p/h5p.module.ts | 3 +-- src/core/features/login/login.module.ts | 3 +-- src/core/features/mainmenu/mainmenu.module.ts | 3 +-- .../features/pushnotifications/pushnotifications.module.ts | 3 +-- src/core/features/sharedfiles/sharedfiles.module.ts | 2 +- src/core/features/sitehome/sitehome.module.ts | 3 +-- src/core/features/user/user.module.ts | 3 +-- 125 files changed, 137 insertions(+), 255 deletions(-) diff --git a/src/addons/badges/badges.module.ts b/src/addons/badges/badges.module.ts index de0fd76b9..ed210a21e 100644 --- a/src/addons/badges/badges.module.ts +++ b/src/addons/badges/badges.module.ts @@ -44,8 +44,7 @@ const mainMenuRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreContentLinksDelegate.registerHandler(AddonBadgesMyBadgesLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonBadgesBadgeLinkHandler.instance); CoreUserDelegate.registerHandler(AddonBadgesUserHandler.instance); diff --git a/src/addons/blog/blog.module.ts b/src/addons/blog/blog.module.ts index c0fc7aa94..f933599fb 100644 --- a/src/addons/blog/blog.module.ts +++ b/src/addons/blog/blog.module.ts @@ -51,8 +51,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => async () => { + useValue: () => { CoreContentLinksDelegate.registerHandler(AddonBlogIndexLinkHandler.instance); CoreMainMenuDelegate.registerHandler(AddonBlogMainMenuHandler.instance); CoreUserDelegate.registerHandler(AddonBlogUserHandler.instance); diff --git a/src/addons/calendar/calendar.module.ts b/src/addons/calendar/calendar.module.ts index 0017176f0..3f4020e31 100644 --- a/src/addons/calendar/calendar.module.ts +++ b/src/addons/calendar/calendar.module.ts @@ -63,8 +63,7 @@ const mainMenuChildrenRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => async () => { + useValue: async () => { CoreContentLinksDelegate.registerHandler(AddonCalendarViewLinkHandler.instance); CoreMainMenuDelegate.registerHandler(AddonCalendarMainMenuHandler.instance); CoreCronDelegate.register(AddonCalendarSyncCronHandler.instance); diff --git a/src/addons/competency/competency.module.ts b/src/addons/competency/competency.module.ts index e8a96e9e8..9e08180da 100644 --- a/src/addons/competency/competency.module.ts +++ b/src/addons/competency/competency.module.ts @@ -64,8 +64,7 @@ const courseIndexRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => async () => { + useValue: () => { CoreContentLinksDelegate.registerHandler(AddonCompetencyCompetencyLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonCompetencyPlanLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonCompetencyPlansLinkHandler.instance); diff --git a/src/addons/coursecompletion/coursecompletion.module.ts b/src/addons/coursecompletion/coursecompletion.module.ts index 024980c8b..63fea73a7 100644 --- a/src/addons/coursecompletion/coursecompletion.module.ts +++ b/src/addons/coursecompletion/coursecompletion.module.ts @@ -42,8 +42,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => async () => { + useValue: () => { CoreUserDelegate.registerHandler(AddonCourseCompletionUserHandler.instance); CoreCourseOptionsDelegate.registerHandler(AddonCourseCompletionCourseOptionHandler.instance); }, diff --git a/src/addons/filter/activitynames/activitynames.module.ts b/src/addons/filter/activitynames/activitynames.module.ts index 1aa7ac805..48c4b1e43 100644 --- a/src/addons/filter/activitynames/activitynames.module.ts +++ b/src/addons/filter/activitynames/activitynames.module.ts @@ -26,8 +26,7 @@ import { AddonFilterActivityNamesHandler } from './services/handlers/activitynam { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterActivityNamesHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterActivityNamesHandler.instance), }, ], }) diff --git a/src/addons/filter/algebra/algebra.module.ts b/src/addons/filter/algebra/algebra.module.ts index 8fe37b21d..bf961e966 100644 --- a/src/addons/filter/algebra/algebra.module.ts +++ b/src/addons/filter/algebra/algebra.module.ts @@ -26,8 +26,7 @@ import { AddonFilterAlgebraHandler } from './services/handlers/algebra'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterAlgebraHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterAlgebraHandler.instance), }, ], }) diff --git a/src/addons/filter/censor/censor.module.ts b/src/addons/filter/censor/censor.module.ts index bdb741ab7..05672bae4 100644 --- a/src/addons/filter/censor/censor.module.ts +++ b/src/addons/filter/censor/censor.module.ts @@ -26,8 +26,7 @@ import { AddonFilterCensorHandler } from './services/handlers/censor'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterCensorHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterCensorHandler.instance), }, ], }) diff --git a/src/addons/filter/data/data.module.ts b/src/addons/filter/data/data.module.ts index fe88960d0..6da1a0b2c 100644 --- a/src/addons/filter/data/data.module.ts +++ b/src/addons/filter/data/data.module.ts @@ -26,8 +26,7 @@ import { AddonFilterDataHandler } from './services/handlers/data'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterDataHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterDataHandler.instance), }, ], }) diff --git a/src/addons/filter/displayh5p/displayh5p.module.ts b/src/addons/filter/displayh5p/displayh5p.module.ts index d40923144..ab5df85c4 100644 --- a/src/addons/filter/displayh5p/displayh5p.module.ts +++ b/src/addons/filter/displayh5p/displayh5p.module.ts @@ -26,8 +26,7 @@ import { AddonFilterDisplayH5PHandler } from './services/handlers/displayh5p'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterDisplayH5PHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterDisplayH5PHandler.instance), }, ], }) diff --git a/src/addons/filter/emailprotect/emailprotect.module.ts b/src/addons/filter/emailprotect/emailprotect.module.ts index 3793c4219..b25597acc 100644 --- a/src/addons/filter/emailprotect/emailprotect.module.ts +++ b/src/addons/filter/emailprotect/emailprotect.module.ts @@ -26,8 +26,7 @@ import { AddonFilterEmailProtectHandler } from './services/handlers/emailprotect { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterEmailProtectHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterEmailProtectHandler.instance), }, ], }) diff --git a/src/addons/filter/emoticon/emoticon.module.ts b/src/addons/filter/emoticon/emoticon.module.ts index 1e925074e..a0d562e87 100644 --- a/src/addons/filter/emoticon/emoticon.module.ts +++ b/src/addons/filter/emoticon/emoticon.module.ts @@ -26,8 +26,7 @@ import { AddonFilterEmoticonHandler } from './services/handlers/emoticon'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterEmoticonHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterEmoticonHandler.instance), }, ], }) diff --git a/src/addons/filter/glossary/glossary.module.ts b/src/addons/filter/glossary/glossary.module.ts index 6464e2c84..8061c73cf 100644 --- a/src/addons/filter/glossary/glossary.module.ts +++ b/src/addons/filter/glossary/glossary.module.ts @@ -26,8 +26,7 @@ import { AddonFilterGlossaryHandler } from './services/handlers/glossary'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterGlossaryHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterGlossaryHandler.instance), }, ], }) diff --git a/src/addons/filter/mathjaxloader/mathjaxloader.module.ts b/src/addons/filter/mathjaxloader/mathjaxloader.module.ts index 0f3aa5b60..fdabf6056 100644 --- a/src/addons/filter/mathjaxloader/mathjaxloader.module.ts +++ b/src/addons/filter/mathjaxloader/mathjaxloader.module.ts @@ -26,8 +26,7 @@ import { AddonFilterMathJaxLoaderHandler } from './services/handlers/mathjaxload { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => async () => { + useValue: async () => { CoreFilterDelegate.registerHandler(AddonFilterMathJaxLoaderHandler.instance); await AddonFilterMathJaxLoaderHandler.initialize(); diff --git a/src/addons/filter/mediaplugin/mediaplugin.module.ts b/src/addons/filter/mediaplugin/mediaplugin.module.ts index a72670098..1977bd08d 100644 --- a/src/addons/filter/mediaplugin/mediaplugin.module.ts +++ b/src/addons/filter/mediaplugin/mediaplugin.module.ts @@ -26,8 +26,7 @@ import { AddonFilterMediaPluginHandler } from './services/handlers/mediaplugin'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterMediaPluginHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterMediaPluginHandler.instance), }, ], }) diff --git a/src/addons/filter/multilang/multilang.module.ts b/src/addons/filter/multilang/multilang.module.ts index 7ffab28b7..9e4ebda2d 100644 --- a/src/addons/filter/multilang/multilang.module.ts +++ b/src/addons/filter/multilang/multilang.module.ts @@ -26,8 +26,7 @@ import { AddonFilterMultilangHandler } from './services/handlers/multilang'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterMultilangHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterMultilangHandler.instance), }, ], }) diff --git a/src/addons/filter/tex/tex.module.ts b/src/addons/filter/tex/tex.module.ts index 414d3fdc5..94e031fc5 100644 --- a/src/addons/filter/tex/tex.module.ts +++ b/src/addons/filter/tex/tex.module.ts @@ -26,8 +26,7 @@ import { AddonFilterTexHandler } from './services/handlers/tex'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterTexHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterTexHandler.instance), }, ], }) diff --git a/src/addons/filter/tidy/tidy.module.ts b/src/addons/filter/tidy/tidy.module.ts index cf1045f1e..3cfedb6d1 100644 --- a/src/addons/filter/tidy/tidy.module.ts +++ b/src/addons/filter/tidy/tidy.module.ts @@ -26,8 +26,7 @@ import { AddonFilterTidyHandler } from './services/handlers/tidy'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterTidyHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterTidyHandler.instance), }, ], }) diff --git a/src/addons/filter/urltolink/urltolink.module.ts b/src/addons/filter/urltolink/urltolink.module.ts index 48230c7dd..e5ee0667b 100644 --- a/src/addons/filter/urltolink/urltolink.module.ts +++ b/src/addons/filter/urltolink/urltolink.module.ts @@ -26,8 +26,7 @@ import { AddonFilterUrlToLinkHandler } from './services/handlers/urltolink'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => CoreFilterDelegate.registerHandler(AddonFilterUrlToLinkHandler.instance), + useValue: () => CoreFilterDelegate.registerHandler(AddonFilterUrlToLinkHandler.instance), }, ], }) diff --git a/src/addons/messageoutput/airnotifier/airnotifier.module.ts b/src/addons/messageoutput/airnotifier/airnotifier.module.ts index 99c4b1849..3e3d06870 100644 --- a/src/addons/messageoutput/airnotifier/airnotifier.module.ts +++ b/src/addons/messageoutput/airnotifier/airnotifier.module.ts @@ -39,8 +39,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonMessageOutputDelegate.registerHandler(AddonMessageOutputAirnotifierHandler.instance); }, }, diff --git a/src/addons/messages/messages.module.ts b/src/addons/messages/messages.module.ts index 251b053e9..5616c65e6 100644 --- a/src/addons/messages/messages.module.ts +++ b/src/addons/messages/messages.module.ts @@ -73,8 +73,7 @@ const preferencesRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { // Register handlers. CoreMainMenuDelegate.registerHandler(AddonMessagesMainMenuHandler.instance); CoreCronDelegate.register(AddonMessagesMainMenuHandler.instance); diff --git a/src/addons/mod/assign/assign.module.ts b/src/addons/mod/assign/assign.module.ts index 46bd253e9..001a5cf16 100644 --- a/src/addons/mod/assign/assign.module.ts +++ b/src/addons/mod/assign/assign.module.ts @@ -70,8 +70,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModAssignModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModAssignIndexLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModAssignListLinkHandler.instance); diff --git a/src/addons/mod/assign/feedback/comments/comments.module.ts b/src/addons/mod/assign/feedback/comments/comments.module.ts index 388efd827..d1be02007 100644 --- a/src/addons/mod/assign/feedback/comments/comments.module.ts +++ b/src/addons/mod/assign/feedback/comments/comments.module.ts @@ -31,8 +31,7 @@ import { AddonModAssignFeedbackDelegate } from '../../services/feedback-delegate { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModAssignFeedbackDelegate.registerHandler(AddonModAssignFeedbackCommentsHandler.instance); }, }, diff --git a/src/addons/mod/assign/feedback/editpdf/editpdf.module.ts b/src/addons/mod/assign/feedback/editpdf/editpdf.module.ts index d9c5dcb31..670975e8f 100644 --- a/src/addons/mod/assign/feedback/editpdf/editpdf.module.ts +++ b/src/addons/mod/assign/feedback/editpdf/editpdf.module.ts @@ -29,8 +29,7 @@ import { AddonModAssignFeedbackDelegate } from '../../services/feedback-delegate { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModAssignFeedbackDelegate.registerHandler(AddonModAssignFeedbackEditPdfHandler.instance); }, }, diff --git a/src/addons/mod/assign/feedback/file/file.module.ts b/src/addons/mod/assign/feedback/file/file.module.ts index 021ce1149..b1dca6200 100644 --- a/src/addons/mod/assign/feedback/file/file.module.ts +++ b/src/addons/mod/assign/feedback/file/file.module.ts @@ -29,8 +29,7 @@ import { AddonModAssignFeedbackDelegate } from '../../services/feedback-delegate { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModAssignFeedbackDelegate.registerHandler(AddonModAssignFeedbackFileHandler.instance); }, }, diff --git a/src/addons/mod/assign/submission/comments/comments.module.ts b/src/addons/mod/assign/submission/comments/comments.module.ts index 361d3a96e..49de6435e 100644 --- a/src/addons/mod/assign/submission/comments/comments.module.ts +++ b/src/addons/mod/assign/submission/comments/comments.module.ts @@ -31,8 +31,7 @@ import { CoreCommentsComponentsModule } from '@features/comments/components/comp { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModAssignSubmissionDelegate.registerHandler(AddonModAssignSubmissionCommentsHandler.instance); }, }, diff --git a/src/addons/mod/assign/submission/file/file.module.ts b/src/addons/mod/assign/submission/file/file.module.ts index ce4501efe..a71426556 100644 --- a/src/addons/mod/assign/submission/file/file.module.ts +++ b/src/addons/mod/assign/submission/file/file.module.ts @@ -29,8 +29,7 @@ import { AddonModAssignSubmissionDelegate } from '../../services/submission-dele { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModAssignSubmissionDelegate.registerHandler(AddonModAssignSubmissionFileHandler.instance); }, }, diff --git a/src/addons/mod/assign/submission/onlinetext/onlinetext.module.ts b/src/addons/mod/assign/submission/onlinetext/onlinetext.module.ts index a3d79b5c8..fd2fc8338 100644 --- a/src/addons/mod/assign/submission/onlinetext/onlinetext.module.ts +++ b/src/addons/mod/assign/submission/onlinetext/onlinetext.module.ts @@ -31,8 +31,7 @@ import { AddonModAssignSubmissionDelegate } from '../../services/submission-dele { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModAssignSubmissionDelegate.registerHandler(AddonModAssignSubmissionOnlineTextHandler.instance); }, }, diff --git a/src/addons/mod/book/book.module.ts b/src/addons/mod/book/book.module.ts index 3123cf6b6..3ac80f207 100644 --- a/src/addons/mod/book/book.module.ts +++ b/src/addons/mod/book/book.module.ts @@ -47,8 +47,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModBookModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModBookIndexLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModBookListLinkHandler.instance); diff --git a/src/addons/mod/chat/chat.module.ts b/src/addons/mod/chat/chat.module.ts index b62ca916c..62509fdd6 100644 --- a/src/addons/mod/chat/chat.module.ts +++ b/src/addons/mod/chat/chat.module.ts @@ -47,8 +47,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModChatModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModChatIndexLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModChatListLinkHandler.instance); diff --git a/src/addons/mod/choice/choice.module.ts b/src/addons/mod/choice/choice.module.ts index dffa84ac7..ed00d95a5 100644 --- a/src/addons/mod/choice/choice.module.ts +++ b/src/addons/mod/choice/choice.module.ts @@ -59,8 +59,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModChoiceModuleHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModChoicePrefetchHandler.instance); CoreCronDelegate.register(AddonModChoiceSyncCronHandler.instance); diff --git a/src/addons/mod/data/data.module.ts b/src/addons/mod/data/data.module.ts index 353592b6d..aa75d547d 100644 --- a/src/addons/mod/data/data.module.ts +++ b/src/addons/mod/data/data.module.ts @@ -71,8 +71,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModDataModuleHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModDataPrefetchHandler.instance); CoreCronDelegate.register(AddonModDataSyncCronHandler.instance); diff --git a/src/addons/mod/data/fields/checkbox/checkbox.module.ts b/src/addons/mod/data/fields/checkbox/checkbox.module.ts index beb2b7786..05331b4ac 100644 --- a/src/addons/mod/data/fields/checkbox/checkbox.module.ts +++ b/src/addons/mod/data/fields/checkbox/checkbox.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldCheckboxHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldCheckboxHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/date/date.module.ts b/src/addons/mod/data/fields/date/date.module.ts index 05d33a1e0..e32d886e3 100644 --- a/src/addons/mod/data/fields/date/date.module.ts +++ b/src/addons/mod/data/fields/date/date.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldDateHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldDateHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/file/file.module.ts b/src/addons/mod/data/fields/file/file.module.ts index e3ad12323..a77c3f05e 100644 --- a/src/addons/mod/data/fields/file/file.module.ts +++ b/src/addons/mod/data/fields/file/file.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldFileHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldFileHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/latlong/latlong.module.ts b/src/addons/mod/data/fields/latlong/latlong.module.ts index 1dc6aacc5..d7aca0e7e 100644 --- a/src/addons/mod/data/fields/latlong/latlong.module.ts +++ b/src/addons/mod/data/fields/latlong/latlong.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldLatlongHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldLatlongHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/menu/menu.module.ts b/src/addons/mod/data/fields/menu/menu.module.ts index 12a12d4fd..1d0537e0f 100644 --- a/src/addons/mod/data/fields/menu/menu.module.ts +++ b/src/addons/mod/data/fields/menu/menu.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldMenuHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldMenuHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/multimenu/multimenu.module.ts b/src/addons/mod/data/fields/multimenu/multimenu.module.ts index 3ceb09691..92da6d881 100644 --- a/src/addons/mod/data/fields/multimenu/multimenu.module.ts +++ b/src/addons/mod/data/fields/multimenu/multimenu.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldMultimenuHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldMultimenuHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/number/number.module.ts b/src/addons/mod/data/fields/number/number.module.ts index 5dd352b23..3ba78d2b6 100644 --- a/src/addons/mod/data/fields/number/number.module.ts +++ b/src/addons/mod/data/fields/number/number.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldNumberHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldNumberHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/picture/picture.module.ts b/src/addons/mod/data/fields/picture/picture.module.ts index 86806e2f2..31a352cce 100644 --- a/src/addons/mod/data/fields/picture/picture.module.ts +++ b/src/addons/mod/data/fields/picture/picture.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldPictureHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldPictureHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/radiobutton/radiobutton.module.ts b/src/addons/mod/data/fields/radiobutton/radiobutton.module.ts index ab535000c..e44ef5d27 100644 --- a/src/addons/mod/data/fields/radiobutton/radiobutton.module.ts +++ b/src/addons/mod/data/fields/radiobutton/radiobutton.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldRadiobuttonHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldRadiobuttonHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/text/text.module.ts b/src/addons/mod/data/fields/text/text.module.ts index 890f6b9c3..d5e4db055 100644 --- a/src/addons/mod/data/fields/text/text.module.ts +++ b/src/addons/mod/data/fields/text/text.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldTextHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldTextHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/textarea/textarea.module.ts b/src/addons/mod/data/fields/textarea/textarea.module.ts index 7ee21e9be..0b9a8e73f 100644 --- a/src/addons/mod/data/fields/textarea/textarea.module.ts +++ b/src/addons/mod/data/fields/textarea/textarea.module.ts @@ -31,8 +31,7 @@ import { AddonModDataFieldTextareaHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldTextareaHandler.instance); }, }, diff --git a/src/addons/mod/data/fields/url/url.module.ts b/src/addons/mod/data/fields/url/url.module.ts index 99d8250e5..c0e107890 100644 --- a/src/addons/mod/data/fields/url/url.module.ts +++ b/src/addons/mod/data/fields/url/url.module.ts @@ -29,8 +29,7 @@ import { AddonModDataFieldUrlHandler } from './services/handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModDataFieldsDelegate.registerHandler(AddonModDataFieldUrlHandler.instance); }, }, diff --git a/src/addons/mod/feedback/feedback.module.ts b/src/addons/mod/feedback/feedback.module.ts index d502a3afc..1fb74f4d0 100644 --- a/src/addons/mod/feedback/feedback.module.ts +++ b/src/addons/mod/feedback/feedback.module.ts @@ -67,8 +67,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModFeedbackModuleHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModFeedbackPrefetchHandler.instance); CoreCronDelegate.register(AddonModFeedbackSyncCronHandler.instance); diff --git a/src/addons/mod/folder/folder.module.ts b/src/addons/mod/folder/folder.module.ts index 77aa6c9cd..1094af764 100644 --- a/src/addons/mod/folder/folder.module.ts +++ b/src/addons/mod/folder/folder.module.ts @@ -49,8 +49,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModFolderModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModFolderIndexLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModFolderListLinkHandler.instance); diff --git a/src/addons/mod/glossary/glossary.module.ts b/src/addons/mod/glossary/glossary.module.ts index ee78aa70c..9a4b09793 100644 --- a/src/addons/mod/glossary/glossary.module.ts +++ b/src/addons/mod/glossary/glossary.module.ts @@ -104,8 +104,7 @@ const courseContentsRoutes: Routes = conditionalRoutes( { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModGlossaryModuleHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModGlossaryPrefetchHandler.instance); CoreCronDelegate.register(AddonModGlossarySyncCronHandler.instance); diff --git a/src/addons/mod/h5pactivity/h5pactivity.module.ts b/src/addons/mod/h5pactivity/h5pactivity.module.ts index 516b54977..91b81b124 100644 --- a/src/addons/mod/h5pactivity/h5pactivity.module.ts +++ b/src/addons/mod/h5pactivity/h5pactivity.module.ts @@ -50,8 +50,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModH5PActivityModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModH5PActivityIndexLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModH5PActivityReportLinkHandler.instance); diff --git a/src/addons/mod/imscp/imscp.module.ts b/src/addons/mod/imscp/imscp.module.ts index 8684244f8..b94674269 100644 --- a/src/addons/mod/imscp/imscp.module.ts +++ b/src/addons/mod/imscp/imscp.module.ts @@ -47,8 +47,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModImscpModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModImscpIndexLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModImscpListLinkHandler.instance); diff --git a/src/addons/mod/label/label.module.ts b/src/addons/mod/label/label.module.ts index 6c480d851..60e38b5b0 100644 --- a/src/addons/mod/label/label.module.ts +++ b/src/addons/mod/label/label.module.ts @@ -25,8 +25,7 @@ import { AddonModLabelPrefetchHandler } from './services/handlers/prefetch'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModLabelModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModLabelIndexLinkHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModLabelPrefetchHandler.instance); diff --git a/src/addons/mod/lesson/lesson.module.ts b/src/addons/mod/lesson/lesson.module.ts index 6ec9fd6e7..6957ca55f 100644 --- a/src/addons/mod/lesson/lesson.module.ts +++ b/src/addons/mod/lesson/lesson.module.ts @@ -65,8 +65,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModLessonModuleHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModLessonPrefetchHandler.instance); CoreCronDelegate.register(AddonModLessonSyncCronHandler.instance); diff --git a/src/addons/mod/lti/lti.module.ts b/src/addons/mod/lti/lti.module.ts index 8b9c43fc0..fef43da2b 100644 --- a/src/addons/mod/lti/lti.module.ts +++ b/src/addons/mod/lti/lti.module.ts @@ -44,16 +44,16 @@ const routes: Routes = [ AddonModLtiComponentsModule, ], providers: [ - { provide: APP_INITIALIZER, multi: true, useValue: () => AddonModLtiHelper.watchPendingCompletions() }, { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModLtiModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModLtiIndexLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModLtiListLinkHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModLtiPrefetchHandler.instance); + + AddonModLtiHelper.watchPendingCompletions(); }, }, ], diff --git a/src/addons/mod/page/page.module.ts b/src/addons/mod/page/page.module.ts index 10bf39c71..0eac77a47 100644 --- a/src/addons/mod/page/page.module.ts +++ b/src/addons/mod/page/page.module.ts @@ -49,8 +49,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModPageModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModPageIndexLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModPageListLinkHandler.instance); diff --git a/src/addons/mod/quiz/accessrules/delaybetweenattempts/delaybetweenattempts.module.ts b/src/addons/mod/quiz/accessrules/delaybetweenattempts/delaybetweenattempts.module.ts index 6f2b96191..537ce6c92 100644 --- a/src/addons/mod/quiz/accessrules/delaybetweenattempts/delaybetweenattempts.module.ts +++ b/src/addons/mod/quiz/accessrules/delaybetweenattempts/delaybetweenattempts.module.ts @@ -24,8 +24,7 @@ import { AddonModQuizAccessDelayBetweenAttemptsHandler } from './services/handle { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModQuizAccessRuleDelegate.registerHandler(AddonModQuizAccessDelayBetweenAttemptsHandler.instance); }, }, diff --git a/src/addons/mod/quiz/accessrules/ipaddress/ipaddress.module.ts b/src/addons/mod/quiz/accessrules/ipaddress/ipaddress.module.ts index 5f33d6adb..2b0d0e1d5 100644 --- a/src/addons/mod/quiz/accessrules/ipaddress/ipaddress.module.ts +++ b/src/addons/mod/quiz/accessrules/ipaddress/ipaddress.module.ts @@ -24,8 +24,7 @@ import { AddonModQuizAccessIpAddressHandler } from './services/handlers/ipaddres { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModQuizAccessRuleDelegate.registerHandler(AddonModQuizAccessIpAddressHandler.instance); }, }, diff --git a/src/addons/mod/quiz/accessrules/numattempts/numattempts.module.ts b/src/addons/mod/quiz/accessrules/numattempts/numattempts.module.ts index d6774518c..05312de10 100644 --- a/src/addons/mod/quiz/accessrules/numattempts/numattempts.module.ts +++ b/src/addons/mod/quiz/accessrules/numattempts/numattempts.module.ts @@ -24,8 +24,7 @@ import { AddonModQuizAccessNumAttemptsHandler } from './services/handlers/numatt { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModQuizAccessRuleDelegate.registerHandler(AddonModQuizAccessNumAttemptsHandler.instance); }, }, diff --git a/src/addons/mod/quiz/accessrules/offlineattempts/offlineattempts.module.ts b/src/addons/mod/quiz/accessrules/offlineattempts/offlineattempts.module.ts index 9f25e7429..ad07f27f7 100644 --- a/src/addons/mod/quiz/accessrules/offlineattempts/offlineattempts.module.ts +++ b/src/addons/mod/quiz/accessrules/offlineattempts/offlineattempts.module.ts @@ -30,8 +30,7 @@ import { AddonModQuizAccessOfflineAttemptsHandler } from './services/handlers/of { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModQuizAccessRuleDelegate.registerHandler(AddonModQuizAccessOfflineAttemptsHandler.instance); }, }, diff --git a/src/addons/mod/quiz/accessrules/openclosedate/openclosedate.module.ts b/src/addons/mod/quiz/accessrules/openclosedate/openclosedate.module.ts index 536df6a30..190baa87f 100644 --- a/src/addons/mod/quiz/accessrules/openclosedate/openclosedate.module.ts +++ b/src/addons/mod/quiz/accessrules/openclosedate/openclosedate.module.ts @@ -24,8 +24,7 @@ import { AddonModQuizAccessOpenCloseDateHandler } from './services/handlers/open { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModQuizAccessRuleDelegate.registerHandler(AddonModQuizAccessOpenCloseDateHandler.instance); }, }, diff --git a/src/addons/mod/quiz/accessrules/password/password.module.ts b/src/addons/mod/quiz/accessrules/password/password.module.ts index aa86a43a4..58570654b 100644 --- a/src/addons/mod/quiz/accessrules/password/password.module.ts +++ b/src/addons/mod/quiz/accessrules/password/password.module.ts @@ -37,8 +37,7 @@ import { SITE_SCHEMA } from './services/database/password'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModQuizAccessRuleDelegate.registerHandler(AddonModQuizAccessPasswordHandler.instance); }, }, diff --git a/src/addons/mod/quiz/accessrules/safebrowser/safebrowser.module.ts b/src/addons/mod/quiz/accessrules/safebrowser/safebrowser.module.ts index d7762e27d..a4f222365 100644 --- a/src/addons/mod/quiz/accessrules/safebrowser/safebrowser.module.ts +++ b/src/addons/mod/quiz/accessrules/safebrowser/safebrowser.module.ts @@ -24,8 +24,7 @@ import { AddonModQuizAccessSafeBrowserHandler } from './services/handlers/safebr { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModQuizAccessRuleDelegate.registerHandler(AddonModQuizAccessSafeBrowserHandler.instance); }, }, diff --git a/src/addons/mod/quiz/accessrules/securewindow/securewindow.module.ts b/src/addons/mod/quiz/accessrules/securewindow/securewindow.module.ts index 7a8f1da71..b83e8a185 100644 --- a/src/addons/mod/quiz/accessrules/securewindow/securewindow.module.ts +++ b/src/addons/mod/quiz/accessrules/securewindow/securewindow.module.ts @@ -24,8 +24,7 @@ import { AddonModQuizAccessSecureWindowHandler } from './services/handlers/secur { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModQuizAccessRuleDelegate.registerHandler(AddonModQuizAccessSecureWindowHandler.instance); }, }, diff --git a/src/addons/mod/quiz/accessrules/timelimit/timelimit.module.ts b/src/addons/mod/quiz/accessrules/timelimit/timelimit.module.ts index e8d3ac8bf..4fae54f5e 100644 --- a/src/addons/mod/quiz/accessrules/timelimit/timelimit.module.ts +++ b/src/addons/mod/quiz/accessrules/timelimit/timelimit.module.ts @@ -30,8 +30,7 @@ import { AddonModQuizAccessTimeLimitHandler } from './services/handlers/timelimi { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonModQuizAccessRuleDelegate.registerHandler(AddonModQuizAccessTimeLimitHandler.instance); }, }, diff --git a/src/addons/mod/quiz/quiz.module.ts b/src/addons/mod/quiz/quiz.module.ts index 11ecdf0ec..05bad8666 100644 --- a/src/addons/mod/quiz/quiz.module.ts +++ b/src/addons/mod/quiz/quiz.module.ts @@ -69,8 +69,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModQuizModuleHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModQuizPrefetchHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModQuizGradeLinkHandler.instance); diff --git a/src/addons/mod/resource/resource.module.ts b/src/addons/mod/resource/resource.module.ts index 3cecc5ec1..5049aa8cd 100644 --- a/src/addons/mod/resource/resource.module.ts +++ b/src/addons/mod/resource/resource.module.ts @@ -47,8 +47,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModResourceModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModResourceIndexLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModResourceListLinkHandler.instance); diff --git a/src/addons/mod/scorm/scorm.module.ts b/src/addons/mod/scorm/scorm.module.ts index f4dc142e6..308f07164 100644 --- a/src/addons/mod/scorm/scorm.module.ts +++ b/src/addons/mod/scorm/scorm.module.ts @@ -63,8 +63,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModScormModuleHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModScormPrefetchHandler.instance); CoreCronDelegate.register(AddonModScormSyncCronHandler.instance); diff --git a/src/addons/mod/survey/survey.module.ts b/src/addons/mod/survey/survey.module.ts index 0b00f21ae..6c9716d2b 100644 --- a/src/addons/mod/survey/survey.module.ts +++ b/src/addons/mod/survey/survey.module.ts @@ -61,8 +61,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModSurveyModuleHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModSurveyPrefetchHandler.instance); CoreCronDelegate.register(AddonModSurveySyncCronHandler.instance); diff --git a/src/addons/mod/url/url.module.ts b/src/addons/mod/url/url.module.ts index 7a30d7856..e943d15ab 100644 --- a/src/addons/mod/url/url.module.ts +++ b/src/addons/mod/url/url.module.ts @@ -47,8 +47,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModUrlModuleHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModUrlIndexLinkHandler.instance); CoreContentLinksDelegate.registerHandler(AddonModUrlListLinkHandler.instance); diff --git a/src/addons/mod/wiki/wiki.module.ts b/src/addons/mod/wiki/wiki.module.ts index 409c64783..dd63d4c0a 100644 --- a/src/addons/mod/wiki/wiki.module.ts +++ b/src/addons/mod/wiki/wiki.module.ts @@ -63,8 +63,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModWikiModuleHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModWikiPrefetchHandler.instance); CoreCronDelegate.register(AddonModWikiSyncCronHandler.instance); diff --git a/src/addons/mod/workshop/assessment/accumulative/accumulative.module.ts b/src/addons/mod/workshop/assessment/accumulative/accumulative.module.ts index 7eaf6ccc4..be3c10dc1 100644 --- a/src/addons/mod/workshop/assessment/accumulative/accumulative.module.ts +++ b/src/addons/mod/workshop/assessment/accumulative/accumulative.module.ts @@ -29,8 +29,7 @@ import { CoreSharedModule } from '@/core/shared.module'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonWorkshopAssessmentStrategyDelegate.registerHandler( AddonModWorkshopAssessmentStrategyAccumulativeHandler.instance, ); diff --git a/src/addons/mod/workshop/assessment/comments/comments.module.ts b/src/addons/mod/workshop/assessment/comments/comments.module.ts index 2ceaf9a5a..cb56fc9cc 100644 --- a/src/addons/mod/workshop/assessment/comments/comments.module.ts +++ b/src/addons/mod/workshop/assessment/comments/comments.module.ts @@ -29,8 +29,7 @@ import { AddonModWorkshopAssessmentStrategyCommentsHandler } from './services/ha { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonWorkshopAssessmentStrategyDelegate.registerHandler( AddonModWorkshopAssessmentStrategyCommentsHandler.instance, ); diff --git a/src/addons/mod/workshop/assessment/numerrors/numerrors.module.ts b/src/addons/mod/workshop/assessment/numerrors/numerrors.module.ts index dab6f1f38..7d2591c2a 100644 --- a/src/addons/mod/workshop/assessment/numerrors/numerrors.module.ts +++ b/src/addons/mod/workshop/assessment/numerrors/numerrors.module.ts @@ -29,8 +29,7 @@ import { AddonModWorkshopAssessmentStrategyNumErrorsHandler } from './services/h { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonWorkshopAssessmentStrategyDelegate.registerHandler( AddonModWorkshopAssessmentStrategyNumErrorsHandler.instance, ); diff --git a/src/addons/mod/workshop/assessment/rubric/rubric.module.ts b/src/addons/mod/workshop/assessment/rubric/rubric.module.ts index 04885352e..26ef01711 100644 --- a/src/addons/mod/workshop/assessment/rubric/rubric.module.ts +++ b/src/addons/mod/workshop/assessment/rubric/rubric.module.ts @@ -29,8 +29,7 @@ import { AddonModWorkshopAssessmentStrategyRubricHandler } from './services/hand { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { AddonWorkshopAssessmentStrategyDelegate.registerHandler( AddonModWorkshopAssessmentStrategyRubricHandler.instance, ); diff --git a/src/addons/mod/workshop/workshop.module.ts b/src/addons/mod/workshop/workshop.module.ts index 1823ec561..28a93fc50 100644 --- a/src/addons/mod/workshop/workshop.module.ts +++ b/src/addons/mod/workshop/workshop.module.ts @@ -65,8 +65,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseModuleDelegate.registerHandler(AddonModWorkshopModuleHandler.instance); CoreCourseModulePrefetchDelegate.registerHandler(AddonModWorkshopPrefetchHandler.instance); CoreCronDelegate.register(AddonModWorkshopSyncCronHandler.instance); diff --git a/src/addons/notes/notes.module.ts b/src/addons/notes/notes.module.ts index e7c9bcef5..5d82c91d1 100644 --- a/src/addons/notes/notes.module.ts +++ b/src/addons/notes/notes.module.ts @@ -58,8 +58,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => async () => { + useValue: () => { CoreUserDelegate.registerHandler(AddonNotesUserHandler.instance); CoreCourseOptionsDelegate.registerHandler(AddonNotesCourseOptionHandler.instance); CoreCronDelegate.register(AddonNotesSyncCronHandler.instance); diff --git a/src/addons/notifications/notifications.module.ts b/src/addons/notifications/notifications.module.ts index 86595e7c3..0f2142d22 100644 --- a/src/addons/notifications/notifications.module.ts +++ b/src/addons/notifications/notifications.module.ts @@ -58,8 +58,7 @@ const preferencesRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreMainMenuDelegate.registerHandler(AddonNotificationsMainMenuHandler.instance); CoreCronDelegate.register(AddonNotificationsCronHandler.instance); CorePushNotificationsDelegate.registerClickHandler(AddonNotificationsPushClickHandler.instance); diff --git a/src/addons/privatefiles/privatefiles.module.ts b/src/addons/privatefiles/privatefiles.module.ts index 48806c006..ca91c9d3f 100644 --- a/src/addons/privatefiles/privatefiles.module.ts +++ b/src/addons/privatefiles/privatefiles.module.ts @@ -44,8 +44,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreMainMenuDelegate.registerHandler(AddonPrivateFilesMainMenuHandler.instance); }, }, diff --git a/src/addons/qbehaviour/adaptive/adaptive.module.ts b/src/addons/qbehaviour/adaptive/adaptive.module.ts index f0d6b50b8..01d6f8a6f 100644 --- a/src/addons/qbehaviour/adaptive/adaptive.module.ts +++ b/src/addons/qbehaviour/adaptive/adaptive.module.ts @@ -23,8 +23,7 @@ import { AddonQbehaviourAdaptiveHandler } from './services/handlers/adaptive'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionBehaviourDelegate.registerHandler(AddonQbehaviourAdaptiveHandler.instance); }, }, diff --git a/src/addons/qbehaviour/adaptivenopenalty/adaptivenopenalty.module.ts b/src/addons/qbehaviour/adaptivenopenalty/adaptivenopenalty.module.ts index 521c2139f..6b29f6da9 100644 --- a/src/addons/qbehaviour/adaptivenopenalty/adaptivenopenalty.module.ts +++ b/src/addons/qbehaviour/adaptivenopenalty/adaptivenopenalty.module.ts @@ -24,8 +24,7 @@ import { AddonQbehaviourAdaptiveNoPenaltyHandler } from './services/handlers/ada { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionBehaviourDelegate.registerHandler(AddonQbehaviourAdaptiveNoPenaltyHandler.instance); }, }, diff --git a/src/addons/qbehaviour/deferredcbm/deferredcbm.module.ts b/src/addons/qbehaviour/deferredcbm/deferredcbm.module.ts index 94e8e2c1c..9606c4c63 100644 --- a/src/addons/qbehaviour/deferredcbm/deferredcbm.module.ts +++ b/src/addons/qbehaviour/deferredcbm/deferredcbm.module.ts @@ -30,8 +30,7 @@ import { AddonQbehaviourDeferredCBMHandler } from './services/handlers/deferredc { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionBehaviourDelegate.registerHandler(AddonQbehaviourDeferredCBMHandler.instance); }, }, diff --git a/src/addons/qbehaviour/deferredfeedback/deferredfeedback.module.ts b/src/addons/qbehaviour/deferredfeedback/deferredfeedback.module.ts index 8ec75de4a..6c516d394 100644 --- a/src/addons/qbehaviour/deferredfeedback/deferredfeedback.module.ts +++ b/src/addons/qbehaviour/deferredfeedback/deferredfeedback.module.ts @@ -23,8 +23,7 @@ import { AddonQbehaviourDeferredFeedbackHandler } from './services/handlers/defe { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionBehaviourDelegate.registerHandler(AddonQbehaviourDeferredFeedbackHandler.instance); }, }, diff --git a/src/addons/qbehaviour/immediatecbm/immediatecbm.module.ts b/src/addons/qbehaviour/immediatecbm/immediatecbm.module.ts index c5bc7d5a9..1717db79b 100644 --- a/src/addons/qbehaviour/immediatecbm/immediatecbm.module.ts +++ b/src/addons/qbehaviour/immediatecbm/immediatecbm.module.ts @@ -24,8 +24,7 @@ import { AddonQbehaviourImmediateCBMHandler } from './services/handlers/immediat { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionBehaviourDelegate.registerHandler(AddonQbehaviourImmediateCBMHandler.instance); }, }, diff --git a/src/addons/qbehaviour/immediatefeedback/immediatefeedback.module.ts b/src/addons/qbehaviour/immediatefeedback/immediatefeedback.module.ts index 99e137d95..33191c7cc 100644 --- a/src/addons/qbehaviour/immediatefeedback/immediatefeedback.module.ts +++ b/src/addons/qbehaviour/immediatefeedback/immediatefeedback.module.ts @@ -24,8 +24,7 @@ import { AddonQbehaviourImmediateFeedbackHandler } from './services/handlers/imm { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionBehaviourDelegate.registerHandler(AddonQbehaviourImmediateFeedbackHandler.instance); }, }, diff --git a/src/addons/qbehaviour/informationitem/informationitem.module.ts b/src/addons/qbehaviour/informationitem/informationitem.module.ts index c72b94676..3c465a4df 100644 --- a/src/addons/qbehaviour/informationitem/informationitem.module.ts +++ b/src/addons/qbehaviour/informationitem/informationitem.module.ts @@ -30,8 +30,7 @@ import { AddonQbehaviourInformationItemHandler } from './services/handlers/infor { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionBehaviourDelegate.registerHandler(AddonQbehaviourInformationItemHandler.instance); }, }, diff --git a/src/addons/qbehaviour/interactive/interactive.module.ts b/src/addons/qbehaviour/interactive/interactive.module.ts index 421f6ab4e..5f258023f 100644 --- a/src/addons/qbehaviour/interactive/interactive.module.ts +++ b/src/addons/qbehaviour/interactive/interactive.module.ts @@ -24,8 +24,7 @@ import { AddonQbehaviourInteractiveHandler } from './services/handlers/interacti { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionBehaviourDelegate.registerHandler(AddonQbehaviourInteractiveHandler.instance); }, }, diff --git a/src/addons/qbehaviour/interactivecountback/interactivecountback.module.ts b/src/addons/qbehaviour/interactivecountback/interactivecountback.module.ts index 161b1c5a1..461bfb633 100644 --- a/src/addons/qbehaviour/interactivecountback/interactivecountback.module.ts +++ b/src/addons/qbehaviour/interactivecountback/interactivecountback.module.ts @@ -24,8 +24,7 @@ import { AddonQbehaviourInteractiveCountbackHandler } from './services/handlers/ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionBehaviourDelegate.registerHandler(AddonQbehaviourInteractiveCountbackHandler.instance); }, }, diff --git a/src/addons/qbehaviour/manualgraded/manualgraded.module.ts b/src/addons/qbehaviour/manualgraded/manualgraded.module.ts index 45582465f..d8216f028 100644 --- a/src/addons/qbehaviour/manualgraded/manualgraded.module.ts +++ b/src/addons/qbehaviour/manualgraded/manualgraded.module.ts @@ -24,8 +24,7 @@ import { AddonQbehaviourManualGradedHandler } from './services/handlers/manualgr { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionBehaviourDelegate.registerHandler(AddonQbehaviourManualGradedHandler.instance); }, }, diff --git a/src/addons/qtype/calculated/calculated.module.ts b/src/addons/qtype/calculated/calculated.module.ts index d140819ab..73b7a5a3f 100644 --- a/src/addons/qtype/calculated/calculated.module.ts +++ b/src/addons/qtype/calculated/calculated.module.ts @@ -30,8 +30,7 @@ import { AddonQtypeCalculatedHandler } from './services/handlers/calculated'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeCalculatedHandler.instance); }, }, diff --git a/src/addons/qtype/calculatedmulti/calculatedmulti.module.ts b/src/addons/qtype/calculatedmulti/calculatedmulti.module.ts index cbe7d1829..4dd42bd1e 100644 --- a/src/addons/qtype/calculatedmulti/calculatedmulti.module.ts +++ b/src/addons/qtype/calculatedmulti/calculatedmulti.module.ts @@ -24,8 +24,7 @@ import { AddonQtypeCalculatedMultiHandler } from './services/handlers/calculated { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeCalculatedMultiHandler.instance); }, }, diff --git a/src/addons/qtype/calculatedsimple/calculatedsimple.module.ts b/src/addons/qtype/calculatedsimple/calculatedsimple.module.ts index 9a7b52b18..46f250724 100644 --- a/src/addons/qtype/calculatedsimple/calculatedsimple.module.ts +++ b/src/addons/qtype/calculatedsimple/calculatedsimple.module.ts @@ -24,8 +24,7 @@ import { AddonQtypeCalculatedSimpleHandler } from './services/handlers/calculate { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeCalculatedSimpleHandler.instance); }, }, diff --git a/src/addons/qtype/ddimageortext/ddimageortext.module.ts b/src/addons/qtype/ddimageortext/ddimageortext.module.ts index 68ad009b1..392a181c3 100644 --- a/src/addons/qtype/ddimageortext/ddimageortext.module.ts +++ b/src/addons/qtype/ddimageortext/ddimageortext.module.ts @@ -30,8 +30,7 @@ import { AddonQtypeDdImageOrTextHandler } from './services/handlers/ddimageortex { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeDdImageOrTextHandler.instance); }, }, diff --git a/src/addons/qtype/ddmarker/ddmarker.module.ts b/src/addons/qtype/ddmarker/ddmarker.module.ts index 6ec64137e..0dee46686 100644 --- a/src/addons/qtype/ddmarker/ddmarker.module.ts +++ b/src/addons/qtype/ddmarker/ddmarker.module.ts @@ -30,8 +30,7 @@ import { AddonQtypeDdMarkerHandler } from './services/handlers/ddmarker'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeDdMarkerHandler.instance); }, }, diff --git a/src/addons/qtype/ddwtos/ddwtos.module.ts b/src/addons/qtype/ddwtos/ddwtos.module.ts index 33563da45..ed923dea9 100644 --- a/src/addons/qtype/ddwtos/ddwtos.module.ts +++ b/src/addons/qtype/ddwtos/ddwtos.module.ts @@ -30,8 +30,7 @@ import { AddonQtypeDdwtosHandler } from './services/handlers/ddwtos'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeDdwtosHandler.instance); }, }, diff --git a/src/addons/qtype/description/description.module.ts b/src/addons/qtype/description/description.module.ts index 198e4f89e..d580e9d59 100644 --- a/src/addons/qtype/description/description.module.ts +++ b/src/addons/qtype/description/description.module.ts @@ -30,8 +30,7 @@ import { AddonQtypeDescriptionHandler } from './services/handlers/description'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeDescriptionHandler.instance); }, }, diff --git a/src/addons/qtype/essay/essay.module.ts b/src/addons/qtype/essay/essay.module.ts index 3d18fb67b..390479bbf 100644 --- a/src/addons/qtype/essay/essay.module.ts +++ b/src/addons/qtype/essay/essay.module.ts @@ -32,8 +32,7 @@ import { AddonQtypeEssayComponent } from './component/essay'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeEssayHandler.instance); }, }, diff --git a/src/addons/qtype/gapselect/gapselect.module.ts b/src/addons/qtype/gapselect/gapselect.module.ts index 15f730e4f..badb30c4f 100644 --- a/src/addons/qtype/gapselect/gapselect.module.ts +++ b/src/addons/qtype/gapselect/gapselect.module.ts @@ -30,8 +30,7 @@ import { AddonQtypeGapSelectHandler } from './services/handlers/gapselect'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeGapSelectHandler.instance); }, }, diff --git a/src/addons/qtype/match/match.module.ts b/src/addons/qtype/match/match.module.ts index b52672cc2..0df4636e5 100644 --- a/src/addons/qtype/match/match.module.ts +++ b/src/addons/qtype/match/match.module.ts @@ -30,8 +30,7 @@ import { AddonQtypeMatchHandler } from './services/handlers/match'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeMatchHandler.instance); }, }, diff --git a/src/addons/qtype/multianswer/multianswer.module.ts b/src/addons/qtype/multianswer/multianswer.module.ts index e5840b65b..9548089b3 100644 --- a/src/addons/qtype/multianswer/multianswer.module.ts +++ b/src/addons/qtype/multianswer/multianswer.module.ts @@ -30,8 +30,7 @@ import { AddonQtypeMultiAnswerHandler } from './services/handlers/multianswer'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeMultiAnswerHandler.instance); }, }, diff --git a/src/addons/qtype/multichoice/multichoice.module.ts b/src/addons/qtype/multichoice/multichoice.module.ts index 43ee32d66..12488668f 100644 --- a/src/addons/qtype/multichoice/multichoice.module.ts +++ b/src/addons/qtype/multichoice/multichoice.module.ts @@ -30,8 +30,7 @@ import { AddonQtypeMultichoiceHandler } from './services/handlers/multichoice'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeMultichoiceHandler.instance); }, }, diff --git a/src/addons/qtype/numerical/numerical.module.ts b/src/addons/qtype/numerical/numerical.module.ts index b2956adb4..f13ba4fbe 100644 --- a/src/addons/qtype/numerical/numerical.module.ts +++ b/src/addons/qtype/numerical/numerical.module.ts @@ -24,8 +24,7 @@ import { AddonQtypeNumericalHandler } from './services/handlers/numerical'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeNumericalHandler.instance); }, }, diff --git a/src/addons/qtype/randomsamatch/randomsamatch.module.ts b/src/addons/qtype/randomsamatch/randomsamatch.module.ts index 59063e97a..877e772a3 100644 --- a/src/addons/qtype/randomsamatch/randomsamatch.module.ts +++ b/src/addons/qtype/randomsamatch/randomsamatch.module.ts @@ -24,8 +24,7 @@ import { AddonQtypeRandomSaMatchHandler } from './services/handlers/randomsamatc { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeRandomSaMatchHandler.instance); }, }, diff --git a/src/addons/qtype/shortanswer/shortanswer.module.ts b/src/addons/qtype/shortanswer/shortanswer.module.ts index 363c237c5..dcadc635e 100644 --- a/src/addons/qtype/shortanswer/shortanswer.module.ts +++ b/src/addons/qtype/shortanswer/shortanswer.module.ts @@ -30,8 +30,7 @@ import { AddonQtypeShortAnswerHandler } from './services/handlers/shortanswer'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeShortAnswerHandler.instance); }, }, diff --git a/src/addons/qtype/truefalse/truefalse.module.ts b/src/addons/qtype/truefalse/truefalse.module.ts index 129857221..83f60d24d 100644 --- a/src/addons/qtype/truefalse/truefalse.module.ts +++ b/src/addons/qtype/truefalse/truefalse.module.ts @@ -24,8 +24,7 @@ import { AddonQtypeTrueFalseHandler } from './services/handlers/truefalse'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreQuestionDelegate.registerHandler(AddonQtypeTrueFalseHandler.instance); }, }, diff --git a/src/addons/remotethemes/remotethemes.module.ts b/src/addons/remotethemes/remotethemes.module.ts index 74666bff4..e7b7d8d1c 100644 --- a/src/addons/remotethemes/remotethemes.module.ts +++ b/src/addons/remotethemes/remotethemes.module.ts @@ -21,8 +21,7 @@ import { AddonRemoteThemesHandler } from './services/remotethemes-handler'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => async () => { + useValue: () => { CoreStyles.registerStyleHandler(AddonRemoteThemesHandler.instance); }, }, diff --git a/src/addons/storagemanager/storagemanager.module.ts b/src/addons/storagemanager/storagemanager.module.ts index 57c30cab2..2a32b1c19 100644 --- a/src/addons/storagemanager/storagemanager.module.ts +++ b/src/addons/storagemanager/storagemanager.module.ts @@ -36,8 +36,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => async () => { + useValue: () => { CoreCourseOptionsDelegate.registerHandler(AddonStorageManagerCourseMenuHandler.instance); }, }, diff --git a/src/addons/userprofilefield/checkbox/checkbox.module.ts b/src/addons/userprofilefield/checkbox/checkbox.module.ts index 9f163b4c2..92e44c431 100644 --- a/src/addons/userprofilefield/checkbox/checkbox.module.ts +++ b/src/addons/userprofilefield/checkbox/checkbox.module.ts @@ -30,9 +30,9 @@ import { CoreSharedModule } from '@/core/shared.module'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => - CoreUserProfileFieldDelegate.registerHandler(AddonUserProfileFieldCheckboxHandler.instance), + useValue: () => { + CoreUserProfileFieldDelegate.registerHandler(AddonUserProfileFieldCheckboxHandler.instance); + }, }, ], exports: [ diff --git a/src/addons/userprofilefield/datetime/datetime.module.ts b/src/addons/userprofilefield/datetime/datetime.module.ts index a70a4da0b..4c3fe5783 100644 --- a/src/addons/userprofilefield/datetime/datetime.module.ts +++ b/src/addons/userprofilefield/datetime/datetime.module.ts @@ -30,9 +30,9 @@ import { CoreSharedModule } from '@/core/shared.module'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => - CoreUserProfileFieldDelegate.registerHandler(AddonUserProfileFieldDatetimeHandler.instance), + useValue: () => { + CoreUserProfileFieldDelegate.registerHandler(AddonUserProfileFieldDatetimeHandler.instance); + }, }, ], exports: [ diff --git a/src/addons/userprofilefield/menu/menu.module.ts b/src/addons/userprofilefield/menu/menu.module.ts index 62aae65da..e2fa301c6 100644 --- a/src/addons/userprofilefield/menu/menu.module.ts +++ b/src/addons/userprofilefield/menu/menu.module.ts @@ -30,9 +30,9 @@ import { CoreSharedModule } from '@/core/shared.module'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => - CoreUserProfileFieldDelegate.registerHandler(AddonUserProfileFieldMenuHandler.instance), + useValue: () => { + CoreUserProfileFieldDelegate.registerHandler(AddonUserProfileFieldMenuHandler.instance); + }, }, ], exports: [ diff --git a/src/addons/userprofilefield/text/text.module.ts b/src/addons/userprofilefield/text/text.module.ts index 83131dfe0..812f24cee 100644 --- a/src/addons/userprofilefield/text/text.module.ts +++ b/src/addons/userprofilefield/text/text.module.ts @@ -30,9 +30,9 @@ import { CoreSharedModule } from '@/core/shared.module'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => - CoreUserProfileFieldDelegate.registerHandler(AddonUserProfileFieldTextHandler.instance), + useValue: () => { + CoreUserProfileFieldDelegate.registerHandler(AddonUserProfileFieldTextHandler.instance); + }, }, ], exports: [ diff --git a/src/addons/userprofilefield/textarea/textarea.module.ts b/src/addons/userprofilefield/textarea/textarea.module.ts index 579b284ff..f2a29d40d 100644 --- a/src/addons/userprofilefield/textarea/textarea.module.ts +++ b/src/addons/userprofilefield/textarea/textarea.module.ts @@ -32,9 +32,9 @@ import { CoreEditorComponentsModule } from '@features/editor/components/componen { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => - CoreUserProfileFieldDelegate.registerHandler(AddonUserProfileFieldTextareaHandler.instance), + useValue: () => { + CoreUserProfileFieldDelegate.registerHandler(AddonUserProfileFieldTextareaHandler.instance); + }, }, ], exports: [ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 730c31f6e..555132d45 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -51,7 +51,7 @@ export function createTranslateLoader(http: HttpClient): TranslateHttpLoader { TranslateModule.forRoot({ loader: { provide: TranslateLoader, - useFactory: (createTranslateLoader), + useFactory: createTranslateLoader, deps: [HttpClient], }, }), @@ -66,8 +66,7 @@ export function createTranslateLoader(http: HttpClient): TranslateHttpLoader { { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCronDelegate.register(CoreSiteInfoCronHandler.instance); }, }, diff --git a/src/core/features/course/course.module.ts b/src/core/features/course/course.module.ts index 3e56ecb0c..906b0df92 100644 --- a/src/core/features/course/course.module.ts +++ b/src/core/features/course/course.module.ts @@ -90,8 +90,7 @@ const courseIndexRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCronDelegate.register(CoreCourseSyncCronHandler.instance); CoreCronDelegate.register(CoreCourseLogCronHandler.instance); CoreTagAreaDelegate.registerHandler(CoreCourseTagAreaHandler.instance); diff --git a/src/core/features/course/format/singleactivity/singleactivity.module.ts b/src/core/features/course/format/singleactivity/singleactivity.module.ts index 8db7ae9f3..c42f04b27 100644 --- a/src/core/features/course/format/singleactivity/singleactivity.module.ts +++ b/src/core/features/course/format/singleactivity/singleactivity.module.ts @@ -30,8 +30,7 @@ import { CoreCourseFormatSingleActivityHandler } from './services/handlers/singl { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseFormatDelegate.registerHandler(CoreCourseFormatSingleActivityHandler.instance); }, }, diff --git a/src/core/features/course/format/social/social.module.ts b/src/core/features/course/format/social/social.module.ts index 16f1379c6..1278c67df 100644 --- a/src/core/features/course/format/social/social.module.ts +++ b/src/core/features/course/format/social/social.module.ts @@ -22,8 +22,7 @@ import { CoreCourseFormatSocialHandler } from './services/handlers/social-format { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseFormatDelegate.registerHandler(CoreCourseFormatSocialHandler.instance); }, }, diff --git a/src/core/features/course/format/topics/topics.module.ts b/src/core/features/course/format/topics/topics.module.ts index 3a7594aa7..8cca95c71 100644 --- a/src/core/features/course/format/topics/topics.module.ts +++ b/src/core/features/course/format/topics/topics.module.ts @@ -22,8 +22,7 @@ import { CoreCourseFormatTopicsHandler } from './services/handlers/topics-format { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseFormatDelegate.registerHandler(CoreCourseFormatTopicsHandler.instance); }, }, diff --git a/src/core/features/course/format/weeks/weeks.module.ts b/src/core/features/course/format/weeks/weeks.module.ts index 491c122e4..7393de0d1 100644 --- a/src/core/features/course/format/weeks/weeks.module.ts +++ b/src/core/features/course/format/weeks/weeks.module.ts @@ -22,8 +22,7 @@ import { CoreCourseFormatWeeksHandler } from './services/handlers/weeks-format'; { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreCourseFormatDelegate.registerHandler(CoreCourseFormatWeeksHandler.instance); }, }, diff --git a/src/core/features/courses/courses.module.ts b/src/core/features/courses/courses.module.ts index 6ca5284b4..b07d4bc2b 100644 --- a/src/core/features/courses/courses.module.ts +++ b/src/core/features/courses/courses.module.ts @@ -66,8 +66,7 @@ const mainMenuHomeSiblingRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreMainMenuHomeDelegate.registerHandler(CoreDashboardHomeHandler.instance); CoreMainMenuHomeDelegate.registerHandler(CoreCoursesMyCoursesHomeHandler.instance); CoreContentLinksDelegate.registerHandler(CoreCoursesCourseLinkHandler.instance); diff --git a/src/core/features/fileuploader/fileuploader.module.ts b/src/core/features/fileuploader/fileuploader.module.ts index 8ca214fe7..c0774617d 100644 --- a/src/core/features/fileuploader/fileuploader.module.ts +++ b/src/core/features/fileuploader/fileuploader.module.ts @@ -34,8 +34,7 @@ export const CORE_FILEUPLOADER_SERVICES: Type[] = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreFileUploaderDelegate.registerHandler(CoreFileUploaderAlbumHandler.instance); CoreFileUploaderDelegate.registerHandler(CoreFileUploaderAudioHandler.instance); CoreFileUploaderDelegate.registerHandler(CoreFileUploaderCameraHandler.instance); diff --git a/src/core/features/grades/grades.module.ts b/src/core/features/grades/grades.module.ts index 2a9c3dbd7..b359d575c 100644 --- a/src/core/features/grades/grades.module.ts +++ b/src/core/features/grades/grades.module.ts @@ -62,7 +62,6 @@ const courseIndexRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], useValue: () => { CoreMainMenuDelegate.registerHandler(CoreGradesMainMenuHandler.instance); CoreUserDelegate.registerHandler(CoreGradesUserHandler.instance); diff --git a/src/core/features/h5p/h5p.module.ts b/src/core/features/h5p/h5p.module.ts index e8be04d82..89b5a494a 100644 --- a/src/core/features/h5p/h5p.module.ts +++ b/src/core/features/h5p/h5p.module.ts @@ -38,8 +38,7 @@ export const CORE_H5P_SERVICES: Type[] = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CorePluginFileDelegate.registerHandler(CoreH5PPluginFileHandler.instance); }, }, diff --git a/src/core/features/login/login.module.ts b/src/core/features/login/login.module.ts index 235541150..caa91ea91 100644 --- a/src/core/features/login/login.module.ts +++ b/src/core/features/login/login.module.ts @@ -40,8 +40,7 @@ const appRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => async () => { + useValue: () => { CoreCronDelegate.register(CoreLoginCronHandler.instance); }, }, diff --git a/src/core/features/mainmenu/mainmenu.module.ts b/src/core/features/mainmenu/mainmenu.module.ts index 0c871de7d..ae4136604 100644 --- a/src/core/features/mainmenu/mainmenu.module.ts +++ b/src/core/features/mainmenu/mainmenu.module.ts @@ -49,8 +49,7 @@ const appRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreMainMenuDelegate.registerHandler(CoreMainMenuHomeHandler.instance); }, }, diff --git a/src/core/features/pushnotifications/pushnotifications.module.ts b/src/core/features/pushnotifications/pushnotifications.module.ts index fac638aa2..b765e6fb8 100644 --- a/src/core/features/pushnotifications/pushnotifications.module.ts +++ b/src/core/features/pushnotifications/pushnotifications.module.ts @@ -41,8 +41,7 @@ export const CORE_PUSHNOTIFICATIONS_SERVICES: Type[] = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => async () => { + useValue: async () => { // Register the handlers. CoreCronDelegate.register(CorePushNotificationsRegisterCronHandler.instance); CoreCronDelegate.register(CorePushNotificationsUnregisterCronHandler.instance); diff --git a/src/core/features/sharedfiles/sharedfiles.module.ts b/src/core/features/sharedfiles/sharedfiles.module.ts index 5d82b264a..409747798 100644 --- a/src/core/features/sharedfiles/sharedfiles.module.ts +++ b/src/core/features/sharedfiles/sharedfiles.module.ts @@ -51,7 +51,7 @@ const routes: Routes = [ { provide: APP_INITIALIZER, multi: true, - useFactory: () => async () => { + useValue: async () => { CoreFileUploaderDelegate.registerHandler(CoreSharedFilesUploadHandler.instance); CoreSettingsDelegate.registerHandler(CoreSharedFilesSettingsHandler.instance); diff --git a/src/core/features/sitehome/sitehome.module.ts b/src/core/features/sitehome/sitehome.module.ts index d77faecd2..40283ba13 100644 --- a/src/core/features/sitehome/sitehome.module.ts +++ b/src/core/features/sitehome/sitehome.module.ts @@ -40,8 +40,7 @@ const mainMenuHomeRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreContentLinksDelegate.registerHandler(CoreSiteHomeIndexLinkHandler.instance); CoreMainMenuHomeDelegate.registerHandler(CoreSiteHomeHomeHandler.instance); }, diff --git a/src/core/features/user/user.module.ts b/src/core/features/user/user.module.ts index 52c1e87ef..75901a66e 100644 --- a/src/core/features/user/user.module.ts +++ b/src/core/features/user/user.module.ts @@ -77,8 +77,7 @@ const courseIndexRoutes: Routes = [ { provide: APP_INITIALIZER, multi: true, - deps: [], - useFactory: () => () => { + useValue: () => { CoreUserDelegate.registerHandler(CoreUserProfileMailHandler.instance); CoreContentLinksDelegate.registerHandler(CoreUserProfileLinkHandler.instance); CoreCronDelegate.register(CoreUserSyncCronHandler.instance);