]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13712 Fixed. Merging from MOODLE_19_STABLE
authornicolasconnault <nicolasconnault>
Thu, 28 Feb 2008 12:41:26 +0000 (12:41 +0000)
committernicolasconnault <nicolasconnault>
Thu, 28 Feb 2008 12:41:26 +0000 (12:41 +0000)
grade/report/outcomes/index.php

index a35254f909eb7f027503d87a1967fb6254386ae8..4052aea3041dfbe6f3ad9b648f252dfc59b5d72d 100644 (file)
@@ -95,6 +95,11 @@ $html .= '<th class="header c5" scope="col">' . get_string('numberofgrades', 'gr
 $row = 0;
 foreach ($report_info as $outcomeid => $outcomedata) {
     $rowspan = count($outcomedata['items']);
+    // If there are no items for this outcome, rowspan will equal 0, which is not good
+    if ($rowspan == 0) {
+        $rowspan = 1;
+    }
+
     $shortname_html = '<tr class="r' . $row . '"><td class="cell c0" rowspan="' . $rowspan . '">' . $outcomedata['outcome']->shortname . "</td>\n";
 
     $sitewide = get_string('no');
@@ -110,7 +115,7 @@ foreach ($report_info as $outcomeid => $outcomedata) {
     $print_tr = false;
     $items_html = '';
 
-    if (is_array($outcomedata['items'])) {
+    if (!empty($outcomedata['items'])) {
         foreach ($outcomedata['items'] as $itemid => $item) {
             if ($print_tr) {
                 $row++;