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

xml import getpath() doesn't handle 0 values correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.8.3, 1.9
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      If the value is 0, getpath() in question/format/xml/format.php returns the default value instead of 0 because the empty() check counts 0 as empty.

      To replicate, import a matching question with shuffleanswers set to 0. It will be imported with shuffleanswers set to the default value 1.

        Attachments

          Activity

            People

            • Assignee:
              howardsmiller Howard Miller
              Reporter:
              adrianeboyd Adriane Boyd
              Tester:
              Nobody
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Oct/07