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

PHP7 - question/type/multianswer with zero grade for all subquestions breaks quiz statistics

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.3.2, 3.4, 3.6.4, 3.7
    • None
    • Questions, Quiz
    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Easy

    Description

      When creating a quizz, only use cloze sub-question with 0 as a grade.

      In /question/type/multianswer/question.php, you get a division by zero in get_max_fraction().

      Then when starting the quizz, you get a database error :

      Default exception handler: Error writing to database Debug: Unknown column 'NAN' in 'field list'\nINSERT INTO mdl_question_attempts[...]

       

      It only happens with PHP 7.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ligned David Ligne
              Safat Shahin, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: