MDL-40462 libraries: deprecated get_course_context()
This commit is contained in:
@@ -7246,18 +7246,6 @@ function context_instance_preload_sql($joinon, $contextlevel, $tablealias) {
|
||||
return array($select, $join);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this context part of any course? if yes return course context,
|
||||
* if not return null or throw exception.
|
||||
*
|
||||
* @deprecated since 2.2, use $context->get_course_context() instead
|
||||
* @param context $context
|
||||
* @return course_context context of the enclosing course, null if not found or exception
|
||||
*/
|
||||
function get_course_context(context $context) {
|
||||
return $context->get_course_context(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns current course id or null if outside of course based on context parameter.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user