]> git.mjollnir.org Git - moodle.git/commitdiff
Reverting to previous revision. MDL-14668 ; merged from 19_STABLE
authorstronk7 <stronk7>
Wed, 7 May 2008 18:28:59 +0000 (18:28 +0000)
committerstronk7 <stronk7>
Wed, 7 May 2008 18:28:59 +0000 (18:28 +0000)
course/lib.php

index 54b944198e7c29be7bd669c8f4daea6154c13378..3e79a8252229d2a2be859bbe51b9f6c6a05a6666 100644 (file)
@@ -232,16 +232,13 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per
 
     if ($course->id == SITEID) {
         $courses[0] = '';
-        if ($ccc = get_courses('all', 'c.id ASC',
-                    'c.id,c.shortname,c.fullname')) {
+        if ($ccc = get_courses('all', 'c.id ASC', 'c.id,c.shortname')) {
             foreach ($ccc as $cc) {
-                $courses[$cc->id]['shortname'] = $cc->shortname;
-                $courses[$cc->id]['fullname'] = $cc->fullname;
+                $courses[$cc->id] = $cc->shortname;
             }
         }
     } else {
-        $courses[$course->id]['shortname'] = $course->shortname;
-        $courses[$course->id]['fullname'] = $course->fullname;
+        $courses[$course->id] = $course->shortname;
     }
 
     $totalcount = $logs['totalcount'];
@@ -314,8 +311,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per
             if (empty($log->course)) {
                 echo get_string('site') . "\n";
             } else {
-                echo "    <a href=\"{$CFG->wwwroot}/course/view.php?id={$log->course}\">".
-                    format_string($courses[$log->course]['shortname'])."</a>\n";
+                echo "    <a href=\"{$CFG->wwwroot}/course/view.php?id={$log->course}\">". format_string($courses[$log->course])."</a>\n";
             }
             echo "</td>\n";
         }
@@ -324,9 +320,9 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per
         echo "<td class=\"cell c2\">\n";
         link_to_popup_window("/iplookup/index.php?ip=$log->ip&amp;user=$log->userid", 'iplookup',$log->ip, 440, 700);
         echo "</td>\n";
+        $fullname = fullname($log, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id)));
         echo "<td class=\"cell c3\">\n";
-        echo "    <a href=\"$CFG->wwwroot/course/view.php?id={$log->userid}&amp;course={$log->course}\">".
-            format_string($courses[$log->course]['fullname'])."</a>\n";
+        echo "    <a href=\"$CFG->wwwroot/user/view.php?id={$log->userid}&amp;course={$log->course}\">$fullname</a>\n";
         echo "</td>\n";
         echo "<td class=\"cell c4\">\n";
         $displayaction="$log->module $log->action";