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

Subsections added in wrong place

XMLWordPrintable

    • HQ 2025 Sprint I1.3 Moppies

      Adding subsections is done by section numbers, not IDs, so it gets messed up when sections are reordered.

       

      Typical test:

      1. Create a new Custom sections course with at lease two sections (besides the General section).
      2. Add an subsection to the first section
      3. Swap the order of the two sections.
      4. Try to add an another subsection above the existing one.
      5. Verify the subsection gets added to the correct section.
         

       

      Read the changed files in this order:

      1. mod/subsection/classes/local/callbacks/before_activitychooserbutton_exported_handler.php
      2. course/format/amd/src/local/content/actions.js
      3. course/format/amd/src/local/courseeditor/mutations.js
      4. course/format/classes/external/create_module.php
      5. course/format/classes/stateactions.php
      6. course/format/tests/fixtures/format_theunittest_stateactions.php

        1. screenshot-1.png
          screenshot-1.png
          37 kB
        2. screenshot-2.png
          screenshot-2.png
          44 kB
        3. screenshot-3.png
          screenshot-3.png
          46 kB
        4. screenshot-4.png
          screenshot-4.png
          59 kB
        5. screenshot-5.png
          screenshot-5.png
          70 kB

            tusefomal Ferran Recio
            james-cnz James E. Calder
            Laurent David Laurent David
            Amaia Anabitarte Amaia Anabitarte
            CiBoT CiBoT
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 13 minutes
                5h 13m

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