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:
Ankit Agarwal
2012-07-24 16:20:35 +08:00
parent 1f364c87e3
commit 4658aec5eb
+1 -1
View File
@@ -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();
}