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

Section renderer should always output the <ul> tag

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: Course, JavaScript
    • Labels:
    • Testing Instructions:
      Hide

      Please be diligent and try with a number of course formats, including some of those in the plugin directory.

      • Open a course
      • Confirm that the HTML structure for an empty section is valid - it should have:
        • An empty <ul></ul>
      • Confirm that the HTML structure for a section with content is valid - it should have:
        • An <ul> tag
        • some course modules in that list.
      • Test that moving sections, modules, and blocks still works as it did before.
      Show
      Please be diligent and try with a number of course formats, including some of those in the plugin directory. Open a course Confirm that the HTML structure for an empty section is valid - it should have: An empty <ul></ul> Confirm that the HTML structure for a section with content is valid - it should have: An <ul> tag some course modules in that list. Test that moving sections, modules, and blocks still works as it did before.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:

      Description

      Having to conditionally add an unordered list in our JavaScript is a right pain in the back-side and makes it very difficult to get right for course formats.

      We should always create the <ul> element, even for empty sections. This will vastly simplify our JavaScript.

      I've had a quick look at all of the renderers for contributed course formats, and none of these overwrites the cm_list function. If one were to do so in the future, then they would either not support the existing JS code anyway so no features are lost.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dobedobedoh Andrew Nicols
                Reporter:
                dobedobedoh Andrew Nicols
                Peer reviewer:
                Marina Glancy
                Integrator:
                Sam Hemelryk
                Tester:
                Adrian Greeve
                Participants:
                Component watchers:
                Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/13