Browse Source

Fix gradebook graphics with wrong values - refs BT#12299

Angel Fernando Quiroz Campos 8 years ago
parent
commit
2093861d8f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      main/gradebook/lib/fe/gradebooktable.class.php

+ 2 - 2
main/gradebook/lib/fe/gradebooktable.class.php

@@ -369,9 +369,9 @@ class GradebookTable extends SortableTable
                     // Student result
                     $row[] = $value_data;
                     $totalResultAverageValue = strip_tags($scoredisplay->display_score($totalResult, SCORE_AVERAGE));
-                    $this->dataForGraph['my_result'][] = str_replace('%', '', $totalResultAverageValue);
+                    $this->dataForGraph['my_result'][] = floatval($totalResultAverageValue);
                     $totalAverageValue = strip_tags($scoredisplay->display_score($totalAverage, SCORE_AVERAGE));
-                    $this->dataForGraph['average'][] =  str_replace('%', '', $totalAverageValue);
+                    $this->dataForGraph['average'][] = floatval($totalAverageValue);
                     // Ranking
                     $row[] = $ranking;
                     // Best