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

Imported multichoice questions may have a blank answernumbering value, which results in an "ERR" prefix to all answers' text.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9
    • 1.8.6, 1.9.2
    • Questions
    • None
    • MOODLE_19_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

    Description

      Older versions of Moodle do not have an answernumbering value for their questions, but may include the answeringnumber XML entry when exporting as Moodle XML. A more recent Moodle that does use answernumbering will read the blank value and store it in question_multichoice.answernumbering without validation.

      The visible result: In these imported multichoice questions, the text "ERR" will prefix all of the answers' text, as in the attached screenshot.

      The fix is trivial, simply check to see if the answernumbering is defined and if not, set it to the default (abc). I've attached a patch for question/format/xml/format.php

      Attachments

        Activity

          People

            timhunt Tim Hunt
            nateh Nate H
            Jérôme Mouneyrac Jérôme Mouneyrac
            Safat Shahin, Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jul/08