From: nicolasconnault Date: Fri, 5 Oct 2007 04:24:42 +0000 (+0000) Subject: MDL-11525 When courseid is not present in the log entry, showing "Site" instead of... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=05a334392c37446897a9c0487fab09b147af58b9;p=moodle.git MDL-11525 When courseid is not present in the log entry, showing "Site" instead of $log->info --- diff --git a/course/lib.php b/course/lib.php index 41d1d4ce96..c3e520fd0a 100644 --- a/course/lib.php +++ b/course/lib.php @@ -404,13 +404,14 @@ function build_logs_array($course, $user=0, $date=0, $order="l.time ASC", $limit } } + /// Getting all members of a group. if ($groupid and !$user) { if ($gusers = groups_get_members($groupid)) { $gusers = array_keys($gusers); $joins[] = 'l.userid IN (' . implode(',', $gusers) . ')'; } else { - $joins[] = 'l.userid = 0'; // No users in groups, so we want something that will always by false. + $joins[] = 'l.userid = 0'; // No users in groups, so we want something that will always be false. } } else if ($user) { @@ -520,7 +521,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per if ($course->id == SITEID) { echo "\n"; if (empty($log->course)) { - echo format_string($log->info)."\n"; + echo get_string('site') . "\n"; } else { echo " wwwroot}/course/view.php?id={$log->course}\">". format_string($courses[$log->course])."\n"; } @@ -2921,4 +2922,4 @@ function update_course($data) { return false; } -?> \ No newline at end of file +?>