-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.5
-
None
-
MOODLE_405_STABLE
It would be useful if plugins could easily extend the navigation on the /cohort/index.php page. See screenshot attached.
The use case for this is if plugins (for example, an alternative method to add/remove users to cohorts via the UI, or add/remove cohorts entirely) want to operate on the cohorts, and do it in the same context the cohorts are stored in (for capability checking, for example). Usually this context is either system or course category context.
Being able to add a button here to me at least seems to be the easiest and most logic place for the users.
Currently, these are built here https://github.com/moodle/moodle/blob/7d7a871eddf81cdc1e6f5ea9dda67cf9058dd032/cohort/lib.php#L644 with no option for extension.
It would probably use the new hooks api https://moodledev.io/docs/4.4/apis/core/hooks as opposed to the older style lib.php callbacks.