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

Question: xml import of question creates erroneous categories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5, 3.6
    • Fix Version/s: 3.5.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a new course
      2. Go to the course question bank
      3. On the categories tab, create a new category 'Apples', with parent = Top for course
      4. On the categories tab, create a new category 'Bananas', with parent = Apples
      5. Add a question to each of the categories, Apples and Bananas.
      6. Export, as xml format, and making sure to select 'Top for course' as the export category when exporting.
      7. Create a new course
      8. Go to question bank
      9. Select import tab, pick xml type and upload the file
      10. Go to 'Categories' tab and verify that 'Apples' category contains 1 question (see the (1)) and 'Bananas' another question (as in the original course)
        It should match this screenshot
      11. verify you don't see any 'top' category listed.
      Show
      Create a new course Go to the course question bank On the categories tab, create a new category 'Apples', with parent = Top for course On the categories tab, create a new category 'Bananas', with parent = Apples Add a question to each of the categories, Apples and Bananas. Export, as xml format, and making sure to select 'Top for course' as the export category when exporting. Create a new course Go to question bank Select import tab, pick xml type and upload the file Go to 'Categories' tab and verify that 'Apples' category contains 1 question (see the (1)) and 'Bananas' another question (as in the original course) It should match this screenshot verify you don't see any 'top' category listed.
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
      wip-MDL-63165-35
    • Pull Master Branch:
      wip-MDL-63165-master

      Description

      Regression from MDL-61132 I suspect. To replicate this:

      1. Create a new course
      2. Go to the course question bank
      3. On the categories tab, create a new category 'Apples', with parent = Top for course
      4. On the categories tab, create a new category 'Bananas', with parent = Apples
      5. Add a question to each of the categories, Apples and Bananas.
      6. Export, as xml format, and making sure to select 'Top for course' as the export category when exporting.
      7. Create a new course
      8. Go to question bank
      9. Select import tab, pick xml type and upload the file
      10. Observe the erroneous category display on the categories tab (see screenshot).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/18

                  Time Tracking

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