-
Bug
-
Resolution: Fixed
-
Minor
-
4.5
-
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:
- Create a new Custom sections course with at lease two sections (besides the General section).
- Add an subsection to the first section
- Swap the order of the two sections.
- Try to add an another subsection above the existing one.
- Verify the subsection gets added to the correct section.
Read the changed files in this order:
- mod/subsection/classes/local/callbacks/before_activitychooserbutton_exported_handler.php
- course/format/amd/src/local/content/actions.js
- course/format/amd/src/local/courseeditor/mutations.js
- course/format/classes/external/create_module.php
- course/format/classes/stateactions.php
- course/format/tests/fixtures/format_theunittest_stateactions.php