MDL-53113 libraries: Also remove core_renderer->notify_xxx() methods
Keeping the methods instead of fully deleting them alternative.
This commit is contained in:
+12
-60
@@ -2889,72 +2889,24 @@ EOD;
|
||||
return $this->render_from_template($notification->get_template_name(), $notification->export_for_template($this));
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a notification at a particular level - in this case, NOTIFY_PROBLEM.
|
||||
*
|
||||
* @param string $message the message to print out
|
||||
* @return string HTML fragment.
|
||||
* @deprecated since Moodle 3.1 MDL-30811 - please do not use this function any more.
|
||||
* @todo MDL-53113 This will be removed in Moodle 3.5.
|
||||
* @see \core\output\notification
|
||||
*/
|
||||
public function notify_problem($message) {
|
||||
debugging(__FUNCTION__ . ' is deprecated.' .
|
||||
'Please use \core\notification::add, or \core\output\notification as required',
|
||||
DEBUG_DEVELOPER);
|
||||
$n = new \core\output\notification($message, \core\output\notification::NOTIFY_ERROR);
|
||||
return $this->render($n);
|
||||
public function notify_problem() {
|
||||
throw new coding_exception('core_renderer::notify_problem() can not be used any more, '.
|
||||
'please use \core\notification::add(), or \core\output\notification as required.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a notification at a particular level - in this case, NOTIFY_SUCCESS.
|
||||
*
|
||||
* @param string $message the message to print out
|
||||
* @return string HTML fragment.
|
||||
* @deprecated since Moodle 3.1 MDL-30811 - please do not use this function any more.
|
||||
* @todo MDL-53113 This will be removed in Moodle 3.5.
|
||||
* @see \core\output\notification
|
||||
*/
|
||||
public function notify_success($message) {
|
||||
debugging(__FUNCTION__ . ' is deprecated.' .
|
||||
'Please use \core\notification::add, or \core\output\notification as required',
|
||||
DEBUG_DEVELOPER);
|
||||
$n = new \core\output\notification($message, \core\output\notification::NOTIFY_SUCCESS);
|
||||
return $this->render($n);
|
||||
public function notify_success() {
|
||||
throw new coding_exception('core_renderer::notify_success() can not be used any more, '.
|
||||
'please use \core\notification::add(), or \core\output\notification as required.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a notification at a particular level - in this case, NOTIFY_MESSAGE.
|
||||
*
|
||||
* @param string $message the message to print out
|
||||
* @return string HTML fragment.
|
||||
* @deprecated since Moodle 3.1 MDL-30811 - please do not use this function any more.
|
||||
* @todo MDL-53113 This will be removed in Moodle 3.5.
|
||||
* @see \core\output\notification
|
||||
*/
|
||||
public function notify_message($message) {
|
||||
debugging(__FUNCTION__ . ' is deprecated.' .
|
||||
'Please use \core\notification::add, or \core\output\notification as required',
|
||||
DEBUG_DEVELOPER);
|
||||
$n = new \core\output\notification($message, \core\output\notification::NOTIFY_INFO);
|
||||
return $this->render($n);
|
||||
public function notify_message() {
|
||||
throw new coding_exception('core_renderer::notify_message() can not be used any more, '.
|
||||
'please use \core\notification::add(), or \core\output\notification as required.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a notification at a particular level - in this case, NOTIFY_REDIRECT.
|
||||
*
|
||||
* @param string $message the message to print out
|
||||
* @return string HTML fragment.
|
||||
* @deprecated since Moodle 3.1 MDL-30811 - please do not use this function any more.
|
||||
* @todo MDL-53113 This will be removed in Moodle 3.5.
|
||||
* @see \core\output\notification
|
||||
*/
|
||||
public function notify_redirect($message) {
|
||||
debugging(__FUNCTION__ . ' is deprecated.' .
|
||||
'Please use \core\notification::add, or \core\output\notification as required',
|
||||
DEBUG_DEVELOPER);
|
||||
$n = new \core\output\notification($message, \core\output\notification::NOTIFY_INFO);
|
||||
return $this->render($n);
|
||||
public function notify_redirect() {
|
||||
throw new coding_exception('core_renderer::notify_redirect() can not be used any more, '.
|
||||
'please use \core\notification::add(), or \core\output\notification as required.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,8 @@ information provided here is intended especially for developers.
|
||||
|
||||
=== 3.5 ===
|
||||
|
||||
* The core_renderer methods notify_problem(), notify_success(), notify_message() and notify_redirect() that were
|
||||
deprecated in Moodle 3.1 have been removed. Use \core\notification::add(), or \core\output\notification as required.
|
||||
* The maximum supported precision (the total number of digits) for XMLDB_TYPE_NUMBER ("number") fields raised from 20 to
|
||||
38 digits. Additionally, the whole number part (precision minus scale) must not be longer than the maximum length of
|
||||
integer fields (20 digits). Note that PHP floats commonly support precision of roughly 15 digits only (MDL-32113).
|
||||
|
||||
Reference in New Issue
Block a user