-
Task
-
Resolution: Duplicate
-
Minor
-
None
-
2.3
-
MOODLE_23_STABLE
As discussed in MDL-33683, there are several methods in use to determine the section id for a given section. Even where the same method is used, it's not from the same function for each of the place it's in use.
I propose a quick audit of all of the code in:
- course/yui/modchooser
- course/yui/dragdrop
- course/yui/toolboxes
- course/dragdrop.js
To check for any sections of code which should be standardised. These can be placed into
- course/yui/coursebase
Which has the M.course.coursebase namespace already and is already used a dependency to all of the above pieces of code.
We should definitely have standardised functions for:
- get_section_id
- get_activity_id
- get_activity_type
We should also look at standardising all of the CSS content where possible to the same coursebase location. At present we have duplicates of many CSS selectors (e.g. section is likely specified in every of the above files).