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

Add topics modal should respect maxsections

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.4.4, 3.5.1
    • None
    • Course
    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MDL-62985-master
    • Hide

      Prerequisites

      • A course in topics or weekly format, initially with the number of sections fewer than maxsections. You should be unable to specify a number of sections greater than maxsections.

      Test 1 - Limiting addition of sections

      1. Confirm the value of maxsections, in /admin/settings.php?section=coursesettings
      2. Turn editing on.
      3. Select the 'add topics' (or equivalent) option.
      4. In the modal dialog that appears, the spinner should allow you to specify a number of sections which is the difference of maxsections and the current number of sections in the course.
      5. Add a given number of sections.
      6. Check that the correct number of sections have appeared in the course.

      Test 2 - Adding maximum number of sections

      1. As per test, but add the maximum number of sections possible.
      2. Check that the correct number of sections have appeared in the course.
      3. Confirm that the add topics/sections option at the bottom of the page has disappeared.

      Test 3 - Deleting sections reveals 'add' option

      1. Add the maximum number of sections to a course.
      2. Confirm the 'add topics' should no longer be visible.
      3. Deleting one section/topic.
      4. The add topics option should no be visible again.
      Show
      Prerequisites A course in topics or weekly format, initially with the number of sections fewer than maxsections . You should be unable to specify a number of sections greater than maxsections . Test 1 - Limiting addition of sections Confirm the value of maxsections , in /admin/settings.php?section=coursesettings Turn editing on. Select the 'add topics' (or equivalent) option. In the modal dialog that appears, the spinner should allow you to specify a number of sections which is the difference of maxsections and the current number of sections in the course. Add a given number of sections. Check that the correct number of sections have appeared in the course. Test 2 - Adding maximum number of sections As per test, but add the maximum number of sections possible. Check that the correct number of sections have appeared in the course. Confirm that the add topics/sections option at the bottom of the page has disappeared. Test 3 - Deleting sections reveals 'add' option Add the maximum number of sections to a course. Confirm the 'add topics' should no longer be visible. Deleting one section/topic. The add topics option should no be visible again.

    Description

      Splitting this issue off from MDL-59514. In Moodle 3.2 and earlier the maxsections value did double duty: it specified the maximum number of sections which could be added a new course on creation and it set an upper limit on the total number of sections a teacher could add a course, because it was used to populate the section dropdown on the course editing page.

      With the removal of numsections and the movement of the section add/removal to the main course page this second behavior was dropped and nothing replaced it. A teacher can add an arbitrary number of sections from the course page with no upper limit. This has led to some unfortunate outcomes which are documented in MDL-59514.

      Either the add topics modal (and the underlying add section functionality) should respect maxsections, restoring the old if possibly inadvertent behavior, or there should be a new setting which explicitly caps the maximum number of sections in a course.

      Attachments

        Issue Links

          Activity

            People

              russellb Russell Boyatt
              cfulton Charles Fulton
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              6 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: