Moodle
  1. Moodle
  2. MDL-31139

Division by Zero When Showing the Results of an Empty Choice Module

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.16
    • Fix Version/s: None
    • Component/s: Choice
    • Labels:
      None
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      Create a "Choice" activity in a course
      Update choice
      -> Under miscellaneous settings, set "Publish Results" to "Always show results to students"
      Click "Save and Display"

      Show
      Create a "Choice" activity in a course Update choice -> Under miscellaneous settings, set "Publish Results" to "Always show results to students" Click "Save and Display"
    • Affected Branches:
      MOODLE_19_STABLE
    • Rank:
      37571

      Description

      Getting a division by zero error on line 551 of /mod/choice/lib.php

      Seems like $totalresponsecount needs checking for a zero value.

        Activity

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: