]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10479 Done, but would be nice to middle-align the user names vertically.
authornicolasconnault <nicolasconnault>
Wed, 18 Jul 2007 03:34:55 +0000 (03:34 +0000)
committernicolasconnault <nicolasconnault>
Wed, 18 Jul 2007 03:34:55 +0000 (03:34 +0000)
grade/report/grader/lib.php
theme/standard/styles_layout.css

index cadca1b19f2a7020c3d8d8a11d8b49e0ec7af865..4356967d11a3b56365b8071869436de1a3b344a4 100644 (file)
@@ -569,6 +569,7 @@ class grade_report_grader extends grade_report {
         $strfeedback = $this->get_lang_string("feedback");
         $gradetabindex = 1;
         $feedbacktabindex = 16380; // The maximum number of tabindices on 1 page is 32767
+        $showuserimage = $this->get_pref('showuserimage');
 
         // Preload scale objects for items with a scaleid
         $scales_list = '';
@@ -586,8 +587,14 @@ class grade_report_grader extends grade_report {
 
         foreach ($this->users as $userid => $user) {
             // Student name and link
-            $studentshtml .= '<tr><th class="user"><a href="' . $CFG->wwwroot . '/user/view.php?id='
+            $user_pic = null;
+            if ($showuserimage) {
+                $user_pic = '<div class="userpic">' . print_user_picture($user->id, $this->courseid, true, 0, true) . '</div>';
+            }
+
+            $studentshtml .= '<tr><th class="user">' . $user_pic . '<a href="' . $CFG->wwwroot . '/user/view.php?id='
                           . $user->id . '">' . fullname($user) . '</a></th>';
+
             foreach ($this->items as $item) {
                 // Get the decimal points preference for this item
                 $decimalpoints = $this->get_pref('decimalpoints', $item->id);
index db0d45a39bb8888ca0bb8b9a20f6dab6d4afc22d..3d61d1242854ef9e96ed222b1178ac0c8e297c90 100644 (file)
@@ -2123,7 +2123,10 @@ body#doc-contents ul {
   border-style:solid;
 }
 
-
+#grade-report .userpic {
+  display: inline;
+  margin-right: 10px;
+}
 /* gradebook edit tree */
 
 #grade-edit-edit_tree .gradetreebox {