-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.1
This is caused by MDL-55580, specifically the late decision to move all the debugging output to the function get_capability_info(). This results in debugging during upgrade even despite the fact that neither has_capability, require_capability(), etc. are called.
See the example on MDL-72066, where we deprecate the capability as per the documentation added in MDL-55580. See that here: https://moodledev.io/docs/apis/subsystems/access#deprecating-a-capability
Once the capability has been deprecated, run the upgrade (with debugging enabled) and you'll see the following:
The capability 'mod/lti:manage' is deprecated.This was replaced by the |
more specific mod/lti:instructor, mod/lti:teachingassistant and
|
mod/lti:managerIt will be replaced by 'mod/lti:instructor'.line 2581 of /lib/accesslib.php: call to debugging()line 1468 of /lib/accesslib.php: call to get_capability_info()line 2428 of /lib/accesslib.php: call to unassign_capability()line 2393 of /lib/accesslib.php: call to capabilities_cleanup()line 638 of /lib/upgradelib.php: call to update_capabilities()line 953 of /lib/upgradelib.php: call to upgrade_component_updated()line 677 of /lib/upgradelib.php: call to upgrade_plugins_modules()line 1952 of /lib/upgradelib.php: call to upgrade_plugins()line 721 of /admin/index.php: call to upgrade_noncore() |
This will occur n times - once for each role archetype the capability was included with. In the linked example, this is seen 3 times for mod/lti upgrade.
I think this needs addressing. This isn't a problem with anything in the upgrade. It's behaving normally by cleaning up caps and shouldn't throw debugging. We only want debugging when a deprecated capability is being called.