Skip to content

Commit

Permalink
Make code slightly more robust, merged from MOODLE_18_STABLE.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhunt committed Jun 7, 2007
1 parent 1c307f2 commit edf3ef0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit edf3ef0

Please sign in to comment.