MOBILE-2354 workshop: Inject providers and components to compile
parent
7a86e1beeb
commit
27c57b01b0
|
@ -293,7 +293,8 @@ var templatesSrc = [
|
||||||
'./src/core/**/components/**/*.html',
|
'./src/core/**/components/**/*.html',
|
||||||
'./src/core/**/component/**/*.html',
|
'./src/core/**/component/**/*.html',
|
||||||
// Only some addon components are injected to compile to decrease load time. Copy only the ones that are needed.
|
// Only some addon components are injected to compile to decrease load time. Copy only the ones that are needed.
|
||||||
'./src/addon/mod/assign/components/**/*.html'
|
'./src/addon/mod/assign/components/**/*.html',
|
||||||
|
'./src/addon/mod/workshop/components/**/*.html'
|
||||||
],
|
],
|
||||||
templatesDest = './www/templates';
|
templatesDest = './www/templates';
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ import { AddonWorkshopAssessmentStrategyDelegate } from '../../providers/assessm
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'addon-mod-workshop-assessment-strategy',
|
selector: 'addon-mod-workshop-assessment-strategy',
|
||||||
templateUrl: 'assessment-strategy.html',
|
templateUrl: 'addon-mod-workshop-assessment-strategy.html',
|
||||||
})
|
})
|
||||||
export class AddonModWorkshopAssessmentStrategyComponent implements OnInit {
|
export class AddonModWorkshopAssessmentStrategyComponent implements OnInit {
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { AddonModWorkshopOfflineProvider } from '../../providers/offline';
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'addon-mod-workshop-assessment',
|
selector: 'addon-mod-workshop-assessment',
|
||||||
templateUrl: 'assessment.html',
|
templateUrl: 'addon-mod-workshop-assessment.html',
|
||||||
})
|
})
|
||||||
export class AddonModWorkshopAssessmentComponent implements OnInit {
|
export class AddonModWorkshopAssessmentComponent implements OnInit {
|
||||||
@Input() assessment: any;
|
@Input() assessment: any;
|
||||||
|
|
|
@ -27,7 +27,7 @@ import { AddonModWorkshopOfflineProvider } from '../../providers/offline';
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'addon-mod-workshop-index',
|
selector: 'addon-mod-workshop-index',
|
||||||
templateUrl: 'index.html',
|
templateUrl: 'addon-mod-workshop-index.html',
|
||||||
})
|
})
|
||||||
export class AddonModWorkshopIndexComponent extends CoreCourseModuleMainActivityComponent {
|
export class AddonModWorkshopIndexComponent extends CoreCourseModuleMainActivityComponent {
|
||||||
@Input() group = 0;
|
@Input() group = 0;
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { AddonModWorkshopOfflineProvider } from '../../providers/offline';
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'addon-mod-workshop-submission',
|
selector: 'addon-mod-workshop-submission',
|
||||||
templateUrl: 'submission.html',
|
templateUrl: 'addon-mod-workshop-submission.html',
|
||||||
})
|
})
|
||||||
export class AddonModWorkshopSubmissionComponent implements OnInit {
|
export class AddonModWorkshopSubmissionComponent implements OnInit {
|
||||||
@Input() submission: any;
|
@Input() submission: any;
|
||||||
|
|
|
@ -30,6 +30,15 @@ import { AddonModWorkshopPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModWorkshopSyncCronHandler } from './providers/sync-cron-handler';
|
import { AddonModWorkshopSyncCronHandler } from './providers/sync-cron-handler';
|
||||||
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
||||||
|
|
||||||
|
// List of providers (without handlers).
|
||||||
|
export const ADDON_MOD_WORKSHOP_PROVIDERS: any[] = [
|
||||||
|
AddonModWorkshopProvider,
|
||||||
|
AddonModWorkshopOfflineProvider,
|
||||||
|
AddonModWorkshopSyncProvider,
|
||||||
|
AddonModWorkshopHelperProvider,
|
||||||
|
AddonWorkshopAssessmentStrategyDelegate
|
||||||
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
],
|
],
|
||||||
|
|
|
@ -108,6 +108,7 @@ import { ADDON_MOD_SCORM_PROVIDERS } from '@addon/mod/scorm/scorm.module';
|
||||||
import { ADDON_MOD_SURVEY_PROVIDERS } from '@addon/mod/survey/survey.module';
|
import { ADDON_MOD_SURVEY_PROVIDERS } from '@addon/mod/survey/survey.module';
|
||||||
import { ADDON_MOD_URL_PROVIDERS } from '@addon/mod/url/url.module';
|
import { ADDON_MOD_URL_PROVIDERS } from '@addon/mod/url/url.module';
|
||||||
import { ADDON_MOD_WIKI_PROVIDERS } from '@addon/mod/wiki/wiki.module';
|
import { ADDON_MOD_WIKI_PROVIDERS } from '@addon/mod/wiki/wiki.module';
|
||||||
|
import { ADDON_MOD_WORKSHOP_PROVIDERS } from '@addon/mod/workshop/workshop.module';
|
||||||
import { ADDON_NOTES_PROVIDERS } from '@addon/notes/notes.module';
|
import { ADDON_NOTES_PROVIDERS } from '@addon/notes/notes.module';
|
||||||
import { ADDON_NOTIFICATIONS_PROVIDERS } from '@addon/notifications/notifications.module';
|
import { ADDON_NOTIFICATIONS_PROVIDERS } from '@addon/notifications/notifications.module';
|
||||||
import { ADDON_PUSHNOTIFICATIONS_PROVIDERS } from '@addon/pushnotifications/pushnotifications.module';
|
import { ADDON_PUSHNOTIFICATIONS_PROVIDERS } from '@addon/pushnotifications/pushnotifications.module';
|
||||||
|
@ -115,6 +116,7 @@ import { ADDON_REMOTETHEMES_PROVIDERS } from '@addon/remotethemes/remotethemes.m
|
||||||
|
|
||||||
// Import some addon modules that define components, directives and pipes. Only import the important ones.
|
// Import some addon modules that define components, directives and pipes. Only import the important ones.
|
||||||
import { AddonModAssignComponentsModule } from '@addon/mod/assign/components/components.module';
|
import { AddonModAssignComponentsModule } from '@addon/mod/assign/components/components.module';
|
||||||
|
import { AddonModWorkshopComponentsModule } from '@addon/mod/workshop/components/components.module';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service to provide functionalities regarding compiling dynamic HTML and Javascript.
|
* Service to provide functionalities regarding compiling dynamic HTML and Javascript.
|
||||||
|
@ -136,6 +138,7 @@ export class CoreCompileProvider {
|
||||||
IonicModule, TranslateModule.forChild(), CoreComponentsModule, CoreDirectivesModule, CorePipesModule,
|
IonicModule, TranslateModule.forChild(), CoreComponentsModule, CoreDirectivesModule, CorePipesModule,
|
||||||
CoreCourseComponentsModule, CoreCoursesComponentsModule, CoreSiteHomeComponentsModule, CoreUserComponentsModule,
|
CoreCourseComponentsModule, CoreCoursesComponentsModule, CoreSiteHomeComponentsModule, CoreUserComponentsModule,
|
||||||
CoreCourseDirectivesModule, CoreSitePluginsDirectivesModule, CoreQuestionComponentsModule, AddonModAssignComponentsModule,
|
CoreCourseDirectivesModule, CoreSitePluginsDirectivesModule, CoreQuestionComponentsModule, AddonModAssignComponentsModule,
|
||||||
|
AddonModWorkshopComponentsModule
|
||||||
];
|
];
|
||||||
|
|
||||||
constructor(protected injector: Injector, logger: CoreLoggerProvider, compilerFactory: JitCompilerFactory) {
|
constructor(protected injector: Injector, logger: CoreLoggerProvider, compilerFactory: JitCompilerFactory) {
|
||||||
|
@ -222,7 +225,7 @@ export class CoreCompileProvider {
|
||||||
.concat(ADDON_MOD_LESSON_PROVIDERS).concat(ADDON_MOD_LTI_PROVIDERS).concat(ADDON_MOD_PAGE_PROVIDERS)
|
.concat(ADDON_MOD_LESSON_PROVIDERS).concat(ADDON_MOD_LTI_PROVIDERS).concat(ADDON_MOD_PAGE_PROVIDERS)
|
||||||
.concat(ADDON_MOD_QUIZ_PROVIDERS).concat(ADDON_MOD_RESOURCE_PROVIDERS).concat(ADDON_MOD_SCORM_PROVIDERS)
|
.concat(ADDON_MOD_QUIZ_PROVIDERS).concat(ADDON_MOD_RESOURCE_PROVIDERS).concat(ADDON_MOD_SCORM_PROVIDERS)
|
||||||
.concat(ADDON_MOD_SURVEY_PROVIDERS).concat(ADDON_MOD_URL_PROVIDERS).concat(ADDON_MOD_WIKI_PROVIDERS)
|
.concat(ADDON_MOD_SURVEY_PROVIDERS).concat(ADDON_MOD_URL_PROVIDERS).concat(ADDON_MOD_WIKI_PROVIDERS)
|
||||||
.concat(ADDON_NOTES_PROVIDERS).concat(ADDON_NOTIFICATIONS_PROVIDERS)
|
.concat(ADDON_MOD_WORKSHOP_PROVIDERS).concat(ADDON_NOTES_PROVIDERS).concat(ADDON_NOTIFICATIONS_PROVIDERS)
|
||||||
.concat(ADDON_PUSHNOTIFICATIONS_PROVIDERS).concat(ADDON_REMOTETHEMES_PROVIDERS);
|
.concat(ADDON_PUSHNOTIFICATIONS_PROVIDERS).concat(ADDON_REMOTETHEMES_PROVIDERS);
|
||||||
|
|
||||||
// We cannot inject anything to this constructor. Use the Injector to inject all the providers into the instance.
|
// We cannot inject anything to this constructor. Use the Injector to inject all the providers into the instance.
|
||||||
|
|
Loading…
Reference in New Issue