From cb10e3d76171110c32944166ddf7c286a1f17727 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 14 Feb 2005 20:26:11 +0000 Subject: [PATCH] Now the block is using quiz->decimalpoints to show the grades --- blocks/quiz_results/block_quiz_results.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/blocks/quiz_results/block_quiz_results.php b/blocks/quiz_results/block_quiz_results.php index 3e807560a44..2fe1aca8b46 100644 --- a/blocks/quiz_results/block_quiz_results.php +++ b/blocks/quiz_results/block_quiz_results.php @@ -180,10 +180,10 @@ class block_quiz_results extends block_base { $this->content->text .= ''.(++$rank).'.'.$groupgrades[$groupid]['group'].''; switch($gradeformat) { case GRADE_FORMAT_FRA: - $this->content->text .= ($averagegrade.'/'.$quiz->grade); + $this->content->text .= (format_float($averagegrade,$quiz->decimalpoints).'/'.$quiz->grade); break; case GRADE_FORMAT_ABS: - $this->content->text .= $averagegrade; + $this->content->text .= format_float($averagegrade,$quiz->decimalpoints); break; default: case GRADE_FORMAT_PCT: @@ -205,10 +205,10 @@ class block_quiz_results extends block_base { $this->content->text .= ''.(++$rank).'.'.$groupgrades[$groupid]['group'].''; switch($gradeformat) { case GRADE_FORMAT_FRA: - $this->content->text .= ($averagegrade.'/'.$quiz->grade); + $this->content->text .= (format_float($averagegrade,$quiz->decimalpoints).'/'.$quiz->grade); break; case GRADE_FORMAT_ABS: - $this->content->text .= $averagegrade; + $this->content->text .= format_float($averagegrade,$quiz->decimalpoints); break; default: case GRADE_FORMAT_PCT: @@ -292,10 +292,10 @@ class block_quiz_results extends block_base { $this->content->text .= ''.(++$rank).'.'.fullname($users[$userid]).''; switch($gradeformat) { case GRADE_FORMAT_FRA: - $this->content->text .= ($grades[$gradeid]->grade.'/'.$quiz->grade); + $this->content->text .= (format_float($grades[$gradeid]->grade,$quiz->decimalpoints).'/'.$quiz->grade); break; case GRADE_FORMAT_ABS: - $this->content->text .= $grades[$gradeid]->grade; + $this->content->text .= format_float($grades[$gradeid]->grade,$quiz->decimalpoints); break; default: case GRADE_FORMAT_PCT: @@ -317,10 +317,10 @@ class block_quiz_results extends block_base { $this->content->text .= ''.(++$rank).'.'.fullname($users[$userid]).''; switch($gradeformat) { case GRADE_FORMAT_FRA: - $this->content->text .= ($grades[$gradeid]->grade.'/'.$quiz->grade); + $this->content->text .= (format_float($grades[$gradeid]->grade,$quiz->decimalpoints).'/'.$quiz->grade); break; case GRADE_FORMAT_ABS: - $this->content->text .= $grades[$gradeid]->grade; + $this->content->text .= format_float($grades[$gradeid]->grade,$quiz->decimalpoints); break; default: case GRADE_FORMAT_PCT: