From: moodler Date: Mon, 13 Jan 2003 14:11:05 +0000 (+0000) Subject: A little more robustness X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9ae687afb0861928924fcce0d986eee102e9fcad;p=moodle.git A little more robustness --- diff --git a/course/lib.php b/course/lib.php index 8452c91d4d..403aacac54 100644 --- a/course/lib.php +++ b/course/lib.php @@ -2,6 +2,10 @@ // Library of useful functions +if (isset($COURSE_MAX_LOG_DISPLAY)) { // Being included again - should never happen!! + return; +} + $COURSE_MAX_LOG_DISPLAY = 150; // days $COURSE_MAX_LOGS_PER_PAGE = 1000; // records @@ -11,6 +15,7 @@ $COURSE_TEACHER_COLOR = "#990000"; // To hilight certain items that are teache $COURSE_LIVELOG_REFRESH = 60; // Seconds + function print_log_selector_form($course, $selecteduser=0, $selecteddate="today") { global $USER, $CFG; @@ -514,6 +519,9 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, $sectionmods = explode(",", $section->sequence); foreach ($sectionmods as $modnumber) { + if (empty($mods[$modnumber])) { + continue; + } $mod = $mods[$modnumber]; $instancename = urldecode($modinfo[$modnumber]->name); echo "wwwroot/mod/$mod->modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\">";