MOBILE-3108 siteplugins: Allow create only title and prerendered blocks
parent
5b45d4a335
commit
767c0c19d4
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
@ -27,7 +26,7 @@ export class AddonBlockBadgesHandler extends CoreBlockBaseHandler {
|
|||
name = 'AddonBlockBadges';
|
||||
blockName = 'badges';
|
||||
|
||||
constructor(private translate: TranslateService) {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -44,7 +43,7 @@ export class AddonBlockBadgesHandler extends CoreBlockBaseHandler {
|
|||
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
|
||||
return {
|
||||
title: this.translate.instant('addon.block_badges.pluginname'),
|
||||
title: 'addon.block_badges.pluginname',
|
||||
class: 'addon-block-badges',
|
||||
component: CoreBlockPreRenderedComponent
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
@ -27,7 +26,7 @@ export class AddonBlockBlogMenuHandler extends CoreBlockBaseHandler {
|
|||
name = 'AddonBlockBlogMenu';
|
||||
blockName = 'blog_menu';
|
||||
|
||||
constructor(private translate: TranslateService) {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -44,7 +43,7 @@ export class AddonBlockBlogMenuHandler extends CoreBlockBaseHandler {
|
|||
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
|
||||
return {
|
||||
title: this.translate.instant('addon.block_blogmenu.pluginname'),
|
||||
title: 'addon.block_blogmenu.pluginname',
|
||||
class: 'addon-block-blog-menu',
|
||||
component: CoreBlockPreRenderedComponent
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
@ -27,7 +26,7 @@ export class AddonBlockBlogRecentHandler extends CoreBlockBaseHandler {
|
|||
name = 'AddonBlockBlogRecent';
|
||||
blockName = 'blog_recent';
|
||||
|
||||
constructor(private translate: TranslateService) {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -44,7 +43,7 @@ export class AddonBlockBlogRecentHandler extends CoreBlockBaseHandler {
|
|||
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
|
||||
return {
|
||||
title: this.translate.instant('addon.block_blogrecent.pluginname'),
|
||||
title: 'addon.block_blogrecent.pluginname',
|
||||
class: 'addon-block-blog-recent',
|
||||
component: CoreBlockPreRenderedComponent
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
@ -27,7 +26,7 @@ export class AddonBlockBlogTagsHandler extends CoreBlockBaseHandler {
|
|||
name = 'AddonBlockBlogTags';
|
||||
blockName = 'blog_tags';
|
||||
|
||||
constructor(private translate: TranslateService) {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -44,7 +43,7 @@ export class AddonBlockBlogTagsHandler extends CoreBlockBaseHandler {
|
|||
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
|
||||
return {
|
||||
title: this.translate.instant('addon.block_blogtags.pluginname'),
|
||||
title: 'addon.block_blogtags.pluginname',
|
||||
class: 'addon-block-blog-tags',
|
||||
component: CoreBlockPreRenderedComponent
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
import { CoreBlockBaseHandler } from '@core/block/classes/base-block-handler';
|
||||
|
@ -26,7 +25,7 @@ export class AddonBlockGlossaryRandomHandler extends CoreBlockBaseHandler {
|
|||
name = 'AddonBlockGlossaryRandom';
|
||||
blockName = 'glossary_random';
|
||||
|
||||
constructor(private translate: TranslateService) {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -42,7 +41,7 @@ export class AddonBlockGlossaryRandomHandler extends CoreBlockBaseHandler {
|
|||
getDisplayData(injector: Injector, block: any, contextLevel: string, instanceId: number)
|
||||
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
return {
|
||||
title: block.contents.title || this.translate.instant('addon.block_glossaryrandom.pluginname'),
|
||||
title: block.contents.title || 'addon.block_glossaryrandom.pluginname',
|
||||
class: 'addon-block-glossary-random',
|
||||
component: CoreBlockPreRenderedComponent
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
import { CoreBlockBaseHandler } from '@core/block/classes/base-block-handler';
|
||||
|
@ -26,7 +25,7 @@ export class AddonBlockNewsItemsHandler extends CoreBlockBaseHandler {
|
|||
name = 'AddonBlockNewsItems';
|
||||
blockName = 'news_items';
|
||||
|
||||
constructor(private translate: TranslateService) {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -42,7 +41,7 @@ export class AddonBlockNewsItemsHandler extends CoreBlockBaseHandler {
|
|||
getDisplayData(injector: Injector, block: any, contextLevel: string, instanceId: number)
|
||||
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
return {
|
||||
title: this.translate.instant('addon.block_newsitems.pluginname'),
|
||||
title: 'addon.block_newsitems.pluginname',
|
||||
class: 'addon-block-news-items',
|
||||
component: CoreBlockPreRenderedComponent
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
import { CoreBlockBaseHandler } from '@core/block/classes/base-block-handler';
|
||||
|
@ -26,7 +25,7 @@ export class AddonBlockOnlineUsersHandler extends CoreBlockBaseHandler {
|
|||
name = 'AddonBlockOnlineUsers';
|
||||
blockName = 'online_users';
|
||||
|
||||
constructor(private translate: TranslateService) {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -42,7 +41,7 @@ export class AddonBlockOnlineUsersHandler extends CoreBlockBaseHandler {
|
|||
getDisplayData(injector: Injector, block: any, contextLevel: string, instanceId: number)
|
||||
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
return {
|
||||
title: this.translate.instant('addon.block_onlineusers.pluginname'),
|
||||
title: 'addon.block_onlineusers.pluginname',
|
||||
class: 'addon-block-online-users',
|
||||
component: CoreBlockPreRenderedComponent
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
@ -27,7 +26,7 @@ export class AddonBlockRecentActivityHandler extends CoreBlockBaseHandler {
|
|||
name = 'AddonBlockRecentActivity';
|
||||
blockName = 'recent_activity';
|
||||
|
||||
constructor(private translate: TranslateService) {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -44,7 +43,7 @@ export class AddonBlockRecentActivityHandler extends CoreBlockBaseHandler {
|
|||
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
|
||||
return {
|
||||
title: this.translate.instant('addon.block_recentactivity.pluginname'),
|
||||
title: 'addon.block_recentactivity.pluginname',
|
||||
class: 'addon-block-recent-activity',
|
||||
component: CoreBlockPreRenderedComponent
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
@ -27,7 +26,7 @@ export class AddonBlockRssClientHandler extends CoreBlockBaseHandler {
|
|||
name = 'AddonBlockRssClient';
|
||||
blockName = 'rss_client';
|
||||
|
||||
constructor(private translate: TranslateService) {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -44,7 +43,7 @@ export class AddonBlockRssClientHandler extends CoreBlockBaseHandler {
|
|||
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
|
||||
return {
|
||||
title: block.contents.title || this.translate.instant('addon.block_rssclient.pluginname'),
|
||||
title: block.contents.title || 'addon.block_rssclient.pluginname',
|
||||
class: 'addon-block-rss-client',
|
||||
component: CoreBlockPreRenderedComponent
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
@ -27,7 +26,7 @@ export class AddonBlockTagsHandler extends CoreBlockBaseHandler {
|
|||
name = 'AddonBlockTags';
|
||||
blockName = 'tags';
|
||||
|
||||
constructor(private translate: TranslateService) {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -44,7 +43,7 @@ export class AddonBlockTagsHandler extends CoreBlockBaseHandler {
|
|||
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
|
||||
return {
|
||||
title: this.translate.instant('addon.block_tags.pluginname'),
|
||||
title: 'addon.block_tags.pluginname',
|
||||
class: 'addon-block-tags',
|
||||
component: CoreBlockPreRenderedComponent
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<ion-item-divider text-wrap *ngIf="title">
|
||||
<h2><core-format-text [text]="title"></core-format-text></h2>
|
||||
<h2><core-format-text [text]="title | translate"></core-format-text></h2>
|
||||
</ion-item-divider>
|
||||
<core-loading [hideUntil]="loaded" class="core-loading-center">
|
||||
<ion-item *ngIf="block.contents.content" text-wrap class="core-block-content">
|
||||
|
|
|
@ -15,14 +15,17 @@
|
|||
import { Injector } from '@angular/core';
|
||||
import { CoreSitePluginsBaseHandler } from './base-handler';
|
||||
import { CoreBlockHandler, CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||
import { CoreBlockPreRenderedComponent } from '@core/block/components/pre-rendered-block/pre-rendered-block';
|
||||
import { CoreSitePluginsBlockComponent } from '@core/siteplugins/components/block/block';
|
||||
import { CoreSitePluginsOnlyTitleBlockComponent } from '@core/siteplugins/components/only-title-block/only-title-block';
|
||||
|
||||
/**
|
||||
* Handler to support a block using a site plugin.
|
||||
*/
|
||||
export class CoreSitePluginsBlockHandler extends CoreSitePluginsBaseHandler implements CoreBlockHandler {
|
||||
|
||||
constructor(name: string, public blockName: string, protected handlerSchema: any, protected initResult: any) {
|
||||
constructor(name: string, public title: string, public blockName: string, protected handlerSchema: any,
|
||||
protected initResult: any) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
|
@ -38,23 +41,27 @@ export class CoreSitePluginsBlockHandler extends CoreSitePluginsBaseHandler impl
|
|||
*/
|
||||
getDisplayData(injector: Injector, block: any, contextLevel: string, instanceId: number):
|
||||
CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||
let title,
|
||||
className;
|
||||
if (this.handlerSchema.displaydata && this.handlerSchema.displaydata.title) {
|
||||
title = this.handlerSchema.displaydata.title;
|
||||
} else {
|
||||
title = 'plugins.block_' + block.name + '.pluginname';
|
||||
}
|
||||
let className,
|
||||
component;
|
||||
|
||||
if (this.handlerSchema.displaydata && this.handlerSchema.displaydata.class) {
|
||||
className = this.handlerSchema.displaydata.class;
|
||||
} else {
|
||||
className = 'block_' + block.name;
|
||||
}
|
||||
|
||||
if (this.handlerSchema.displaydata && this.handlerSchema.displaydata.type == 'title') {
|
||||
component = CoreSitePluginsOnlyTitleBlockComponent;
|
||||
} else if (this.handlerSchema.displaydata && this.handlerSchema.displaydata.type == 'prerendered') {
|
||||
component = CoreBlockPreRenderedComponent;
|
||||
} else {
|
||||
component = CoreSitePluginsBlockComponent;
|
||||
}
|
||||
|
||||
return {
|
||||
title: title,
|
||||
title: this.title,
|
||||
class: className,
|
||||
component: CoreSitePluginsBlockComponent
|
||||
component: component
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,10 @@ export class CoreSitePluginsBlockComponent extends CoreBlockBaseComponent implem
|
|||
if (handler) {
|
||||
this.component = handler.plugin.component;
|
||||
this.method = handler.handlerSchema.method;
|
||||
this.args = { };
|
||||
this.args = {
|
||||
contextlevel: this.contextLevel,
|
||||
instanceid: this.instanceId,
|
||||
};
|
||||
this.initResult = handler.initResult;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,12 +30,14 @@ import { CoreSitePluginsAssignFeedbackComponent } from './assign-feedback/assign
|
|||
import { CoreSitePluginsAssignSubmissionComponent } from './assign-submission/assign-submission';
|
||||
import { CoreSitePluginsWorkshopAssessmentStrategyComponent } from './workshop-assessment-strategy/workshop-assessment-strategy';
|
||||
import { CoreSitePluginsBlockComponent } from '@core/siteplugins/components/block/block';
|
||||
import { CoreSitePluginsOnlyTitleBlockComponent } from '@core/siteplugins/components/only-title-block/only-title-block';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
CoreSitePluginsPluginContentComponent,
|
||||
CoreSitePluginsModuleIndexComponent,
|
||||
CoreSitePluginsBlockComponent,
|
||||
CoreSitePluginsOnlyTitleBlockComponent,
|
||||
CoreSitePluginsCourseOptionComponent,
|
||||
CoreSitePluginsCourseFormatComponent,
|
||||
CoreSitePluginsUserProfileFieldComponent,
|
||||
|
@ -59,6 +61,7 @@ import { CoreSitePluginsBlockComponent } from '@core/siteplugins/components/bloc
|
|||
CoreSitePluginsPluginContentComponent,
|
||||
CoreSitePluginsModuleIndexComponent,
|
||||
CoreSitePluginsBlockComponent,
|
||||
CoreSitePluginsOnlyTitleBlockComponent,
|
||||
CoreSitePluginsCourseOptionComponent,
|
||||
CoreSitePluginsCourseFormatComponent,
|
||||
CoreSitePluginsUserProfileFieldComponent,
|
||||
|
@ -72,6 +75,7 @@ import { CoreSitePluginsBlockComponent } from '@core/siteplugins/components/bloc
|
|||
entryComponents: [
|
||||
CoreSitePluginsModuleIndexComponent,
|
||||
CoreSitePluginsBlockComponent,
|
||||
CoreSitePluginsOnlyTitleBlockComponent,
|
||||
CoreSitePluginsCourseOptionComponent,
|
||||
CoreSitePluginsCourseFormatComponent,
|
||||
CoreSitePluginsUserProfileFieldComponent,
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<ion-item-divider text-wrap detail-push (click)="gotoBlock($event)">
|
||||
<h2>{{ title | translate }}</h2>
|
||||
</ion-item-divider>
|
|
@ -0,0 +1,69 @@
|
|||
// (C) Copyright 2015 Martin Dougiamas
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { Injector, OnInit, Component, Optional } from '@angular/core';
|
||||
import { NavController } from 'ionic-angular';
|
||||
import { CoreBlockBaseComponent } from '@core/block/classes/base-block-component';
|
||||
import { CoreSitePluginsProvider } from '../../providers/siteplugins';
|
||||
import { CoreBlockDelegate } from '@core/block/providers/delegate';
|
||||
import { CoreSplitViewComponent } from '@components/split-view/split-view';
|
||||
|
||||
/**
|
||||
* Component to render blocks with only a title and link.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'core-siteplugins-only-title-block',
|
||||
templateUrl: 'core-siteplugins-only-title-block.html'
|
||||
})
|
||||
export class CoreSitePluginsOnlyTitleBlockComponent extends CoreBlockBaseComponent implements OnInit {
|
||||
|
||||
constructor(injector: Injector, protected sitePluginsProvider: CoreSitePluginsProvider,
|
||||
protected blockDelegate: CoreBlockDelegate, private navCtrl: NavController,
|
||||
@Optional() private svComponent: CoreSplitViewComponent) {
|
||||
|
||||
super(injector, 'CoreSitePluginsOnlyTitleBlockComponent');
|
||||
}
|
||||
|
||||
/**
|
||||
* Component being initialized.
|
||||
*/
|
||||
ngOnInit(): void {
|
||||
super.ngOnInit();
|
||||
|
||||
this.fetchContentDefaultError = 'Error getting ' + this.block.contents.title + ' data.';
|
||||
}
|
||||
|
||||
/**
|
||||
* Go to the block page.
|
||||
*/
|
||||
gotoBlock(): void {
|
||||
const handlerName = this.blockDelegate.getHandlerName(this.block.name);
|
||||
const handler = this.sitePluginsProvider.getSitePluginHandler(handlerName);
|
||||
|
||||
if (handler) {
|
||||
const navCtrl = this.svComponent ? this.svComponent.getMasterNav() : this.navCtrl;
|
||||
|
||||
navCtrl.push('CoreSitePluginsPluginPage', {
|
||||
title: this.title,
|
||||
component: handler.plugin.component,
|
||||
method: handler.handlerSchema.method,
|
||||
initResult: handler.initResult,
|
||||
args: {
|
||||
contextlevel: this.contextLevel,
|
||||
instanceid: this.instanceId,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -661,10 +661,11 @@ export class CoreSitePluginsHelperProvider {
|
|||
string | Promise<string> {
|
||||
|
||||
const uniqueName = this.sitePluginsProvider.getHandlerUniqueName(plugin, handlerName),
|
||||
blockName = (handlerSchema.moodlecomponent || plugin.component).replace('block_', '');
|
||||
blockName = (handlerSchema.moodlecomponent || plugin.component).replace('block_', ''),
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title || 'pluginname');
|
||||
|
||||
this.blockDelegate.registerHandler(
|
||||
new CoreSitePluginsBlockHandler(uniqueName, blockName, handlerSchema, initResult));
|
||||
new CoreSitePluginsBlockHandler(uniqueName, prefixedTitle, blockName, handlerSchema, initResult));
|
||||
|
||||
return uniqueName;
|
||||
}
|
||||
|
@ -709,7 +710,7 @@ export class CoreSitePluginsHelperProvider {
|
|||
|
||||
// Create and register the handler.
|
||||
const uniqueName = this.sitePluginsProvider.getHandlerUniqueName(plugin, handlerName),
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title),
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title || 'pluginname'),
|
||||
handler = new CoreSitePluginsCourseOptionHandler(uniqueName, prefixedTitle, plugin,
|
||||
handlerSchema, initResult, this.sitePluginsProvider, this.utils);
|
||||
|
||||
|
@ -749,7 +750,7 @@ export class CoreSitePluginsHelperProvider {
|
|||
|
||||
// Create and register the handler.
|
||||
const uniqueName = this.sitePluginsProvider.getHandlerUniqueName(plugin, handlerName),
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title);
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title || 'pluginname');
|
||||
|
||||
this.mainMenuDelegate.registerHandler(
|
||||
new CoreSitePluginsMainMenuHandler(uniqueName, prefixedTitle, plugin, handlerSchema, initResult));
|
||||
|
@ -778,7 +779,7 @@ export class CoreSitePluginsHelperProvider {
|
|||
|
||||
// Create and register the handler.
|
||||
const uniqueName = this.sitePluginsProvider.getHandlerUniqueName(plugin, handlerName),
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title),
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title || 'pluginname'),
|
||||
processorName = (handlerSchema.moodlecomponent || plugin.component).replace('message_', '');
|
||||
|
||||
this.messageOutputDelegate.registerHandler(new CoreSitePluginsMessageOutputHandler(uniqueName, processorName,
|
||||
|
@ -897,7 +898,7 @@ export class CoreSitePluginsHelperProvider {
|
|||
|
||||
// Create and register the handler.
|
||||
const uniqueName = this.sitePluginsProvider.getHandlerUniqueName(plugin, handlerName),
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title);
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title || 'pluginname');
|
||||
|
||||
this.settingsDelegate.registerHandler(
|
||||
new CoreSitePluginsSettingsHandler(uniqueName, prefixedTitle, plugin, handlerSchema, initResult));
|
||||
|
@ -926,7 +927,7 @@ export class CoreSitePluginsHelperProvider {
|
|||
|
||||
// Create and register the handler.
|
||||
const uniqueName = this.sitePluginsProvider.getHandlerUniqueName(plugin, handlerName),
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title),
|
||||
prefixedTitle = this.getPrefixedString(plugin.addon, handlerSchema.displaydata.title || 'pluginname'),
|
||||
handler = new CoreSitePluginsUserProfileHandler(uniqueName, prefixedTitle, plugin, handlerSchema,
|
||||
initResult, this.sitePluginsProvider, this.utils);
|
||||
|
||||
|
|
Loading…
Reference in New Issue