From: defacer Date: Thu, 27 Jan 2005 04:19:56 +0000 (+0000) Subject: More HTML and CSS fun with the new block. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9c581405ab73133e38b4f4e511b40959f8b18f3c;p=moodle.git More HTML and CSS fun with the new block. Incidentally, does Mozilla have a bug here? It won't apply the text-align property to those TDs which have been given a class through a COLGROUP. IE does it correctly all the way, and Firefox applies the other properties but seems to take exception at the text-align. Weird. --- diff --git a/blocks/quiz_results/block_quiz_results.php b/blocks/quiz_results/block_quiz_results.php index 343567714a..34a795c3ae 100644 --- a/blocks/quiz_results/block_quiz_results.php +++ b/blocks/quiz_results/block_quiz_results.php @@ -150,10 +150,9 @@ class block_quiz_results extends block_base { $rank = 0; if(!empty($best)) { - $this->content->text .= '

'.get_string('bestgroupgrades', 'block_quiz_results', $numbest).'

'; - $this->content->text .= ''; + $this->content->text .= '
'; foreach($best as $groupid => $averagegrade) { - $this->content->text .= '
'.get_string('bestgroupgrades', 'block_quiz_results', $numbest).'
'.(++$rank).'.'.$groupgrades[$groupid]['group'].''; + $this->content->text .= '
'.(++$rank).'.'.$groupgrades[$groupid]['group'].''; switch($gradeformat) { case GRADE_FORMAT_FRA: $this->content->text .= ($averagegrade.'/'.$quiz->grade); @@ -174,10 +173,9 @@ class block_quiz_results extends block_base { $rank = 0; if(!empty($worst)) { $worst = array_reverse($worst, true); - $this->content->text .= '

'.get_string('worstgroupgrades', 'block_quiz_results', $numworst).'

'; - $this->content->text .= ''; + $this->content->text .= '
'; foreach($worst as $groupid => $averagegrade) { - $this->content->text .= '
'.get_string('worstgroupgrades', 'block_quiz_results', $numworst).'
'.(++$rank).'.'.$groupgrades[$groupid]['group'].''; + $this->content->text .= '
'.(++$rank).'.'.$groupgrades[$groupid]['group'].''; switch($gradeformat) { case GRADE_FORMAT_FRA: $this->content->text .= ($averagegrade.'/'.$quiz->grade); @@ -234,10 +232,9 @@ class block_quiz_results extends block_base { $rank = 0; if(!empty($best)) { - $this->content->text .= '

'.get_string('bestgrades', 'block_quiz_results', $numbest).'

'; - $this->content->text .= ''; + $this->content->text .= '
'; foreach($best as $userid => $gradeid) { - $this->content->text .= '
'.get_string('bestgrades', 'block_quiz_results', $numbest).'
'.(++$rank).'.'.fullname($users[$userid]).''; + $this->content->text .= '
'.(++$rank).'.'.fullname($users[$userid]).''; switch($gradeformat) { case GRADE_FORMAT_FRA: $this->content->text .= ($grades[$gradeid]->grade.'/'.$quiz->grade); @@ -258,10 +255,9 @@ class block_quiz_results extends block_base { $rank = 0; if(!empty($worst)) { $worst = array_reverse($worst, true); - $this->content->text .= '

'.get_string('worstgrades', 'block_quiz_results', $numworst).'

'; - $this->content->text .= ''; + $this->content->text .= '
'; foreach($worst as $userid => $gradeid) { - $this->content->text .= '
'.get_string('worstgrades', 'block_quiz_results', $numworst).'
'.(++$rank).'.'.fullname($users[$userid]).''; + $this->content->text .= '
'.(++$rank).'.'.fullname($users[$userid]).''; switch($gradeformat) { case GRADE_FORMAT_FRA: $this->content->text .= ($grades[$gradeid]->grade.'/'.$quiz->grade); diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index 0578435b4b..b54280531d 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -459,17 +459,19 @@ td.cal_event_description { text-align: left; } -#block_quiz_results h1 { - text-align: center; +#block_quiz_results table.grades caption { font-weight: bold; - font-size: 1.2em; - margin: 4px; + margin: 1em 0px 0px 0px; + border-bottom: 1px solid; } -#block_quiz_results h2 { - text-align: center; +#block_quiz_results table.grades .number, #block_quiz_results table.grades .grade { + width: 10%; + text-align: right; +} + +#block_quiz_results h1 { font-weight: bold; - font-size: 1em; - margin: 1em 0px 0px 0px; - border-bottom: 1px solid; + font-size: 1.2em; + margin: 4px; }