MDL-45100 fix course_context classname PHPDdos typo in context API

This commit is contained in:
Petr Škoda
2014-04-15 15:46:19 +08:00
parent 069fe267b6
commit aa386d2929
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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();
+1 -1
View File
@@ -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);