diff --git a/src/core/course/providers/helper.ts b/src/core/course/providers/helper.ts index d5a27649b..11d5a869f 100644 --- a/src/core/course/providers/helper.ts +++ b/src/core/course/providers/helper.ts @@ -1114,6 +1114,11 @@ export class CoreCourseHelperProvider { return Promise.resolve(); } + if (section.hiddenbynumsections) { + // Hidden section. + return Promise.resolve(); + } + section.isDownloading = true; // Validate the section needs to be downloaded and calculate amount of modules that need to be downloaded. diff --git a/src/core/course/providers/module-prefetch-delegate.ts b/src/core/course/providers/module-prefetch-delegate.ts index 50f0e22de..722a2cc59 100644 --- a/src/core/course/providers/module-prefetch-delegate.ts +++ b/src/core/course/providers/module-prefetch-delegate.ts @@ -953,6 +953,11 @@ export class CoreCourseModulePrefetchDelegate extends CoreDelegate { * @return {Promise} Promise resolved with true if downloadable, false otherwise. */ isModuleDownloadable(module: any, courseId: number): Promise { + if (module.uservisible === false) { + // Module isn't visible by the user, cannot be downloaded. + return Promise.resolve(false); + } + const handler = this.getPrefetchHandlerFor(module); if (handler) {