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

Moving question categories between contexts 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 course category to c1
        • It's parent category should be set to "Top" underneath the c1 section
      8. Use the up or down arrows next to the new category to move it either into the "Question categories for 'Quiz: Quiz 1'" or "Question categories for 'Category: Miscellaneous'" sections
      9. Confirm that the category moves into the new context and 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 course category to c1 It's parent category should be set to "Top" underneath the c1 section Use the up or down arrows next to the new category to move it either into the "Question categories for 'Quiz: Quiz 1'" or "Question categories for 'Category: Miscellaneous'" sections Confirm that the category moves into the new context and 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-61556-master

      Description

      When a question category is moved from one context to another it is automatically renamed to "Default for <context name>" and creates a second top level category. This then breaks the category page stopping you from being able to move categories around.

      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 course category to c1
        • It's parent category should be set to "Top" underneath the c1 section
      8. Use the up or down arrows next to the new category to move it either into the "Question categories for 'Quiz: Quiz 1'" or "Question categories for 'Category: Miscellaneous'" sections
      9. Once the category moves into a new "Question categories for" (i.e. new context) it will be incorrectly renamed as "Default for <context name>" and the category page will no longer work (turning developer debugging on will show an error message)

        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:
              3 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, 15 minutes
                  4h 15m