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

Moodle XML question export/import does not include question-category idnumbers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.6.6, 3.7.2, 3.8
    • Fix Version/s: 3.6.7, 3.7.3
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      The automated test coverage should be sufficient. If you want to test manually:

      1. Create a test course.
      2. Create a question category, and set its idnumber to 'catid'.
      3. Create a question in that category.
      4. Export the category in Moodle XML format.
      5. Create another course.
      6. Import the file you just exported into the question bank of the new course.
      7. Go to Question bank -> Categoryies and edit the imported category information.
      8. Verify that the imported category has idnumber 'catid'.

      (You could also, after step 4, look at the context of the export file and verify that it contains 'catid' in the right place.)

      Show
      The automated test coverage should be sufficient. If you want to test manually: Create a test course. Create a question category, and set its idnumber to 'catid'. Create a question in that category. Export the category in Moodle XML format. Create another course. Import the file you just exported into the question bank of the new course. Go to Question bank -> Categoryies and edit the imported category information. Verify that the imported category has idnumber 'catid'. (You could also, after step 4, look at the context of the export file and verify that it contains 'catid' in the right place.)
    • Affected Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE
    • Pull 3.6 Branch:
    • Pull 3.7 Branch:
    • Pull Master Branch:

      Description

      It looks like when MDL-62708 was done, export/import of category idnumbers was missed out. (Possibly because fixing MDL-23545 was a necessary prerequisite and had to be done at the same time.)

      Steps to reproduce:

      1. Create a test course.
      2. Create a question category, and set its idnumber to 'catid'.
      3. Create a question in that category.
      4. Export the category in Moodle XML format.

      Expected result: the export file contains <idnumber>catid</idnumber> in the block of XML relating to the category.

      Actual result: no category idnumbers in the file. (Question idnumbers work.)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timhunt Tim Hunt
                Reporter:
                timhunt Tim Hunt
                Peer reviewer:
                Luca Bösch
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Jennifer Bauzon
                Participants:
                Component watchers:
                Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 20 minutes
                  1h 20m