From a60547a07f3f09346eb345ff10c2e1698b2ecd16 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Fri, 1 Apr 2011 15:44:43 +0200 Subject: [PATCH] Fixing row_even, row_odd CSS classes in exercise list --- main/exercice/exercice.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main/exercice/exercice.php b/main/exercice/exercice.php index f877dac5d1..9195297de7 100755 --- a/main/exercice/exercice.php +++ b/main/exercice/exercice.php @@ -968,6 +968,12 @@ if ($show == 'test') { if ($title == '') { $title = basename($path); } + + $class = 'row_even'; + if ($count % 2) { + $class = 'row_odd'; + } + // prof only if ($is_allowedToEdit) { $item = Display::tag('td','HotPotatoes '.$title.' '); @@ -987,7 +993,7 @@ if ($show == 'test') { //$actions .=''; $item .= Display::tag('td', $actions); - echo Display::tag('tr',$item); + echo Display::tag('tr',$item, array('class'=>$class)); } else { // student only if ($active == 1) { $nbrActiveTests = $nbrActiveTests +1; @@ -996,9 +1002,10 @@ if ($show == 'test') { $item .= Display::tag('td', ''); $actions ='' . Display :: return_icon('show_test_results.gif', get_lang('Results')).''; $item .= Display::tag('td', $actions); - echo Display::tag('tr',$item); + echo Display::tag('tr',$item, array('class'=>$class)); } } + $count ++; } } echo '';