fixed warning when module code missing

This commit is contained in:
skodak
2008-02-15 10:38:37 +00:00
parent 02bb190c1d
commit 32d746f1d7
+5 -1
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();