Merge branch 'MDL-62943-master' of git://github.com/mihailges/moodle
This commit is contained in:
+4
-21
@@ -2681,29 +2681,12 @@ EOD;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HTML to display the 'Update this Modulename' button that appears on module pages.
|
||||
*
|
||||
* @deprecated since Moodle 3.2
|
||||
*
|
||||
* @param string $cmid the course_module id.
|
||||
* @param string $modulename the module name, eg. "forum", "quiz" or "workshop"
|
||||
* @return string the HTML for the button, if this user has permission to edit it, else an empty string.
|
||||
*/
|
||||
public function update_module_button($cmid, $modulename) {
|
||||
global $CFG;
|
||||
|
||||
debugging('core_renderer::update_module_button() has been deprecated and should not be used anymore. Activity modules ' .
|
||||
'should not add the edit module button, the link is already available in the Administration block. Themes can choose ' .
|
||||
'to display the link in the buttons row consistently for all module types.', DEBUG_DEVELOPER);
|
||||
|
||||
if (has_capability('moodle/course:manageactivities', context_module::instance($cmid))) {
|
||||
$modulename = get_string('modulename', $modulename);
|
||||
$string = get_string('updatethis', '', $modulename);
|
||||
$url = new moodle_url("$CFG->wwwroot/course/mod.php", array('update' => $cmid, 'return' => true, 'sesskey' => sesskey()));
|
||||
return $this->single_button($url, $string);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
public function update_module_button() {
|
||||
throw new coding_exception('core_renderer::update_module_button() can not be used anymore. Activity ' .
|
||||
'modules should not add the edit module button, the link is already available in the Administration block. ' .
|
||||
'Themes can choose to display the link in the buttons row consistently for all module types.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-1
@@ -7,7 +7,8 @@ information provided here is intended especially for developers.
|
||||
callback. If a string is returned, it is displayed instead of the list if suggested items. This can be used, for
|
||||
example, to inform the user that there are too many items matching the current search criteria.
|
||||
* The following functions have been finally deprecated and can not be used any more:
|
||||
- external_function_info()
|
||||
- external_function_info()
|
||||
- core_renderer::update_module_button()
|
||||
* Following api's have been removed in behat_config_manager, please use behat_config_util instead.
|
||||
- get_features_with_tags()
|
||||
- get_components_steps_definitions()
|
||||
|
||||
Reference in New Issue
Block a user