diff --git a/src/addon/mod/url/components/index/addon-mod-url-index.html b/src/addon/mod/url/components/index/addon-mod-url-index.html index 00e14a049..8bfe7d722 100644 --- a/src/addon/mod/url/components/index/addon-mod-url-index.html +++ b/src/addon/mod/url/components/index/addon-mod-url-index.html @@ -10,7 +10,7 @@ - +
diff --git a/src/addon/mod/url/components/index/index.ts b/src/addon/mod/url/components/index/index.ts index 16c7942a8..3b5c581ba 100644 --- a/src/addon/mod/url/components/index/index.ts +++ b/src/addon/mod/url/components/index/index.ts @@ -40,6 +40,7 @@ export class AddonModUrlIndexComponent extends CoreCourseModuleMainResourceCompo isAudio = false; isVideo = false; mimetype: string; + displayDescription = true; constructor(injector: Injector, private urlProvider: AddonModUrlProvider, private courseProvider: CoreCourseProvider, private urlHelper: AddonModUrlHelperProvider, private mimeUtils: CoreMimetypeUtilsProvider, @@ -98,6 +99,11 @@ export class AddonModUrlIndexComponent extends CoreCourseModuleMainResourceCompo this.description = url.intro || url.description; this.dataRetrieved.emit(url); + if (canGetUrl && url.displayoptions) { + const unserialized = this.textUtils.unserialize(url.displayoptions); + this.displayDescription = typeof unserialized.printintro == 'undefined' || !!unserialized.printintro; + } + if (!canGetUrl) { mod = url;