MOBILE-4497 competency: Decouple competency services
parent
ff0108d796
commit
f5d31d8eb4
|
@ -17,8 +17,6 @@ import { CoreContentLinksDelegate } from '@features/contentlinks/services/conten
|
||||||
import { CoreCourseOptionsDelegate } from '@features/course/services/course-options-delegate';
|
import { CoreCourseOptionsDelegate } from '@features/course/services/course-options-delegate';
|
||||||
import { CorePushNotificationsDelegate } from '@features/pushnotifications/services/push-delegate';
|
import { CorePushNotificationsDelegate } from '@features/pushnotifications/services/push-delegate';
|
||||||
import { CoreUserDelegate } from '@features/user/services/user-delegate';
|
import { CoreUserDelegate } from '@features/user/services/user-delegate';
|
||||||
import { AddonCompetencyProvider } from './services/competency';
|
|
||||||
import { AddonCompetencyHelperProvider } from './services/competency-helper';
|
|
||||||
import { AddonCompetencyCompetencyLinkHandler } from './services/handlers/competency-link';
|
import { AddonCompetencyCompetencyLinkHandler } from './services/handlers/competency-link';
|
||||||
import { AddonCompetencyCourseOptionHandler } from './services/handlers/course-option';
|
import { AddonCompetencyCourseOptionHandler } from './services/handlers/course-option';
|
||||||
import { AddonCompetencyPlanLinkHandler } from './services/handlers/plan-link';
|
import { AddonCompetencyPlanLinkHandler } from './services/handlers/plan-link';
|
||||||
|
@ -33,11 +31,20 @@ import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.mo
|
||||||
import { COURSE_PAGE_NAME } from '@features/course/course.module';
|
import { COURSE_PAGE_NAME } from '@features/course/course.module';
|
||||||
import { PARTICIPANTS_PAGE_NAME } from '@features/user/user.module';
|
import { PARTICIPANTS_PAGE_NAME } from '@features/user/user.module';
|
||||||
|
|
||||||
// List of providers (without handlers).
|
/**
|
||||||
export const ADDON_COMPETENCY_SERVICES: Type<unknown>[] = [
|
* Get competency services.
|
||||||
AddonCompetencyProvider,
|
*
|
||||||
AddonCompetencyHelperProvider,
|
* @returns Competency services.
|
||||||
];
|
*/
|
||||||
|
export async function getCompetencyServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonCompetencyProvider } = await import('@addons/competency/services/competency');
|
||||||
|
const { AddonCompetencyHelperProvider } = await import('@addons/competency/services/competency-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
|
AddonCompetencyProvider,
|
||||||
|
AddonCompetencyHelperProvider,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
export const ADDON_COMPETENCY_LEARNING_PLANS_PAGE = 'learning-plans';
|
export const ADDON_COMPETENCY_LEARNING_PLANS_PAGE = 'learning-plans';
|
||||||
export const ADDON_COMPETENCY_COMPETENCIES_PAGE = 'competencies';
|
export const ADDON_COMPETENCY_COMPETENCIES_PAGE = 'competencies';
|
||||||
|
|
|
@ -127,7 +127,7 @@ import { CoreSitePluginsAssignSubmissionComponent } from '@features/siteplugins/
|
||||||
import { ADDON_BADGES_SERVICES } from '@addons/badges/badges.module';
|
import { ADDON_BADGES_SERVICES } from '@addons/badges/badges.module';
|
||||||
import { ADDON_CALENDAR_SERVICES } from '@addons/calendar/calendar.module';
|
import { ADDON_CALENDAR_SERVICES } from '@addons/calendar/calendar.module';
|
||||||
import { getCourseCompletionServices } from '@addons/coursecompletion/coursecompletion.module';
|
import { getCourseCompletionServices } from '@addons/coursecompletion/coursecompletion.module';
|
||||||
import { ADDON_COMPETENCY_SERVICES } from '@addons/competency/competency.module';
|
import { getCompetencyServices } from '@addons/competency/competency.module';
|
||||||
import { ADDON_MESSAGEOUTPUT_SERVICES } from '@addons/messageoutput/messageoutput.module';
|
import { ADDON_MESSAGEOUTPUT_SERVICES } from '@addons/messageoutput/messageoutput.module';
|
||||||
import { ADDON_MESSAGES_SERVICES } from '@addons/messages/messages.module';
|
import { ADDON_MESSAGES_SERVICES } from '@addons/messages/messages.module';
|
||||||
import { ADDON_MOD_ASSIGN_SERVICES } from '@addons/mod/assign/assign.module';
|
import { ADDON_MOD_ASSIGN_SERVICES } from '@addons/mod/assign/assign.module';
|
||||||
|
@ -307,7 +307,6 @@ export class CoreCompileProvider {
|
||||||
...extraProviders,
|
...extraProviders,
|
||||||
...ADDON_BADGES_SERVICES,
|
...ADDON_BADGES_SERVICES,
|
||||||
...ADDON_CALENDAR_SERVICES,
|
...ADDON_CALENDAR_SERVICES,
|
||||||
...ADDON_COMPETENCY_SERVICES,
|
|
||||||
...ADDON_MESSAGEOUTPUT_SERVICES,
|
...ADDON_MESSAGEOUTPUT_SERVICES,
|
||||||
...ADDON_MESSAGES_SERVICES,
|
...ADDON_MESSAGES_SERVICES,
|
||||||
...ADDON_MOD_ASSIGN_SERVICES,
|
...ADDON_MOD_ASSIGN_SERVICES,
|
||||||
|
@ -407,6 +406,7 @@ export class CoreCompileProvider {
|
||||||
*/
|
*/
|
||||||
async getLazyLibraries(): Promise<Type<unknown>[]> {
|
async getLazyLibraries(): Promise<Type<unknown>[]> {
|
||||||
const ADDON_MOD_WORKSHOP_SERVICES = await getWorkshopServices();
|
const ADDON_MOD_WORKSHOP_SERVICES = await getWorkshopServices();
|
||||||
|
const ADDON_COMPETENCY_SERVICES = await getCompetencyServices();
|
||||||
const ADDON_COURSECOMPLETION_SERVICES = await getCourseCompletionServices();
|
const ADDON_COURSECOMPLETION_SERVICES = await getCourseCompletionServices();
|
||||||
|
|
||||||
const CORE_COMMENTS_SERVICES = await getCommentsServices();
|
const CORE_COMMENTS_SERVICES = await getCommentsServices();
|
||||||
|
@ -414,6 +414,7 @@ export class CoreCompileProvider {
|
||||||
|
|
||||||
return [
|
return [
|
||||||
...ADDON_MOD_WORKSHOP_SERVICES,
|
...ADDON_MOD_WORKSHOP_SERVICES,
|
||||||
|
...ADDON_COMPETENCY_SERVICES,
|
||||||
...ADDON_COURSECOMPLETION_SERVICES,
|
...ADDON_COURSECOMPLETION_SERVICES,
|
||||||
...CORE_COMMENTS_SERVICES,
|
...CORE_COMMENTS_SERVICES,
|
||||||
...CORE_TAG_SERVICES,
|
...CORE_TAG_SERVICES,
|
||||||
|
|
Loading…
Reference in New Issue