diff --git a/src/addons/mod/label/services/handlers/module.ts b/src/addons/mod/label/services/handlers/module.ts index fe1306f3e..495e9cd51 100644 --- a/src/addons/mod/label/services/handlers/module.ts +++ b/src/addons/mod/label/services/handlers/module.ts @@ -39,6 +39,7 @@ export class AddonModLabelModuleHandlerService extends CoreModuleHandlerBase imp [CoreConstants.FEATURE_GRADE_OUTCOMES]: false, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_NO_VIEW_LINK]: true, }; /** diff --git a/src/core/features/course/services/course.ts b/src/core/features/course/services/course.ts index 81505df14..49590c2af 100644 --- a/src/core/features/course/services/course.ts +++ b/src/core/features/course/services/course.ts @@ -44,6 +44,7 @@ import { CoreSitePlugins } from '@features/siteplugins/services/siteplugins'; import { CoreCourseAutoSyncData, CoreCourseSyncProvider } from './sync'; import { CoreTagItem } from '@features/tag/services/tag'; import { CoreNavigator } from '@services/navigator'; +import { CoreCourseModuleDelegate } from './module-delegate'; const ROOT_CACHE_KEY = 'mmCourse:'; @@ -1058,6 +1059,14 @@ export class CoreCourseProvider { * @return Whether the module has a view page. */ moduleHasView(module: CoreCourseModuleSummary | CoreCourseWSModule): boolean { + if ('modname' in module) { + // noviewlink was introduced in 3.8.5, use supports feature as a fallback. + if (module.noviewlink || + CoreCourseModuleDelegate.supportsFeature(module.modname, CoreConstants.FEATURE_NO_VIEW_LINK, false)) { + return false; + } + } + return !!module.url; }