-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.9, 4.2.6, 4.3.3
If the locale for sprintf() uses comma for the decimal separator then the following error occurs when regrading quiz attempts:
Exception - core_renderer::render_progress_bar_update(): Argument #2 ($percent) must be of type float, string given, called in [dirroot]/lib/outputcomponents.php on line 5241
(the following lines depends on the process)
- line 5142 of /lib/outputrenderers.php: TypeError thrown
- line 5241 of /lib/outputcomponents.php: call to core_renderer->render_progress_bar_update()
- line 5277 of /lib/outputcomponents.php: call to progress_bar->_update()
- line 5289 of /lib/outputcomponents.php: call to progress_bar->update_full()
- line 592 of /mod/quiz/report/overview/report.php: call to progress_bar->update()
- line 500 of /mod/quiz/report/overview/report.php: call to quiz_overview_report->regrade_batch_of_attempts()
- line 274 of /mod/quiz/report/overview/report.php: call to quiz_overview_report->regrade_attempts()
- line 112 of /mod/quiz/report/overview/report.php: call to quiz_overview_report->process_actions()
- line 83 of /mod/quiz/report.php: call to quiz_overview_report->display()
I cannot reproduce this as I don't have a server set up with a suitable locale (such as pt_BR) but presumably this happens if:
- Your server's system locale uses a comma as the decimal separator.
- Set up a course with a quiz and add a question to the quiz.
- Enrol a student on the course.
- As the student attempt the quiz.
- As an admin view the quiz attempts, select the above attempt and click Regrade selected attempts.
- is a regression caused by
-
MDL-70583 Implement a renderer for progress_bar in cli output
- Closed
- links to