MDL-45100 fix course_context classname PHPDdos typo in context API
This commit is contained in:
+3
-3
@@ -5652,7 +5652,7 @@ abstract class context extends stdClass implements IteratorAggregate {
|
||||
* Is this context part of any course? If yes return course context.
|
||||
*
|
||||
* @param bool $strict true means throw exception if not found, false means return false if not found
|
||||
* @return course_context context of the enclosing course, null if not found or exception
|
||||
* @return context_course context of the enclosing course, null if not found or exception
|
||||
*/
|
||||
public function get_course_context($strict = true) {
|
||||
if ($strict) {
|
||||
@@ -6791,7 +6791,7 @@ class context_course extends context {
|
||||
* Is this context part of any course? If yes return course context.
|
||||
*
|
||||
* @param bool $strict true means throw exception if not found, false means return false if not found
|
||||
* @return course_context context of the enclosing course, null if not found or exception
|
||||
* @return context_course context of the enclosing course, null if not found or exception
|
||||
*/
|
||||
public function get_course_context($strict = true) {
|
||||
return $this;
|
||||
@@ -7257,7 +7257,7 @@ class context_block extends context {
|
||||
* Is this context part of any course? If yes return course context.
|
||||
*
|
||||
* @param bool $strict true means throw exception if not found, false means return false if not found
|
||||
* @return course_context context of the enclosing course, null if not found or exception
|
||||
* @return context_course context of the enclosing course, null if not found or exception
|
||||
*/
|
||||
public function get_course_context($strict = true) {
|
||||
$parentcontext = $this->get_parent_context();
|
||||
|
||||
@@ -4021,7 +4021,7 @@ function get_context_url(context $context) {
|
||||
* @deprecated since 2.2
|
||||
* @see context::get_course_context()
|
||||
* @param context $context
|
||||
* @return course_context context of the enclosing course, null if not found or exception
|
||||
* @return context_course context of the enclosing course, null if not found or exception
|
||||
*/
|
||||
function get_course_context(context $context) {
|
||||
debugging('get_course_context() is deprecated, please use $context->get_course_context(true) instead.', DEBUG_DEVELOPER);
|
||||
|
||||
Reference in New Issue
Block a user