diff --git a/course/user.php b/course/user.php index 8d45551315d..f0ea2d24a79 100644 --- a/course/user.php +++ b/course/user.php @@ -116,6 +116,11 @@ continue; } $mod = $mods[$sectionmod]; + + if (empty($mod->visible)) { + continue; + } + $instance = get_record("$mod->modname", "id", "$mod->instance"); $libfile = "$CFG->dirroot/mod/$mod->modname/lib.php";