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

Activity chooser can not grab the section id on contrib formats

    XMLWordPrintable

    Details

    • Testing Instructions:
      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"
    • Workaround:
      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.
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:

      Description

      As discovered and discussed by Adrian Perez 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

              Assignee:
              mathewmay Mathew May
              Reporter:
              mathewmay Mathew May
              Peer reviewer:
              Mihail Geshoski
              Integrator:
              Andrew Nicols
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                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