From a8b5167bbeb2e4ea14258cb81d4a21aaddb2d311 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 28 Feb 2008 12:41:26 +0000 Subject: [PATCH] MDL-13712 Fixed. Merging from MOODLE_19_STABLE --- grade/report/outcomes/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/grade/report/outcomes/index.php b/grade/report/outcomes/index.php index a35254f909..4052aea304 100644 --- a/grade/report/outcomes/index.php +++ b/grade/report/outcomes/index.php @@ -95,6 +95,11 @@ $html .= '' . 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 = '' . $outcomedata['outcome']->shortname . "\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++; -- 2.39.5