diff --git a/.upgradenotes/MDL-87427-2025123007003354.yml b/.upgradenotes/MDL-87427-2025123007003354.yml new file mode 100644 index 00000000000..ab03cf8599f --- /dev/null +++ b/.upgradenotes/MDL-87427-2025123007003354.yml @@ -0,0 +1,5 @@ +issueNumber: MDL-87427 +notes: + core: + - message: The `relateduserid` key inside the `other` array has been removed. + type: removed diff --git a/.upgradenotes/MDL-87427-2025123007515354.yml b/.upgradenotes/MDL-87427-2025123007515354.yml new file mode 100644 index 00000000000..59b65399010 --- /dev/null +++ b/.upgradenotes/MDL-87427-2025123007515354.yml @@ -0,0 +1,18 @@ +issueNumber: MDL-87427 +notes: + core: + - message: >- + - The following files have been removed: + - `public/lib/classes/event/content_viewed.php` + - `public/lib/classes/exception/webservice_parameter_exception.php` + - The `lightbox` attribute has been removed from `public/lib/yui/src/notification/js/dialogue.js`. + - The following functions have been removed from `public/lib/deprecatedlib.php`: + - `get_context_instance()` + - `can_use_rotated_text()` + - `get_system_context()` + - `print_arrow()` + type: removed + core_course: + - message: >- + - The `\core_courseformat\output\section_renderer\core_course_renderer::course_category_tree_category()` has removed in `public/course/renderer.php`. + type: removed diff --git a/public/course/renderer.php b/public/course/renderer.php index 1b021eafb58..462b55cb44e 100644 --- a/public/course/renderer.php +++ b/public/course/renderer.php @@ -139,20 +139,6 @@ class core_course_renderer extends plugin_renderer_base { return $this->frontpage_combo_list(); } - /** - * Renderers a category for use with course_category_tree - * - * @deprecated since 2.5 - * - * @param stdClass $category - * @param int $depth - * @return string - */ - final protected function course_category_tree_category(stdClass $category, $depth=1) { - debugging('Function core_course_renderer::course_category_tree_category() is deprecated', DEBUG_DEVELOPER); - return ''; - } - /** * Render a modchooser. * diff --git a/public/lib/classes/event/content_viewed.php b/public/lib/classes/event/content_viewed.php deleted file mode 100644 index 99556f2bd96..00000000000 --- a/public/lib/classes/event/content_viewed.php +++ /dev/null @@ -1,124 +0,0 @@ -. -/** - * Abstract event for content viewing. - * - * This class has been deprecated, please extend base event or other relevent abstract class. - * - * @package core - * @copyright 2013 Ankit Agarwal - * @deprecated since Moodle 2.7 - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -namespace core\event; - -defined('MOODLE_INTERNAL') || die(); - -debugging('core\event\content_viewed has been deprecated. Please extend base event or other relevant abstract class.', - DEBUG_DEVELOPER); - -/** - * Class content_viewed. - * - * This class has been deprecated, please extend base event or other relevent abstract class. - * - * @property-read array $other { - * Extra information about the event. - * - * - string content: name of the content viewed. - * } - * - * @package core - * @since Moodle 2.6 - * @copyright 2013 Ankit Agarwal - * @deprecated since Moodle 2.7 - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -abstract class content_viewed extends base { - - /** @var null|array $legacylogdata Legacy log data */ - protected $legacylogdata = null; - - /** - * Set basic properties of the event. - */ - protected function init() { - global $PAGE; - - $this->data['crud'] = 'r'; - $this->data['edulevel'] = self::LEVEL_OTHER; - $this->context = $PAGE->context; - } - - /** - * Set basic page properties. - */ - public function set_page_detail() { - global $PAGE; - if (!isset($this->data['other'])) { - $this->data['other'] = array(); - } - $this->data['other'] = array_merge(array('url' => $PAGE->url->out_as_local_url(false), - 'heading' => $PAGE->heading, - 'title' => $PAGE->title), $this->data['other']); - } - - /** - * Returns localised general event name. - * - * @return string - */ - public static function get_name() { - return get_string('eventcontentviewed', 'moodle'); - } - - /** - * Returns non-localised description of what happened. - * - * @return string - */ - public function get_description() { - return "The user with id '$this->userid' viewed content."; - } - - /** - * Custom validation. - * - * @throws \coding_exception when validation does not pass. - * @return void - */ - protected function validate_data() { - parent::validate_data(); - // Make sure this class is never used without a content identifier. - if (empty($this->other['content'])) { - throw new \coding_exception('The \'content\' value must be set in other.'); - } - } - - public static function get_other_mapping() { - return false; - } - - /** - * This event has been deprected. - * - * @return boolean - */ - public static function is_deprecated() { - return true; - } -} diff --git a/public/lib/classes/event/course_completed.php b/public/lib/classes/event/course_completed.php index 0f3bbc0230c..c9389d532d7 100644 --- a/public/lib/classes/event/course_completed.php +++ b/public/lib/classes/event/course_completed.php @@ -32,8 +32,6 @@ defined('MOODLE_INTERNAL') || die(); * @property-read int $relateduserid user who completed the course * @property-read array $other { * Extra information about event. - * - * - int relateduserid: deprecated since 2.7, please use property relateduserid * } * * @package core @@ -54,7 +52,6 @@ class course_completed extends base { 'relateduserid' => $completion->userid, 'context' => \context_course::instance($completion->course), 'courseid' => $completion->course, - 'other' => array('relateduserid' => $completion->userid), // Deprecated since 2.7, please use property relateduserid. ) ); $event->add_record_snapshot('course_completions', $completion); @@ -109,12 +106,6 @@ class course_completed extends base { if (!isset($this->relateduserid)) { throw new \coding_exception('The \'relateduserid\' must be set.'); } - - // Check that the 'relateduserid' value is set in other as well. This is because we introduced this in 2.6 - // and some observers may be relying on this value to be present. - if (!isset($this->other['relateduserid'])) { - throw new \coding_exception('The \'relateduserid\' value must be set in other.'); - } } public static function get_objectid_mapping() { diff --git a/public/lib/classes/exception/webservice_parameter_exception.php b/public/lib/classes/exception/webservice_parameter_exception.php deleted file mode 100644 index d94744bde93..00000000000 --- a/public/lib/classes/exception/webservice_parameter_exception.php +++ /dev/null @@ -1,45 +0,0 @@ -. - -namespace core\exception; -/** - * Web service parameter exception class. - * - * @deprecated since Moodle 2.2 - use moodle exception instead - * This exception must be thrown to the web service client when a web service parameter is invalid - * The error string is gotten from webservice.php - * @package core - * @subpackage exception - * @copyright Jerome Mouneyrac - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -class webservice_parameter_exception extends moodle_exception { - /** - * Constructor. - * - * @param string $errorcode The name of the string from webservice.php to print - * @param string $a The name of the parameter - * @param string $debuginfo Optional information to aid debugging - */ - public function __construct($errorcode = null, $a = '', $debuginfo = null) { - parent::__construct($errorcode, 'webservice', '', $a, $debuginfo); - } -} - -// Alias this class to the old name. -// This file will be autoloaded by the legacyclasses autoload system. -// In future all uses of this class will be corrected and the legacy references will be removed. -class_alias(webservice_parameter_exception::class, \webservice_parameter_exception::class); diff --git a/public/lib/db/legacyclasses.php b/public/lib/db/legacyclasses.php index 3d90f9bd27d..733e20ac0bd 100644 --- a/public/lib/db/legacyclasses.php +++ b/public/lib/db/legacyclasses.php @@ -48,7 +48,6 @@ $legacyclasses = [ \require_login_exception::class => 'exception/require_login_exception.php', \require_login_session_timeout_exception::class => 'exception/require_login_session_timeout_exception.php', \required_capability_exception::class => 'exception/required_capability_exception.php', - \webservice_parameter_exception::class => 'exception/webservice_parameter_exception.php', // Cache API. \cache::class => [ diff --git a/public/lib/deprecatedlib.php b/public/lib/deprecatedlib.php index 362f353534a..5c3187e2dd9 100644 --- a/public/lib/deprecatedlib.php +++ b/public/lib/deprecatedlib.php @@ -186,41 +186,6 @@ function get_component_directory($component) { return core_component::get_component_directory($component); } -/** - * @deprecated since 2.2, use context_course::instance() or other relevant class instead - */ -#[\core\attribute\deprecated('\core\context::instance', since: '2.2', mdl: 'MDL-34472', final: true)] -function get_context_instance() { - \core\deprecation::emit_deprecation(__FUNCTION__); -} - -/** - * @deprecated since 2.5 - do not use, the textrotate.js will work it out automatically - */ -#[\core\attribute\deprecated('Not replaced', since: '2.0', mdl: 'MDL-19756', final: true)] -function can_use_rotated_text() { - \core\deprecation::emit_deprecation(__FUNCTION__); -} - -/** - * @deprecated since 2.2 - */ -#[\core\attribute\deprecated('\core\context\system::instance', since: '2.2', mdl: 'MDL-34472', final: true)] -function get_system_context() { - \core\deprecation::emit_deprecation(__FUNCTION__); -} - -/** - * Returns an image of an up or down arrow, used for column sorting. To avoid unnecessary DB accesses, please - * provide this function with the language strings for sortasc and sortdesc. - * - * @deprecated use $OUTPUT->arrow() instead. - */ -#[\core\attribute\deprecated('OUTPUT->[l|r]arrow', since: '2.0', mdl: 'MDL-19756', final: true)] -function print_arrow() { - \core\deprecation::emit_deprecation(__FUNCTION__); -} - /** * rc4encrypt * diff --git a/public/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js b/public/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js index 4a611c90597..772522f41da 100644 --- a/public/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js +++ b/public/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js @@ -661,25 +661,6 @@ Y.extend(DIALOGUE, Y.Panel, { }, - /** - * Whether to display the dialogue modally and with a - * lightbox style. - * - * @attribute lightbox - * @type Boolean - * @default true - * @deprecated Since Moodle 2.7. Please use modal instead. - */ - lightbox: { - lazyAdd: false, - setter: function(value) { - Y.log("The lightbox attribute of M.core.dialogue has been deprecated since Moodle 2.7, " + - "please use the modal attribute instead", - 'warn', 'moodle-core-notification-dialogue'); - this.set('modal', value); - } - }, - /** * Whether to display a close button on the dialogue. * diff --git a/public/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js b/public/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js index a10e205056c..9aee20a9d86 100644 --- a/public/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js +++ b/public/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js @@ -1,2 +1,2 @@ -YUI.add("moodle-core-notification-dialogue",function(s,h){var u,i,t,n,a,l,e,o="moodle-dialogue",d="notificationBase",r={BASE:"moodle-dialogue-base",WRAP:"moodle-dialogue-wrap",HEADER:"moodle-dialogue-hd",BODY:"moodle-dialogue-bd",CONTENT:"moodle-dialogue-content",FOOTER:"moodle-dialogue-ft",HIDDEN:"hidden",LIGHTBOX:"moodle-dialogue-lightbox"};M.core=M.core||{},t=o+"-fullscreen",n=o+"-hidden",a="moodle-has-zindex",s.extend(i=function(e){var t="moodle-dialogue-"+s.stamp(this)+"-wrap";e.notificationBase=s.Node.create('