]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11525 When courseid is not present in the log entry, showing "Site" instead of...
authornicolasconnault <nicolasconnault>
Fri, 5 Oct 2007 04:24:42 +0000 (04:24 +0000)
committernicolasconnault <nicolasconnault>
Fri, 5 Oct 2007 04:24:42 +0000 (04:24 +0000)
course/lib.php

index 41d1d4ce9603c50433d0143ae4afd28f546822ad..c3e520fd0a794f8ad14286fd9f9bb555337f5ad5 100644 (file)
@@ -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 "<td class=\"cell c0\">\n";
             if (empty($log->course)) {
-                echo format_string($log->info)."\n";
+                echo get_string('site') . "\n";
             } else {
                 echo "    <a href=\"{$CFG->wwwroot}/course/view.php?id={$log->course}\">". format_string($courses[$log->course])."</a>\n";
             }
@@ -2921,4 +2922,4 @@ function update_course($data) {
     return false;
 }
 
-?>
\ No newline at end of file
+?>