Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-9785 Improve Flexibility of Question Category Sharing and Permissions
  3. MDL-9788

Seperate Questions into Different Category Hierarchies in Different Context Levels

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9
    • 1.9
    • Questions, Quiz
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      http://docs.moodle.org/en/Development:Plan_to_Improve_Flexibility_of_Question_Category_Sharing_and_Permissions#Seperate_Questions_into_Different_Category_Hierarchies_in_Different_Context_Levels

      Seperate Questions into Different Category Hierarchies in Different Context Levels
      ---------------------------------------------------------------------------------------------------------------

      Remove 'publish' field from question_categories table 'course' field will become 'contextid' and will be of INT type pointing to the 'context' table.

      Calculate equivalent context
      --------------------------------------

      Contents of the new context table will depend on the old contents of 'publish' and 'course' if publish is 1 then we make the context the site context. If it is 0 then we make the context the context for the course indicated in the 'course' field.

      Change in How Categories Are Shared
      -----------------------------------------------------

      Previously you could share a category anywhere in your Course's question bank category hierarchy at the site level. Now we have decided that we'll have seperate hierarchies for categories at each context level. So we need code on db upgrade to check that all parent categories referred to in the question_categories 'parent' field are in the same context. If they are not then this category becomes a new top level category.

      So if a question category hierarchy in a course is as below :

      • Default
        o Science
        + Physics (shared)
      1. Momentum and Dynamics

      The Physics course will get moved to the site context since it is shared and the question category hierarchies will then be as follows :

      Course Level

      • Default
        o Science
        + Momentum and Dynamics

      Site Level

      • Physics

      If a childs parent is gone then it get's put in the grandparent category, if no grandparent, then grand grand parent etc. We'll search up the category hierarchy till we reach a category that is still in the same context level or we reach the top level and use that as a parent.

      When changing the tree, we'll preserve the existing ordering as defined by the sortorder fields.

            jamiesensei Jamie Pratt (Inactive)
            jamiesensei Jamie Pratt (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.