Moodle

Questions with score of 0 lead to division by zero warning

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Quiz
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

OU Moodle with new Quiz reports

This looks similar to the problem on the responses page with questions that have a mark of zero.

Create a test with a question that has a mark of 0.

Run a student through it.

Then go to the Results.
Then the Statistics tab
And see
Warning: Division by zero in /var/www/html/icmatest/ou-moodle-dev/mod/quiz/report/statistics/qstats.php on line 140

If the quiz has two questions that have zero marks then two of the above messages are seen.

Activity

Hide
Jamie Pratt added a comment -

Attaching a patch that fixes these notices.

Show
Jamie Pratt added a comment - Attaching a patch that fixes these notices.
Hide
Jamie Pratt added a comment -

Also applying this patch to HEAD.

Show
Jamie Pratt added a comment - Also applying this patch to HEAD.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: