fixed warning when module code missing; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2008-02-15 10:39:47 +00:00
parent 2b0689c912
commit ffd58dd626

View File

@ -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();