-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
5.1
-
MOODLE_501_STABLE
The course/changenumsections.php is a legacy file that creates sections at the bottom of the course. It has been entirely replaced and improved by the section_add state action (from the backend) and the addSection mutation (from the frontend).
The changenumsections.php is only present as a non-ajax alternative to the add section button, but that is not necessary anymore (since MDL-84216) because course/format/update.php can execute the same logic using the new stateaction directly.
This issue is about:
- Add an optional targetsection param to the core_courseformat\output\local\content\addsection class so it can be used to calculate the correct URL when the element is between two sections.
- Create the addsection element with the new targetsection in format_topics\output\courseformat\content\section.
- Replace the links to changenumsections,PHP urls by $this->format->get_update_url to use the new generic url.
- Provide non-ajax behat test for adding sections.
- Add a deprecation message to the changenumsections.php file.
- Create an issue for the final removal of the file in Moodle 6.0.