diff --git a/src/addon/mod/resource/components/index/addon-mod-resource-index.html b/src/addon/mod/resource/components/index/addon-mod-resource-index.html index 45056cdcd..bfe0d9270 100644 --- a/src/addon/mod/resource/components/index/addon-mod-resource-index.html +++ b/src/addon/mod/resource/components/index/addon-mod-resource-index.html @@ -13,7 +13,7 @@ - + diff --git a/src/addon/mod/resource/components/index/index.ts b/src/addon/mod/resource/components/index/index.ts index 1717d360a..815aa1388 100644 --- a/src/addon/mod/resource/components/index/index.ts +++ b/src/addon/mod/resource/components/index/index.ts @@ -36,6 +36,7 @@ export class AddonModResourceIndexComponent extends CoreCourseModuleMainResource mode: string; src: string; contentText: string; + displayDescription = true; constructor(injector: Injector, private resourceProvider: AddonModResourceProvider, private courseProvider: CoreCourseProvider, private appProvider: CoreAppProvider, private prefetchHandler: AddonModResourcePrefetchHandler, @@ -96,6 +97,8 @@ export class AddonModResourceIndexComponent extends CoreCourseModuleMainResource }).then((resource) => { if (resource) { this.description = resource.intro || resource.description; + const options = this.textUtils.unserialize(resource.displayoptions) || {}; + this.displayDescription = typeof options.printintro == 'undefined' || !!options.printintro; this.dataRetrieved.emit(resource); }