Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-85058

Exception when accessing the gradebook with grade penalties

XMLWordPrintable

      Steps to reproduce:

      1. Follow the testing instructions of MDL-80984 until section "Testing: Penalty implementation on an assignment" (included).
      2. Change the language to Catalan or any language which does not use a period as decimal separator.
      3. Go to the gradebook.

      The following exception is displayed:
      Excepció - number_format(): Argument #1 ($num) must be of type float, string given

      The cause of the exception is in this function, which calls format_float twice for the same value: https://github.com/moodle/moodle/blob/main/grade/classes/output/penalty_indicator.php#L74

            Nguyen Nathan Nguyen
            albert.gasset@moodle.com Albert Gasset
            Alexander Van der Bellen Alexander Van der Bellen
            Mihail Geshoski Mihail Geshoski
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 50 minutes
                6h 50m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.