MDL-14663 "link_to_popup_window displays 'Click here....' as the link text if you...
authorjamiesensei <jamiesensei>
Fri, 2 May 2008 13:27:49 +0000 (13:27 +0000)
committerjamiesensei <jamiesensei>
Fri, 2 May 2008 13:27:49 +0000 (13:27 +0000)
Solved this by formatting the grade using number_format to display the grade with a number of decimal places. So for 0 we display something like 0.00 and this displays OK in link_to_popup_window.

mod/quiz/report/overview/report.php

index f2868d7f25b321287f93bd39dd4bf435f1472767..66981ed8dd8f499b4dd3d0d3b8fced4b6751ae5b 100644 (file)
@@ -493,7 +493,7 @@ class quiz_report extends quiz_default_report {
                                 $gradedstateid = get_field('question_sessions', 'newgraded', 'attemptid',
                                         $attempt->attemptuniqueid, 'questionid', $questionid);
                                 if ($gradedstateid) {
-                                    $grade = round(get_field('question_states', 'grade', 'id',
+                                    $grade = number_format(get_field('question_states', 'grade', 'id',
                                             $gradedstateid), $quiz->decimalpoints);
                                 } else {
                                     $grade = '--';