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

Moving question categories from a sub category up to a parent category creates multiple top level categories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.5
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as admin
      2. Create a course (c1)
      3. Create a quiz activity (quiz1) in c1
      4. View quiz1
      5. Open the question bank from quiz1
        • edit cog > question bank
      6. Click the "Categories" tab
      7. Add a sub course category to c1
        • It's parent category should be set to "Default for c1" to create this as a sub category
      8. Use the left arrow to move it up a category level from a sub category.
      9. Confirm that the category moves to the same level as its old parent.
      10. Confirm that there is no warning at the top of the page.
      Show
      Log in as admin Create a course (c1) Create a quiz activity (quiz1) in c1 View quiz1 Open the question bank from quiz1 edit cog > question bank Click the "Categories" tab Add a sub course category to c1 It's parent category should be set to "Default for c1" to create this as a sub category Use the left arrow to move it up a category level from a sub category. Confirm that the category moves to the same level as its old parent. Confirm that there is no warning at the top of the page.
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-61557-master

      Description

      When a sub question category is move up into a parent category it is renamed and changed into a second top level category which is incorrect behaviour and breaks the categories.

      Steps to reproduce:

      1. Log in as admin
      2. Create a course (c1)
      3. Create a quiz activity (quiz1) in c1
      4. View quiz1
      5. Open the question bank from quiz1
        • edit cog > question bank
      6. Click the "Categories" tab
      7. Add a sub course category to c1
        • It's parent category should be set to "Default for c1" to create this as a sub category
      8. Use the left arrow to move it up a category level from a sub category. It will be incorrectly renamed to "Default for c1" and the category page will no longer work (turning developer debugging on will show an error message).
      9. Clicking the right arrow to demote it back to a sub category will create multiple sub categories in the other "Default for c1" category

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rezaie9 Shamim Rezaie
              Reporter:
              ryanwyllie Ryan Wyllie
              Peer reviewer:
              Tim Hunt
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Gladys Basiana
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h