本文整理汇总了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;未经允许,请勿转载。 |
请发表评论