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

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.8.6, 1.9.2
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      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

            Assignee:
            timhunt Tim Hunt
            Reporter:
            nateh Nate H
            Tester:
            Jérôme Mouneyrac
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Jul/08