-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.7, 4.1.2
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-77946-401 -
- Covered by automated tests (PHPUnit)
If you call get_user_capability_contexts() with $getcategories as true, and no category sort order:
get_user_capability_contexts('tool/myplugin:viewdetails', true, false, '', '', '', '', '', 1); |
You get undefined variable error is thrown:
PHP Notice: Undefined variable: orderby in /opt/homebrew/var/www/moodle/lib/accesslib.php on line 4250 |
This happens for categories and not courses because in the category section, we use a different variable, $orderby, to build the query, while in the course section, the original parameter variable is used - so in the empty cause, it is just used.
- is a regression caused by
-
MDL-72099 Add navigation by contexts in the content bank
- Closed