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

Course hierarchy (Long-term solution)

    • MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE
    • 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

      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-82845: The navigation block in Classic doesn't display activities when a subsection exists
        • MDL-81674: TASK evaluate the best way to deal with capabilities or permissions in a delegate section.
          • MDL-82377 implement the best way to deal with user access in subsections' activities.
      • 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.
          • MDL-82357: prevent subsections loop at a backend level.
          • MDL-82407: fix current the course index item indicator in subsections.
      • 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.
      • 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

      C -> 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-82574: hide mod_subsection from the activity chooser modal.
        • MDL-82033: task to evaluate what happens when mod_subsection is disabled.
          • MDL-82541: fix courses with subsection if mod_subsection is disabled.
        • MDL-82490: fix classic theme section dropdown
      • 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.
        • MDL-82324: allow drop activities into the section page
        • MDL-82437: delegate the section edit form data to mod_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.
        • MDL-82310: fix 4.4 delegated section restore.
        • MDL-82316: implement the UX proposal on the backup and restore form
      • Consistency between module and delegated section:
        • MDL-82355 UX: Define subsections availability behavior
          • MDL-82510: Add new action menu for subsections 
            • MDL-82259: Modules availability should be consistent with its delegated sections' availability
              • MDL-82619: bug creating subsection inside a hidden section.
              • MDL-82721: Subsection visibility error.
            • MDL-82480: Add 'Move' option to subsection action menu
            • MDL-82613: visibility badge should be consistent with the subsection action menu
          • MDL-82496: UX: Add 'Delete' option to subsection page
            • MDL-82478: Add 'Delete' option to subsection page
            • MDL-82849: The navigation block in Classic displays a subsection when it was deleted or mark as a deleted
        • MDL-82260:  Modules access restrictions should be consistent with its delegated sections' access restrictions
        • MDL-82617: remove completion form mod_subsection
      • Some UX improvements:
        • MDL-82375: find an alternative to the course index move icons.
          • MDL-82376: implement the alternative to the move icon.

       

      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-82847: fix display subsections in the log report.
          • MDL-82103: display delegated sections in sections dropdown in the course log report.
        • MDL-82199: UX: Display sections in user Outline report and Complete report
          • MDL-82495: Display sections in user Outline report and Complete report
        • MDL-83008: subsection completion should not be editable in bulk completion edit
          • MDL-83009: bulk activity completion edit should display subsections like the course page
      • 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.
          • MDL-82385 Course hierarchy support for the mobile app
      • 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.
      • Hiding mod_subsection from places where it should not exists:
        • MDL-83053: do not allow single activity format using subsection.
        • MDL-83056: the add subsection button should respect the max subsections
        • MDL-83115: Better error message for subsection modules in course formats don't use sections
      • Backup and restore
        • 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 and cleanups:
        • MDL-80756: Deprecate get_view_url() function
        • MDL-83214 (task): evaluate how to make is_delegated and get_component_instance consistent.
      • Make mod_subsection enabled in Moodle 5.0, or so.
        • MDL-82034: make mod_subsection enabled by default.

            Votes:
            32 Vote for this issue
            Watchers:
            65 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 4 hours, 19 minutes
                2d 4h 19m

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