]> git.mjollnir.org Git - moodle.git/commitdiff
Make code slightly more robust, merged from MOODLE_18_STABLE.
authortjhunt <tjhunt>
Thu, 7 Jun 2007 15:33:56 +0000 (15:33 +0000)
committertjhunt <tjhunt>
Thu, 7 Jun 2007 15:33:56 +0000 (15:33 +0000)
course/lib.php

index 71d64dc9da93fd04163f2ba5976084ac81b2a5b8..60840dd333e621f9ff8c965aa49ec4f63e27b48e 100644 (file)
@@ -501,7 +501,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per
             $ld = get_record('log_display', 'module', $log->module, 'action', $log->action);
             $ldcache[$log->module][$log->action] = $ld;
         }
-        if ($ld && !empty($log->info)) {
+        if ($ld && is_numeric($log->info)) {
             // ugly hack to make sure fullname is shown correctly
             if (($ld->mtable == 'user') and ($ld->field == sql_concat('firstname', "' '" , 'lastname'))) {
                 $log->info = fullname(get_record($ld->mtable, 'id', $log->info), true);
@@ -1415,7 +1415,8 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
                 }
 
                 if ($isediting) {
-                    if ($groupbuttons and $mod->modname != 'label' and $mod->modname != 'resource') {
+                    // TODO: we must define this as mod property!
+                    if ($groupbuttons and $mod->modname != 'label' and $mod->modname != 'resource' and $mod->modname != 'glossary') {
                         if (! $mod->groupmodelink = $groupbuttonslink) {
                             $mod->groupmode = $course->groupmode;
                         }