MDL-34459 course: Changing strictness of context call in get_category_or_system_context() to keep it consistent with past usages
This commit is contained in:
+1
-1
@@ -1994,7 +1994,7 @@ function get_module_metadata($course, $modnames, $sectionreturn = 0) {
|
||||
*/
|
||||
function get_category_or_system_context($categoryid) {
|
||||
if ($categoryid) {
|
||||
return context_coursecat::instance($categoryid);
|
||||
return context_coursecat::instance($categoryid, IGNORE_MISSING);
|
||||
} else {
|
||||
return context_system::instance();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user