From ffd58dd62620617a84ac245a2f81cc33abd3502a Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 15 Feb 2008 10:39:47 +0000 Subject: [PATCH] fixed warning when module code missing; merged from MOODLE_19_STABLE --- course/lib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); -- 2.39.5