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

Division by zero in Gradebook User Report

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.8.7
    • 2.8.8, 2.9.2
    • Gradebook
    • MOODLE_28_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • mdl-50957
    • Hide
      1. Make sure you have a course created in your Moodle instance.
      2. When viewing the course, click on "Grades" (under "Course administration").
      3. From the drop menu at the top of the page, choose "Categories and items".
      4. Click "Add grade item".
      5. Set "Maximum grade" to 0.
      6. Set "Minimum grade" to -1.
      7. Click "Save changes".
      8. Under "Administration" > "Grade administration" in the side navigation, click "User report".
      9. View your PHP error log and ensure there is no "PHP Warning: Divion by zero" message.
      Show
      Make sure you have a course created in your Moodle instance. When viewing the course, click on "Grades" (under "Course administration"). From the drop menu at the top of the page, choose "Categories and items". Click "Add grade item". Set "Maximum grade" to 0. Set "Minimum grade" to -1. Click "Save changes". Under "Administration" > "Grade administration" in the side navigation, click "User report". View your PHP error log and ensure there is no "PHP Warning: Divion by zero" message.

    Description

      When using "sum of grades" and $grademax is zero, a division by zero error occurs in fill_contributions_column() in grade/report/user/lib.php.

      Attachments

        Activity

          People

            c.d.smith Clem Smith
            c.d.smith Clem Smith
            Ryan Wyllie Ryan Wyllie
            David Monllaó David Monllaó
            Adrian Greeve Adrian Greeve
            Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              14/Sep/15