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

Course_modinfo should index sections by id, not just by section number

    XMLWordPrintable

Details

    • 3
    • HQ 2023 Sprint I4.2 Moppies

    Description

      A bit of context

      The current course_modinfo class indexes all section_info by section number. This limits some features like subsections, as section number is often used as identifiers when they should be only used for sequencing.

      This issue is part of the Course hierarchy project, which has the primary goal of including one level of subsections to course content.

      The problem

      Many internals of course sections take for granted that section number is unique and sequential inside a course. This assumption has been limiting course formats since the first releases and also contaminated all the section APIs (many of them use variables called $section, which are, in fact, section numbers).

      The current implementation of course_modinfo indexes all sections by section number, which means that any section without a section number (or with a repeated section number value) will produce unexpected results. Sections should be indexed by ID, the only section attribute that will always be unique.

      This issue will refactor the course_modinfo class to cache sections indexed by ID and keep the section number sequencing in a different attribute.

       

       

       

      Attachments

        Issue Links

          Activity

            People

              tusefomal Ferran Recio
              tusefomal Ferran Recio
              Mikel Martín Corrales Mikel Martín Corrales
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              CiBoT CiBoT
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Clockify

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