From: skodak Date: Fri, 15 Feb 2008 10:39:47 +0000 (+0000) Subject: fixed warning when module code missing; merged from MOODLE_19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ffd58dd62620617a84ac245a2f81cc33abd3502a;p=moodle.git fixed warning when module code missing; merged from MOODLE_19_STABLE --- diff --git a/course/lib.php b/course/lib.php index a063c2fe56..83cc1046e6 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1445,7 +1445,11 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false, continue; } - include_once("$CFG->dirroot/mod/$modname/lib.php"); + $libfile = "$CFG->dirroot/mod/$modname/lib.php"; + if (!file_exists($libfile)) { + continue; + } + include_once($libfile); $gettypesfunc = $modname.'_get_types'; if (function_exists($gettypesfunc)) { $types = $gettypesfunc();