From 0f56c9da089a0bb53c61d1c9efbb16f2f1d3932e Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 30 Apr 2008 12:39:31 +0000 Subject: [PATCH] MDL-14621 fix warning when module code missing and editing course --- course/lib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/course/lib.php b/course/lib.php index 654b1d84c4..8f5d5ee9b1 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1318,6 +1318,10 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, continue; } } else { + if (!file_exists("$CFG->dirroot/mod/$mod->modname/lib.php")) { + // module not installed + continue; + } if (!coursemodule_visible_for_user($mod)) { // full visibility check continue; -- 2.39.5