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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9
    • 1.8.3, 1.9
    • Questions
    • None
    • MOODLE_19_STABLE
    • 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

            howardsmiller Howard Miller
            adrianeboyd Adriane Boyd
            Nobody Nobody
            Safat Shahin, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Oct/07