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

Course hierarchy (Long-term solution)

    • Course hierarchy
    • Difficult
    • Large

      Indentation functionality was removed in Moodle 4.0 for reasons including: poor accessibility, poor mobile experience, and potential content formatting issues. Members of the community have expressed frustration with the removal of indentation functionality and is asking for it to be restored, citing that indentation is critical to organizing and structuring their courses.

      Based on the discovery phase outcomes, the key requirement identified was the need of having a proper course structure functionality that allows content creators to add subsections within sections and the ability to create nested content to build a better course hierarchy. 

      The technical discussion with the team highlighted the complexity of this solution and the impossibility of including this project to the 4.2 release, so the internal stakeholders agreed on proposing a short-term temporary solution to cover the users needs around this issue while working on the long-term solution.


      Initial discovery documentation

      Initial discovery interviews

      Co-design workshop


      Course hierarchy · Figma designs

      Course hierarchy · Prototypes


       Technical proposal

      After evaluating different options (link to the options summary document), the technical approach decided is:

      1. Incorporate single-section pages in all formats. From now on, section pages will be considered course subpages, which means they will have breadcrumb, won't display the fixed general section, and won't have the tertiary navigation tabs.
      2. Clean-up section methods to stop using section number as a section identifier. Most old methods will be replaced by new APIs using section id or sectioninfo to identify sections.
      3. Create a new section type called "delegated". Currently, sections can be regular or orphan, but the course format manages both. As the name suggests, in a "delegated" section, all section management, capabilities and display can be delegated to a plugin. By all means, the section will belong to a plugin and will use an integration class to control the section behaviour.
      4. Create a new activity called "mod_subsection" that uses delegate sections to present a section inside the activity card. This activity will resemble a "text and media" display but show the subsection content. This plugin will implement the delegate class to control the subsection and implement all the reactive course editor integration.
      5. Integrate delegate sections into the course index, course reports, backup/restore/import interfaces.

      Implementations phases

      Phase 1:

      • Introduce the course section page. The goal is to allow course format to present a single section as it is a part of the course, with all the navigation elements similar to an activity.
        • MDL-79986 improve the current course section page. This will adapt the visual elements to resemble the prototype and introduce section direct links.
          • MDL-80248 In the course/section.php, display the General section instead of displaying all the course sections
          • MDL-80249 In the course/section.php, hide secondary navigation and add breadcrumb
          • MDL-80250 Create a new section_viewed event to be triggered from the couse/section.php
          • MDL-80251 Create a behat step to go to a section
          • MDL-80418 Homogenize Adding / Updating activity titles, regardless the section where it belongs
        • MDL-79987: improve the course layout in one section per page visualization
      • Clean-up the current section methods to prepare the implementation of delegate sections in next phases. Those issues include stop using section numbers to identify sections and replace old methods by new ones using section ids or sectioninfo objects.
        • MDL-77038 deprecate stateactions:section_move method. The course editor should only use section_move_after.
        • MDL-79999: Refactor course_modinfo so sections are indexed primarily by Id, and secondary by number. Currently it is the other way around and it is impossible to store sections with the same section number value (including null).
        • MDL-80000:  decide the place for the new section and activities API. The clean-up issue will deprecate many global functions from course/lib.php. This file uses a very old structure, and all new methods should be replaced by classes. This task will determine the location of those new APIs. Once done, the new API classes must be created.
        • MDL-80001: find all the places were section number is misused as a valid section id. Once done, all methods with this problem should be replaced or refactored.
          • (this will be more than one issue) Create section id (or sectioninfo) alternatives to the methods identified in the previous task. The new methods should be part of the new section or activity APIs determined in Task01. Also, deprecate the previous methods.
        • MDL-80048: a task to create a mod_subsection plugin skeleton. This stub plugin will be used in the testing instructions in Phase 2 and will be the base of the final mod_subsection in Phase 3.

      Phase 2:

      • Implement delegated sections. Some new delegate fields will be added to the section table in this phase. Those fields will be cached in course_modinfo. This phase will only introduce integrations to decide if the section is rendered in the course or not. Future phases will add more integrations. To integrate the issues, most testing instructions will provide adhocs "text and media" modifications so it can be used as a delegate plugin.
        • MDL-80186: add delegate section fields to the course_section table and make course_modinfo cache them. The field will be null by default and have the name of the delegated plugin when delegated. The delegate ID will be a number the delegate plugin must set to identify the instance. This will introduce new sectioninfo methods like  is_delegated, get_delegate and get_delegateid.
          • MDL-80187: implement course section API methods to create and destroy delegated sections from a plugin.
          • MDL-80190: Create the first delegated section integrations to hide a section on the course page. This issue will create the core_course\section_delegate abstract class that plugins must extend to control their delegated sections.
            • MDL-80715: syn delegated sections names with the delegate plugin
          • MDL-80553: fix delegate sections PHPUnit tests.
          • MDL-80799: fix create section zero but with the new section actions API.
          • MDL-80203: allow delegate plugins to override the section dropdown actions.
          • ¿?: disable extra format actions in delegate sections. Delegate sections do not belong to the format and, for now, they won't be able to add extra actions to the menus. There may be a way in the future, but specific format actions like highlighting won't be available for now.
        • MDL-80193: TASK: decide the privacy of mod_subsection and implement all the necessary class
      • Update section and activity cards to match the prototype
        • MDL-80219: Remove borders from activity cards and add borders to sections.
        • MDL-80220: match visibility badges
        • MDL-80620: Match chevrons styling
        • MDL-80621: Match separators and "+" buttons
        • MDL-80622: Improve the shadow element when dragging activity cards
      • Sections and subsections will be created as "New section", and renumerations won't be automatic anymore
        • MDL-80460: Create sections with "New section"
        • MDL-80461: Eliminate unnecessary references to topics/weeks in the UI.
        • MDL-80541: Homogenize the section form title
        • MDL-80542: Replace Show/Hide in the section menu with the Availability component
      • Others:
        • MDL-80557: Change the default order for the course formats

      C -> Phase 3: last integrations before incorporating mod_subsection into core.

      • Integrate delegated sections into the general navigation
        • MDL-81648: allow the delegate plugin (mod_subsection) to add new breadcrumb nodes when presenting content from a delegated section. This includes the section page but also any inner activity page.
          • MDL-81673: make delegated sections visible from the navigation block in the classic theme.
        • MDL-81674: TASK evaluate the best way to deal with capabilities or permissions in a delegate section.
      • Activity chooser modifications
        • MDL-81675: Prevent activity chooser from adding an activity with delegated sections inside a delegates section
        • MDL-81676: remove data-sectionid attribute from modchooser and rename it to data-sectionnum
      • Fix section page action menu
        • MDL-81681: Make section page action menu reactive.
      • Course editing
        • MDL-81684: UX task to design the new activity move modal with subsections
          • MDL-81683: Adapt the move activity modal to show also subsections.
      • Integrate delegate sections (now only from mod_subsection) into the course index.
        • MDL-81725: Add a section delegate integration the course index can use to present an activity as a subsection. The idea is that the full node will be collapsible with all inner contents below. This will include the course editor integrations to allow dragging activities in and out of the subsection.
      • Backup and restore
        • MDL-80191: improve the activity restore steps so a plugin with delegated sections can set the delegate ID value during the restore process. Sections are restored before the activity plugins; this means the section restoration process cannot update the delegate ID and the delegate plugin should do it manually.
          • MDL-80194: TASK: evaluate what happens to the course recycle bin when an activity from a delegated section is deleted and restored later on.
          • MDL-81981: validate and fix the duplicate mod_subsection logic if necessary.
      • Deprecations:
        • MDL-80756: Deprecate get_view_url() function
      • Final issue of the phase: incorporate  mod_subsection
        • MDL-81765: add mod_subsection to core. The activity will only display a link to the section page and can be created as any other activity

      Phase 4:

      • Integrate mod_subsection into the course content so they are displayed more like a section.
        • MDL-81766: Add methods in the mod_subsection library to display the section content as collapsible inside the activity card. This issue will include integrating the reactive course editor so activities can be dragged inside/outside a subsection.
          • MDL-81768: add the "expand / collapse all sections" on the section page. This was not necessary until subsections appeared.
        • MDL-81767: Add buttons to create mod_subsection instances with one click directly from the course page, like the prototype. Once this is done, this issue will also hide the mod_subsection from the activity chooser. This issue will include adding a new feature to mod plugins so they can be created with default values
          • MDL-81798: prevent creating mod_subsection instances when the max section is reached.
        • MDL-82033: task to evaluate what happens when mod_subsection is disabled.
          • MDL-82034: make mod_subsection disabled by default.
      • New mod_subsection integrations:
        • MDL-81769: allow mod_subsection to override the activity actions dropdown (and probably replace it with a section actions dropdown). This issue may disappear if the UX team describe what happens with delegated sections depending on the current activity settings (for example, the visible stealth value)
        • MDL-81770: create a behat "mod_subsection > activities" step to generate activities inside a subsection.
      • Improve Backup and restore:
        • MDL-82058: create behat tests for the subsection backup and restore.
        • MDL-82059: task to improve the course structure backup and restore form.
      • Consistency between module and delegated section:
        • MDL-82258: Delegating a module that creates a delegated section is not removing the delegated section
        • MDL-82259: Modules availability should be consistent with its delegated sections' availability
        • MDL-82260:  Modules access restrictions should be consistent with its delegated sections' access restrictions


      Phase 5:

      • Adapt existing UIs to display delegated sections below the delegate activity (mod_subsection)
        • MDL-81799: UX task to evaluate how to represent the new course hierarchy in the course reports
          • MDL-81771: allow delegated sections in course Activity report.
          • MDL-82146: Display delegated sections in Logs report
          • MDL-82103: display delegated sections in sections dropdown in the course log report.
      • Implement any necessary webservice required to display mod_subsection in the mobile APP.
        • MDL-81772 Task: identify all the requirements for integrate mod_subsection and delegated sections in the Moodle Mobile APP.
          • ¿?: adapt the current webservices so the mobile APP knows when a section is delegated.
          • ¿?: incorporate webservices to mod_subsection so the mobile APP can render the content.
          • ¿?: incorporate mobile templates in mod_subsection.
      • Implement all changes to adapt the course content download to subsections.
        • MDL-81773: Incorporate activity contents to the mod_subsection download content.
      • Adapt activity chooser to delegate sections without section number
        • MDL-80295: Modify the activity chooser to use section ID instead of section number
      • Adapt drag and drop files into course page to work with delegate sections
        • MDL-80296: Modify the course file drop to use sectionID instead of section number
      • Mitigate the collapsed sections preference limit problem:
        • MDL-80714 (task): evaluate n alternative preferences storing for subsection.
      • Deprecate all redundant course/lib.php methods
        • MDL-80482: During the project many course/lib.php functions will be replaced by the new libraries proposed in MDL-80000. In this issue all those methods will be deprecated.
      • Removing section management from course/view.php:
        • MDL-81965: task to evaluate the feasibility of stop displaying a single section in course/view.php.
      • Others:
        • MDL-80556: Simplify the blocks by removing Section links 
        • MDL-79918: Simplify the course settings by removing the setting Hidden sections
        • MDL-79916: Simplify the course format options by removing Social format

            31 Vote for this issue
            65 Start watching this issue


                Original Estimate - Not Specified
                Not Specified
                Remaining Estimate - 0 minutes
                Time Spent - 2 days, 4 hours, 15 minutes
                2d 4h 15m

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