當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript options-delegate.CoreCourseOptionsDelegate類代碼示例

本文整理匯總了TypeScript中@core/course/providers/options-delegate.CoreCourseOptionsDelegate的典型用法代碼示例。如果您正苦於以下問題:TypeScript CoreCourseOptionsDelegate類的具體用法?TypeScript CoreCourseOptionsDelegate怎麽用?TypeScript CoreCourseOptionsDelegate使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了CoreCourseOptionsDelegate類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: constructor

    constructor(userDelegate: CoreUserDelegate, userProfileMailHandler: CoreUserProfileMailHandler,
            eventsProvider: CoreEventsProvider, sitesProvider: CoreSitesProvider, userProvider: CoreUserProvider,
            contentLinksDelegate: CoreContentLinksDelegate, userLinkHandler: CoreUserProfileLinkHandler,
            courseOptionHandler: CoreUserParticipantsCourseOptionHandler, linkHandler: CoreUserParticipantsLinkHandler,
            courseOptionsDelegate: CoreCourseOptionsDelegate) {

        userDelegate.registerHandler(userProfileMailHandler);
        courseOptionsDelegate.registerHandler(courseOptionHandler);
        contentLinksDelegate.registerHandler(userLinkHandler);
        contentLinksDelegate.registerHandler(linkHandler);

        eventsProvider.on(CoreEventsProvider.USER_DELETED, (data) => {
            // Search for userid in params.
            const params = data.params;
            let userId = 0;

            if (params.userid) {
                userId = params.userid;
            } else if (params.userids) {
                userId = params.userids[0];
            } else if (params.field === 'id' && params.values && params.values.length) {
                userId = params.values[0];
            } else if (params.userlist && params.userlist.length) {
                userId = params.userlist[0].userid;
            }

            if (userId > 0) {
                userProvider.deleteStoredUser(userId, data.siteId);
            }
        }, sitesProvider.getCurrentSiteId());
    }
開發者ID:SATS-Seminary,項目名稱:moodlemobile2,代碼行數:31,代碼來源:user.module.ts

示例2: constructor

    constructor(mainMenuDelegate: CoreMainMenuDelegate, mainMenuHandler: AddonCompetencyMainMenuHandler,
            courseOptionsDelegate: CoreCourseOptionsDelegate, courseOptionHandler: AddonCompetencyCourseOptionHandler,
            userDelegate: CoreUserDelegate, userHandler: AddonCompetencyUserHandler) {

        mainMenuDelegate.registerHandler(mainMenuHandler);
        courseOptionsDelegate.registerHandler(courseOptionHandler);
        userDelegate.registerHandler(userHandler);
    }
開發者ID:SATS-Seminary,項目名稱:moodlemobile2,代碼行數:8,代碼來源:competency.module.ts

示例3: constructor

 constructor(mainMenuDelegate: CoreMainMenuDelegate, menuHandler: AddonBlogMainMenuHandler,
         userHandler: AddonBlogUserHandler, userDelegate: CoreUserDelegate,
         courseOptionHandler: AddonBlogCourseOptionHandler, courseOptionsDelegate: CoreCourseOptionsDelegate,
         linkHandler: AddonBlogIndexLinkHandler, contentLinksDelegate: CoreContentLinksDelegate) {
     mainMenuDelegate.registerHandler(menuHandler);
     userDelegate.registerHandler(userHandler);
     courseOptionsDelegate.registerHandler(courseOptionHandler);
     contentLinksDelegate.registerHandler(linkHandler);
 }
開發者ID:santosleonardo,項目名稱:moodlemobile2,代碼行數:9,代碼來源:blog.module.ts

示例4: constructor

    constructor(courseOptionsDelegate: CoreCourseOptionsDelegate, courseOptionHandler: AddonNotesCourseOptionHandler,
            userDelegate: CoreUserDelegate, userHandler: AddonNotesUserHandler,
            cronDelegate: CoreCronDelegate, syncHandler: AddonNotesSyncCronHandler, updateManager: CoreUpdateManagerProvider) {

        // Register handlers.
        courseOptionsDelegate.registerHandler(courseOptionHandler);
        userDelegate.registerHandler(userHandler);
        cronDelegate.register(syncHandler);

        // Allow migrating the tables from the old app to the new schema.
        updateManager.registerSiteTableMigration({
            name: 'mma_notes_offline_notes',
            newName: AddonNotesOfflineProvider.NOTES_TABLE
        });
    }
開發者ID:SATS-Seminary,項目名稱:moodlemobile2,代碼行數:15,代碼來源:notes.module.ts

示例5: constructor

    constructor(mainMenuDelegate: CoreMainMenuDelegate, gradesMenuHandler: CoreGradesMainMenuHandler,
            courseOptionHandler: CoreGradesCourseOptionHandler, courseOptionsDelegate: CoreCourseOptionsDelegate,
            contentLinksDelegate: CoreContentLinksDelegate, userLinkHandler: CoreGradesUserLinkHandler,
            overviewLinkHandler: CoreGradesOverviewLinkHandler, userHandler: CoreGradesUserHandler,
            userDelegate: CoreUserDelegate, eventsProvider: CoreEventsProvider, sitesProvider: CoreSitesProvider) {

        // Register handlers.
        mainMenuDelegate.registerHandler(gradesMenuHandler);
        courseOptionsDelegate.registerHandler(courseOptionHandler);
        contentLinksDelegate.registerHandler(userLinkHandler);
        contentLinksDelegate.registerHandler(overviewLinkHandler);
        userDelegate.registerHandler(userHandler);

        // Clear user profile handler cache.
        eventsProvider.on(CoreUserProvider.PROFILE_REFRESHED, (data) => {
            userHandler.clearViewGradesCache(data.courseId, data.userId);
        }, sitesProvider.getCurrentSiteId());

        eventsProvider.on(CoreEventsProvider.LOGOUT, () => {
            userHandler.clearViewGradesCache();
        }, sitesProvider.getCurrentSiteId());
    }
開發者ID:SATS-Seminary,項目名稱:moodlemobile2,代碼行數:22,代碼來源:grades.module.ts

示例6: constructor

 constructor(courseOptionsDelegate: CoreCourseOptionsDelegate, courseOptionHandler: AddonCourseCompletionCourseOptionHandler,
         userDelegate: CoreUserDelegate, userHandler: AddonCourseCompletionUserHandler) {
     // Register handlers.
     courseOptionsDelegate.registerHandler(courseOptionHandler);
     userDelegate.registerHandler(userHandler);
 }
開發者ID:SATS-Seminary,項目名稱:moodlemobile2,代碼行數:6,代碼來源:coursecompletion.module.ts


注:本文中的@core/course/providers/options-delegate.CoreCourseOptionsDelegate類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。