MDL-9629 Added student names at left of grades table.
authornicolasconnault <nicolasconnault>
Wed, 20 Jun 2007 20:10:19 +0000 (20:10 +0000)
committernicolasconnault <nicolasconnault>
Wed, 20 Jun 2007 20:10:19 +0000 (20:10 +0000)
lib/grade/grade_tree.php

index 9b69fdf54b36fa32afe5ba1816d05184852c33ad..8f1874f7f9449ee47988da06299cd8f9261bf80e 100644 (file)
@@ -870,9 +870,9 @@ class grade_tree {
         
         $users = get_role_users(@implode(',', $CFG->gradebookroles), $context);
 
-        $topcathtml = '<tr>';
-        $cathtml    = '<tr>';
-        $itemhtml   = '<tr>';
+        $topcathtml = '<tr><td class="filler">&nbsp;</td>';
+        $cathtml    = '<tr><td class="filler">&nbsp;</td>';
+        $itemhtml   = '<tr><td class="filler">&nbsp;</td>';
         $items = array();
 
         foreach ($tree as $topcat) {
@@ -911,7 +911,7 @@ class grade_tree {
         $studentshtml = '';
 
         foreach ($users as $userid => $user) {
-            $studentshtml .= '<tr>';
+            $studentshtml .= '<tr><th>' . $user->firstname . ' ' . $user->lastname . '</th>';
             foreach ($items as $item) {
                 if (!empty($this->grades[$userid][$item['object']->id])) {
                     $studentshtml .= '<td>' . $this->grades[$userid][$item['object']->id] . '</td>' . "\n";