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

Activity chooser can not grab the section id on contrib formats

    XMLWordPrintable

Details

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • Hide

      Update contrib course format renderer override section_header() to include the data-sectionid attribute like in core.

      Show
      Update contrib course format renderer override section_header()  to include the data-sectionid attribute like in core.
    • Hide

      Requirements:

      Testing:

      1. Navigate to your course
      2. Turn editing on
      3. Select the 'Add an activity or resource' button under section 3
      4. Select the 'Label' module
      5. Confirm you see "Adding a new Label to section 3"
      Show
      Requirements: Moodle site with patch applied The following installed  course format: Collapsed Topics 1 Course with the collapsed topics format Testing: Navigate to your course Turn editing on Select the 'Add an activity or resource' button under section 3 Select the 'Label' module Confirm you see "Adding a new Label to section 3"

    Description

      As discovered and discussed by pead in the dev chat, the activity chooser has undefined section ids in contributed course formats.

      This was initially fine until I looked for the section ID within the section header for an ID then falling back to the initial button that we generate. Details can be seen in MDL-68235

      Proposal, Maintain the logic introduced by the aforementioned MDL but only use the sectionDiv if it contains the data attribute of sectionid.

      Also shows that we need to inform developers of contrib course formats that if they override the section_header() with the course renderer that they should include the sectionid if they want drag and drop sections to work correctly with the activity chooser.

      Will take a look at this before the release.

      Attachments

        Issue Links

          Activity

            People

              mathewmay Mathew May
              mathewmay Mathew May
              Mihail Geshoski Mihail Geshoski
              Andrew Lyons Andrew Lyons
              Janelle Barcega Janelle Barcega
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona), Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                15/Jun/20

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 32 minutes
                  2h 32m