Eloy has raised in
MDL-62631 that there are several places in the API where the needed capabilities to manage badges are checked.
It will be good to create a badges_can_manage method to unify it. The content of the new method should contain the capabilities in lib/badgeslib.php. It should be called from, at least:
- badges/index.php (~ line 95)
- badges/view.php (~line 117 when
- lib/badgeslib.php, in the badges_add_course_navigation method.