]> git.mjollnir.org Git - moodle.git/commitdiff
Use the new print_user function for the group
authormoodler <moodler>
Sat, 10 Jan 2004 16:49:17 +0000 (16:49 +0000)
committermoodler <moodler>
Sat, 10 Jan 2004 16:49:17 +0000 (16:49 +0000)
course/group.php

index 2d3ecc0446b809276a838b060d484a0e99ba612a..feb00ca5dab2acfcb7ad2a09c5494ed605115f6b 100644 (file)
     echo '<br />';
 
     if ($users = get_users_in_group($group->id)) {
-        $table->align = array('left', 'left');
-        $table->width = array('100', '*');
         foreach ($users as $user) {
-            if (!$lastaccess = get_field("user_students", "timeaccess", "userid", $user->id, "course", $course->id)) {
-                if (!$lastaccess = get_field("user_teachers", "timeaccess", "userid", $user->id, "course", $course->id)) {
-                    $datestring = get_string("never");
-                }
-            }
-            if ($lastaccess) {
-                $datestring = userdate($lastaccess)."&nbsp (".format_time(time() - $lastaccess).")";
-            }
-            $information = '<p><b>'.fullname($user).'</b></p>'.get_string("lastaccess").": $datestring";
-            $table->data[] = array(print_user_picture($user->id, $course->id, $user->picture, true, true), $information);
+            print_user($user, $course);
         }
-        print_table($table);
     } else {
         print_heading(get_string('nousersyet'));
     }