From: skodak Date: Wed, 30 Apr 2008 12:39:31 +0000 (+0000) Subject: MDL-14621 fix warning when module code missing and editing course X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0f56c9da089a0bb53c61d1c9efbb16f2f1d3932e;p=moodle.git MDL-14621 fix warning when module code missing and editing course --- 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;