Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-31005 fix strict coding style warning in context_helper

PHP54 compatibility
  • Loading branch information...
commit 05042a7ed8edb7846ea1aa521e3fb982ddfd0d99 1 parent a1d2463
@skodak skodak authored
Showing with 6 additions and 17 deletions.
  1. +6 −17 lib/accesslib.php
View
23 lib/accesslib.php
@@ -4979,17 +4979,6 @@ protected static function insert_context_record($contextlevel, $instanceid, $par
}
/**
- * Returns human readable context level name.
- *
- * @static
- * @return string the human readable context level name.
- */
- protected static function get_level_name() {
- // must be implemented in all context levels
- throw new coding_exception('can not get level name of abstract context');
- }
-
- /**
* Returns human readable context identifier.
*
* @param boolean $withprefix whether to prefix the name of the context with the
@@ -5476,7 +5465,7 @@ protected function __construct(stdClass $record) {
* @static
* @return string the human readable context level name.
*/
- protected static function get_level_name() {
+ public static function get_level_name() {
return get_string('coresystem');
}
@@ -5714,7 +5703,7 @@ protected function __construct(stdClass $record) {
* @static
* @return string the human readable context level name.
*/
- protected static function get_level_name() {
+ public static function get_level_name() {
return get_string('user');
}
@@ -5882,7 +5871,7 @@ protected function __construct(stdClass $record) {
* @static
* @return string the human readable context level name.
*/
- protected static function get_level_name() {
+ public static function get_level_name() {
return get_string('category');
}
@@ -6102,7 +6091,7 @@ protected function __construct(stdClass $record) {
* @static
* @return string the human readable context level name.
*/
- protected static function get_level_name() {
+ public static function get_level_name() {
return get_string('course');
}
@@ -6317,7 +6306,7 @@ protected function __construct(stdClass $record) {
* @static
* @return string the human readable context level name.
*/
- protected static function get_level_name() {
+ public static function get_level_name() {
return get_string('activitymodule');
}
@@ -6553,7 +6542,7 @@ protected function __construct(stdClass $record) {
* @static
* @return string the human readable context level name.
*/
- protected static function get_level_name() {
+ public static function get_level_name() {
return get_string('block');
}
Please sign in to comment.
Something went wrong with that request. Please try again.