diff --git a/availability/renderer.php b/availability/renderer.php index 428fadc5274..3c88be9ff2f 100644 --- a/availability/renderer.php +++ b/availability/renderer.php @@ -31,6 +31,6 @@ class core_availability_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(availability_info::class, since: '4.0', mdl: 'MDL-71691', final: true)] public function render_core_availability_multiple_messages(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } } diff --git a/backup/controller/base_controller.class.php b/backup/controller/base_controller.class.php index f6dd3cef711..66ce9403e58 100644 --- a/backup/controller/base_controller.class.php +++ b/backup/controller/base_controller.class.php @@ -111,7 +111,7 @@ abstract class base_controller extends backup implements loggable { */ #[\core\attribute\deprecated(since: '4.1', mdl: 'MDL-74548', final: true)] public function set_copy(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -119,6 +119,6 @@ abstract class base_controller extends backup implements loggable { */ #[\core\attribute\deprecated('restore_controller::get_copy()', since: '4.1', mdl: 'MDL-74548', final: true)] public function get_copy() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } } diff --git a/badges/classes/reportbuilder/local/systemreports/course_badges.php b/badges/classes/reportbuilder/local/systemreports/course_badges.php index 0f42cd53ecd..e64c4dc3d4d 100644 --- a/badges/classes/reportbuilder/local/systemreports/course_badges.php +++ b/badges/classes/reportbuilder/local/systemreports/course_badges.php @@ -51,7 +51,7 @@ class course_badges extends system_report { */ #[\core\attribute\deprecated('course_badges::initialise', since: '4.5', mdl: 'MDL-82503')] protected function initialise(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $USER; // Our main entity, it contains all of the column definitions that we need. $badgeentity = new badge(); @@ -103,7 +103,7 @@ class course_badges extends system_report { */ #[\core\attribute\deprecated('course_badges::can_view', since: '4.5', mdl: 'MDL-82503')] protected function can_view(): bool { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return has_capability('moodle/badges:viewbadges', $this->get_context()); } @@ -118,7 +118,7 @@ class course_badges extends system_report { */ #[\core\attribute\deprecated('course_badges::add_columns', since: '4.5', mdl: 'MDL-82503')] protected function add_columns(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $badgeissuedalias = $this->get_entity('badge_issued')->get_table_alias('badge_issued'); $this->add_columns_from_entities([ @@ -156,7 +156,7 @@ class course_badges extends system_report { */ #[\core\attribute\deprecated('course_badges::add_filters', since: '4.5', mdl: 'MDL-82503')] protected function add_filters(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->add_filters_from_entities([ 'badge:name', 'badge_issued:issued', diff --git a/course/classes/management_renderer.php b/course/classes/management_renderer.php index f77ebdf6a5c..2a3da7408d2 100644 --- a/course/classes/management_renderer.php +++ b/course/classes/management_renderer.php @@ -71,7 +71,7 @@ class core_course_management_renderer extends plugin_renderer_base { final: true, )] public function management_heading() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -1286,7 +1286,7 @@ class core_course_management_renderer extends plugin_renderer_base { final: true, )] public function course_search_form() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/course/classes/reportbuilder/local/formatters/completion.php b/course/classes/reportbuilder/local/formatters/completion.php index 786b04d05f2..f204df3d615 100644 --- a/course/classes/reportbuilder/local/formatters/completion.php +++ b/course/classes/reportbuilder/local/formatters/completion.php @@ -71,7 +71,7 @@ class completion { */ #[\core\attribute\deprecated(null, mdl: 'MDL-82467', since: '4.5')] public static function get_days(?int $value, stdClass $row): ?int { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); // Do not show anything if there is no userid. if (!$row->userid) { diff --git a/enrol/self/lib.php b/enrol/self/lib.php index 30721dcc3ce..bf9a3af31db 100644 --- a/enrol/self/lib.php +++ b/enrol/self/lib.php @@ -420,7 +420,7 @@ class enrol_self_plugin extends enrol_plugin { */ #[\core\attribute\deprecated('enrol_plugin::send_course_welcome_message_to_user', since: '4.4', mdl: 'MDL-4188')] protected function email_welcome_message($instance, $user) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $this->send_course_welcome_message_to_user( instance: $instance, userid: $user->id, @@ -1193,7 +1193,7 @@ class enrol_self_plugin extends enrol_plugin { */ #[\core\attribute\deprecated('enrol_plugin::get_welcome_message_contact', since: '4.4', mdl: 'MDL-4188')] public function get_welcome_email_contact($sendoption, $context) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return $this->get_welcome_message_contact( sendoption: $sendoption, context: $context, diff --git a/grade/renderer.php b/grade/renderer.php index 698132bf1a3..99b49c47441 100644 --- a/grade/renderer.php +++ b/grade/renderer.php @@ -58,7 +58,7 @@ class core_grades_renderer extends plugin_renderer_base { public function group_selector(object $course, ?string $groupactionbaseurl = null): ?string { global $USER; - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); if ($groupactionbaseurl !== null) { debugging( @@ -139,7 +139,7 @@ class core_grades_renderer extends plugin_renderer_base { ): stdClass { global $SESSION, $COURSE; - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); // User search. $searchvalue = optional_param('gpr_search', null, PARAM_NOTAGS); $userid = optional_param('grp_userid', null, PARAM_INT); diff --git a/grade/tests/behat/behat_grade.php b/grade/tests/behat/behat_grade.php index beb83ee4059..573a8039495 100644 --- a/grade/tests/behat/behat_grade.php +++ b/grade/tests/behat/behat_grade.php @@ -244,7 +244,7 @@ class behat_grade extends behat_base { */ #[\core\attribute\deprecated('behat_forms::i_set_the_field_to', since: '4.0', final: true)] protected function select_in_gradebook_tabs() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -307,6 +307,6 @@ class behat_grade extends behat_base { */ #[\core\attribute\deprecated('behat_forms::i_set_the_field_to', since: '4.1', final: true)] protected function select_in_gradebook_navigation_selector() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } } diff --git a/lib/classes/aws/admin_settings_aws_region.php b/lib/classes/aws/admin_settings_aws_region.php index 388a597352c..1cee3f9b29e 100644 --- a/lib/classes/aws/admin_settings_aws_region.php +++ b/lib/classes/aws/admin_settings_aws_region.php @@ -45,7 +45,7 @@ class admin_settings_aws_region extends \admin_setting_configtext { mdl: 'MDL-80962', )] public function output_html($data, $query='') { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG, $OUTPUT; $default = $this->get_defaultsetting(); diff --git a/lib/classes/aws/aws_helper.php b/lib/classes/aws/aws_helper.php index ce77bb6c5f8..e6a7853836a 100644 --- a/lib/classes/aws/aws_helper.php +++ b/lib/classes/aws/aws_helper.php @@ -42,7 +42,7 @@ class aws_helper { mdl: 'MDL-80962', )] public static function get_proxy_string(): string { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $CFG; $proxy = ''; if (empty($CFG->proxytype)) { @@ -79,7 +79,7 @@ class aws_helper { mdl: 'MDL-80962', )] public static function configure_client_proxy(AwsClient $client): AwsClient { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $client->getHandlerList()->appendBuild(self::add_proxy_when_required(), 'proxy_bypass'); return $client; } @@ -96,7 +96,7 @@ class aws_helper { mdl: 'MDL-80962', )] protected static function add_proxy_when_required(): callable { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return function (callable $fn) { return function (CommandInterface $command, ?RequestInterface $request = null) use ($fn) { if (isset($request)) { diff --git a/lib/classes/aws/client_factory.php b/lib/classes/aws/client_factory.php index 206ad4654fc..a4fdf671155 100644 --- a/lib/classes/aws/client_factory.php +++ b/lib/classes/aws/client_factory.php @@ -41,7 +41,7 @@ class client_factory { mdl: 'MDL-80962', )] public static function get_client(string $class, array $opts): AwsClient { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); // Modify the opts to add HTTP timeouts. if (empty($opts['http'])) { $opts['http'] = ['connect_timeout' => HOURSECS]; diff --git a/lib/classes/output/core_renderer.php b/lib/classes/output/core_renderer.php index a6a9467042b..06c9ffc7950 100644 --- a/lib/classes/output/core_renderer.php +++ b/lib/classes/output/core_renderer.php @@ -1399,7 +1399,7 @@ class core_renderer extends renderer_base { mdl: 'MDL-83164', )] protected function render_action_menu_link(\action_menu_link $action) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->render_action_menu__link($action); } @@ -1412,7 +1412,7 @@ class core_renderer extends renderer_base { mdl: 'MDL-83164', )] protected function render_action_menu_filler(\action_menu_filler $action) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->render_action_menu__filler($action); } @@ -1425,7 +1425,7 @@ class core_renderer extends renderer_base { mdl: 'MDL-83164', )] protected function render_action_menu_primary(\action_menu_link $action) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->render_action_menu__link_primary($action); } @@ -1438,7 +1438,7 @@ class core_renderer extends renderer_base { mdl: 'MDL-83164', )] protected function render_action_menu_secondary(\action_menu_link $action) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->render_action_menu__link_secondary($action); } diff --git a/lib/classes/output/renderer_base.php b/lib/classes/output/renderer_base.php index dc276135aaa..308a3253fe8 100644 --- a/lib/classes/output/renderer_base.php +++ b/lib/classes/output/renderer_base.php @@ -429,7 +429,7 @@ class renderer_base { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)] public function should_display_main_logo() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/classes/report_helper.php b/lib/classes/report_helper.php index 62773ac5e97..a711dbdcb12 100644 --- a/lib/classes/report_helper.php +++ b/lib/classes/report_helper.php @@ -96,7 +96,7 @@ class report_helper { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)] public static function save_selected_report() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/classes/session/manager.php b/lib/classes/session/manager.php index 308b7040e0d..dc803f2b487 100644 --- a/lib/classes/session/manager.php +++ b/lib/classes/session/manager.php @@ -896,7 +896,7 @@ class manager { since: '4.5', )] public static function kill_all_sessions(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); self::destroy_all(); } @@ -913,7 +913,7 @@ class manager { since: '4.5', )] public static function kill_session($sid): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); self::destroy($sid); } @@ -930,7 +930,7 @@ class manager { since: '4.5', )] public static function kill_sessions_for_auth_plugin(string $pluginname): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); self::destroy_by_auth_plugin($pluginname); } @@ -947,7 +947,7 @@ class manager { since: '4.5', )] public static function kill_user_sessions($userid, $keepsid = null) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); self::destroy_user_sessions($userid, $keepsid); } diff --git a/lib/classes/task/manager.php b/lib/classes/task/manager.php index 5dd7a4158b8..a020113c214 100644 --- a/lib/classes/task/manager.php +++ b/lib/classes/task/manager.php @@ -672,7 +672,7 @@ class manager { */ #[\core\attribute\deprecated('\core\task\manager::get_next_adhoc_task()', since: '4.1', mdl: 'MDL-67648', final: true)] public static function ensure_adhoc_task_qos(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/classes/task/task_base.php b/lib/classes/task/task_base.php index 8253389ef88..6c5f399e5a0 100644 --- a/lib/classes/task/task_base.php +++ b/lib/classes/task/task_base.php @@ -131,7 +131,7 @@ abstract class task_base { reason: 'Blocking tasks are no longer supported', )] public function set_blocking($blocking) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); } /** @@ -147,7 +147,7 @@ abstract class task_base { reason: 'Blocking tasks are no longer supported', )] public function is_blocking() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return false; } diff --git a/lib/classes/text.php b/lib/classes/text.php index 7e7d57d7ad3..3bc43a76c72 100644 --- a/lib/classes/text.php +++ b/lib/classes/text.php @@ -85,7 +85,7 @@ class core_text { final: true, )] public static function reset_caches(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index b55e87cf00f..faaf723f6b0 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -47,7 +47,7 @@ defined('MOODLE_INTERNAL') || die(); */ #[\core\attribute\deprecated('core_component::get_core_subsystems', since: '4.5', mdl: 'MDL-82287')] function get_core_subsystems($fullpaths = false) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $CFG; $subsystems = core_component::get_core_subsystems(); @@ -79,7 +79,7 @@ function get_core_subsystems($fullpaths = false) { */ #[\core\attribute\deprecated('core_component::get_plugin_types', since: '4.5', mdl: 'MDL-82287')] function get_plugin_types($fullpaths = true) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $CFG; $types = core_component::get_plugin_types(); @@ -112,7 +112,7 @@ function get_plugin_types($fullpaths = true) { */ #[\core\attribute\deprecated('core_component::get_plugin_list', since: '4.5', mdl: 'MDL-82287')] function get_plugin_list($plugintype) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); if ($plugintype === '') { $plugintype = 'mod'; @@ -137,7 +137,7 @@ function get_plugin_list($plugintype) { */ #[\core\attribute\deprecated('core_component::get_plugin_list_with_class', since: '4.5', mdl: 'MDL-82287')] function get_plugin_list_with_class($plugintype, $class, $file) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return core_component::get_plugin_list_with_class($plugintype, $class, $file); } @@ -151,7 +151,7 @@ function get_plugin_list_with_class($plugintype, $class, $file) { */ #[\core\attribute\deprecated('core_component::get_plugin_directory', since: '4.5', mdl: 'MDL-82287')] function get_plugin_directory($plugintype, $name) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); if ($plugintype === '') { $plugintype = 'mod'; } @@ -168,7 +168,7 @@ function get_plugin_directory($plugintype, $name) { */ #[\core\attribute\deprecated('core_component::normalize_component', since: '4.5', mdl: 'MDL-82287')] function normalize_component($component) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return core_component::normalize_component($component); } @@ -182,7 +182,7 @@ function normalize_component($component) { */ #[\core\attribute\deprecated('core_component::get_component_directory', since: '4.5', mdl: 'MDL-82287')] function get_component_directory($component) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return core_component::get_component_directory($component); } @@ -191,7 +191,7 @@ function get_component_directory($component) { */ #[\core\attribute\deprecated('\core\context::instance', since: '2.2', mdl: 'MDL-34472', final: true)] function get_context_instance() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -199,7 +199,7 @@ function get_context_instance() { */ #[\core\attribute\deprecated('Not replaced', since: '2.0', mdl: 'MDL-19756', final: true)] function can_use_rotated_text() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -207,7 +207,7 @@ function can_use_rotated_text() { */ #[\core\attribute\deprecated('\core\context\system::instance', since: '2.2', mdl: 'MDL-34472', final: true)] function get_system_context() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -218,7 +218,7 @@ function get_system_context() { */ #[\core\attribute\deprecated('OUTPUT->[l|r]arrow', since: '2.0', mdl: 'MDL-19756', final: true)] function print_arrow() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -226,7 +226,7 @@ function print_arrow() { */ #[\core\attribute\deprecated('category_action_bar tertiary navigation', since: '4.0', mdl: 'MDL-73462', final: true)] function print_course_request_buttons() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -503,7 +503,7 @@ function rc4decrypt($data) { */ #[\core\attribute\deprecated(\core\encryption::class, since: '4.5', mdl: 'MDL-81940')] function endecrypt($pwd, $data, $case) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); if ($case == 'de') { $data = urldecode($data); @@ -648,7 +648,7 @@ function question_fix_top_names() { */ #[\core\attribute\deprecated('search_generate_SQL', since: '2.9', mdl: 'MDL-48939', final: true)] function search_generate_text_SQL() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -656,7 +656,7 @@ function search_generate_text_SQL() { */ #[\core\attribute\deprecated('This method should not be used', since: '4.5', mdl: 'MDL-80275', final: true)] function disable_output_buffering(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } @@ -676,7 +676,7 @@ function disable_output_buffering(): void { */ #[\core\attribute\deprecated('This method should not be used', since: '4.5', mdl: 'MDL-82157')] function print_grade_menu($courseid, $name, $current, $includenograde=true, $return=false) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $OUTPUT; $output = ''; @@ -723,7 +723,7 @@ function print_grade_menu($courseid, $name, $current, $includenograde=true, $ret reason: 'It is no longer used', )] function reset_password_and_mail($user) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $CFG; $site = get_site(); @@ -770,7 +770,7 @@ function reset_password_and_mail($user) { final: true, )] function plagiarism_get_file_results(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -783,5 +783,5 @@ function plagiarism_get_file_results(): void { final: true, )] function plagiarism_update_status(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } diff --git a/lib/listlib.php b/lib/listlib.php index 9e9cd357b54..4bf9d451086 100644 --- a/lib/listlib.php +++ b/lib/listlib.php @@ -101,7 +101,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function __construct($type='ul', $attributes='', $editable = false, $pageurl=null, $page = 0, $pageparamname = 'page', $itemsperpage = 20) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $PAGE; $this->editable = $editable; @@ -126,7 +126,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function to_html($indent=0, $extraargs=array()) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); if (count($this->items)) { $tabs = str_repeat("\t", $indent); $first = true; @@ -171,7 +171,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function find_item($id, $suppresserror = false) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); if (isset($this->items)) { foreach ($this->items as $key => $child) { if ($child->id == $id) { @@ -202,7 +202,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function add_item($item) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->items[] = $item; } @@ -215,7 +215,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function set_parent($parent) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->parentitem = $parent; } @@ -232,7 +232,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function list_from_records($paged = false, $offset = 0) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->paged = $paged; $this->offset = $offset; $this->get_records(); @@ -296,7 +296,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function display_page_numbers() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $html = ''; $topcount = count($this->items); $this->pagecount = (integer) ceil(($topcount + $this->offset)/ QUESTION_PAGE_LENGTH ); @@ -325,7 +325,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function get_items_peers($itemid) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $itemref = $this->find_item($itemid); $peerids = $itemref->parentlist->get_child_ids(); return $peerids; @@ -339,7 +339,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function get_child_ids() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $childids = array(); foreach ($this->items as $child) { $childids[] = $child->id; @@ -357,7 +357,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function get_top_level_parent_id($item) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return 0; // Top level items have no parent. } @@ -370,7 +370,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function move_item_up_down($direction, $id) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $peers = $this->get_items_peers($id); $itemkey = array_search($id, $peers); switch ($direction) { @@ -407,7 +407,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function reorder_peers($peers) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB; foreach ($peers as $key => $peer) { $DB->set_field($this->table, "sortorder", $key, array("id"=>$peer)); @@ -423,7 +423,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function move_item_left($id) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB; $item = $this->find_item($id); @@ -452,7 +452,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function move_item_right($id) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB; $peers = $this->get_items_peers($id); @@ -484,7 +484,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function process_actions($left, $right, $moveup, $movedown) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); //should this action be processed by this list object? if (!(array_key_exists($left, $this->records) || array_key_exists($right, $this->records) || array_key_exists($moveup, $this->records) || array_key_exists($movedown, $this->records))) { return false; @@ -532,7 +532,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function item_is_first_on_page($itemid) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->page && isset($this->items[$this->firstitem]) && $itemid == $this->items[$this->firstitem]->id; } @@ -545,7 +545,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function item_is_last_on_page($itemid) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->page && isset($this->items[$this->lastitem]) && $itemid == $this->items[$this->lastitem]->id; } @@ -592,7 +592,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function __construct($item, $parent, $attributes = '', $display = true) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->item = $item; if (is_object($this->item)) { $this->id = $this->item->id; @@ -613,7 +613,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function item_html($extraargs = array()) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); if (is_string($this->item)) { $html = $this->item; } elseif (is_object($this->item)) { @@ -635,7 +635,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function to_html($indent = 0, $extraargs = array()) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); if (!$this->display) { return ''; } @@ -660,7 +660,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function set_icon_html($first, $last, $lastitem) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG; $strmoveup = get_string('moveup'); $strmovedown = get_string('movedown'); @@ -721,7 +721,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function image_icon($action, $url, $icon) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $OUTPUT; return '' . $OUTPUT->pix_icon('t/' . $icon, $action) . ' '; @@ -735,7 +735,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function image_spacer() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $OUTPUT; return $OUTPUT->spacer(); } @@ -750,7 +750,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function create_children(&$records, &$children, $thisrecordid) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); //keys where value is $thisrecordid $thischildren = moodle_array_keys_filter($children, $thisrecordid); foreach ($thischildren as $child) { @@ -770,7 +770,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function set_parent($parent) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->parentlist = $parent; } } diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 80763cdb5c1..267675de75e 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -2536,7 +2536,7 @@ class global_navigation extends navigation_node { mdl: 'MDL-82845', )] protected function load_section_activities(navigation_node $sectionnode, $sectionnumber, array $activities, $course = null) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); if (!is_object($course)) { $activity = reset($activities); $courseid = $activity->course; diff --git a/mod/assign/feedbackplugin.php b/mod/assign/feedbackplugin.php index cee9dd6c163..ab432c5dd0b 100644 --- a/mod/assign/feedbackplugin.php +++ b/mod/assign/feedbackplugin.php @@ -182,7 +182,7 @@ abstract class assign_feedback_plugin extends assign_plugin { */ #[\core\attribute\deprecated('get_grading_batch_operation_details', since: '4.5', mdl: 'MDL-80750')] public function get_grading_batch_operations() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return array_column(static::get_grading_batch_operation_details(), 'confirmationtitle', 'key'); } diff --git a/mod/assign/gradingbatchoperationsform.php b/mod/assign/gradingbatchoperationsform.php index 382e0d40020..cd705f8cd06 100644 --- a/mod/assign/gradingbatchoperationsform.php +++ b/mod/assign/gradingbatchoperationsform.php @@ -55,7 +55,7 @@ class mod_assign_grading_batch_operations_form extends moodleform { mdl: 'MDL-80750' )] public function definition() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG; $mform = $this->_form; diff --git a/mod/assign/gradingtable.php b/mod/assign/gradingtable.php index cc69aa0691a..ab44d08959d 100644 --- a/mod/assign/gradingtable.php +++ b/mod/assign/gradingtable.php @@ -881,7 +881,7 @@ class assign_grading_table extends table_sql implements renderable { reason: 'Picture column is merged with fullname column' )] public function col_picture(stdClass $row) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->output->user_picture($row); } @@ -1359,7 +1359,7 @@ class assign_grading_table extends table_sql implements renderable { public function col_userid(stdClass $row) { global $USER; - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $edit = ''; $actions = array(); diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index afa485cb574..a64b22a1a8b 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -7368,7 +7368,7 @@ class assign { mdl: 'MDL-82681', )] protected function process_save_grading_options() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/mod/data/renderer.php b/mod/data/renderer.php index 80e029c256f..d5a592df0b7 100644 --- a/mod/data/renderer.php +++ b/mod/data/renderer.php @@ -172,7 +172,7 @@ class mod_data_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.5')] public function render_fields_footer(manager $manager): string { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $cm = $manager->get_coursemodule(); $pageurl = new moodle_url('/mod/data/templates.php', ['id' => $cm->id]); diff --git a/mod/feedback/classes/output/renderer.php b/mod/feedback/classes/output/renderer.php index ab5558a179a..f7524a31ce6 100644 --- a/mod/feedback/classes/output/renderer.php +++ b/mod/feedback/classes/output/renderer.php @@ -48,7 +48,7 @@ class renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(replacement: null, since: '4.5')] public function create_template_form(int $id) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); return $this->render_from_template('mod_feedback/create_template', ['id' => $id]); } diff --git a/mod/feedback/deprecatedlib.php b/mod/feedback/deprecatedlib.php index 49dec400e6d..81c8218fca9 100644 --- a/mod/feedback/deprecatedlib.php +++ b/mod/feedback/deprecatedlib.php @@ -39,6 +39,6 @@ function feedback_get_completion_state() { #[\core\attribute\deprecated('is_role_switched', since: '4.5', mdl: 'MDL-72424')] function feedback_check_is_switchrole(): bool { global $USER; - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return isset($USER->switchrole) && is_array($USER->switchrole) && count($USER->switchrole) > 0; } diff --git a/mod/forum/deprecatedlib.php b/mod/forum/deprecatedlib.php index 97b73b51ab1..5e8d46c62b3 100644 --- a/mod/forum/deprecatedlib.php +++ b/mod/forum/deprecatedlib.php @@ -427,7 +427,7 @@ function forum_get_completion_state() { final: true )] function forum_update_subscriptions_button(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** diff --git a/mod/quiz/deprecatedlib.php b/mod/quiz/deprecatedlib.php index 97de982885f..bc1e93fd4f9 100644 --- a/mod/quiz/deprecatedlib.php +++ b/mod/quiz/deprecatedlib.php @@ -324,7 +324,7 @@ function quiz_calculate_best_attempt($quiz, $attempts) { */ #[\core\attribute\deprecated('override_manager::delete_override_by_id', since: '4.4')] function quiz_delete_override($quiz, $overrideid, $log = true) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $quizsettings = quiz_settings::create($quiz->id); $quizsettings->get_override_manager()->delete_overrides_by_id( ids: [$overrideid], @@ -344,7 +344,7 @@ function quiz_delete_override($quiz, $overrideid, $log = true) { */ #[\core\attribute\deprecated('override_manager::delete_all_overrides', since: '4.4')] function quiz_delete_all_overrides($quiz, $log = true) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $quizsettings = quiz_settings::create($quiz->id); $quizsettings->get_override_manager()->delete_all_overrides(shouldlog: $log); } diff --git a/question/bank/managecategories/classes/helper.php b/question/bank/managecategories/classes/helper.php index 365a56accab..a742f5a7d20 100644 --- a/question/bank/managecategories/classes/helper.php +++ b/question/bank/managecategories/classes/helper.php @@ -96,7 +96,7 @@ class helper { mdl: 'MDL-72397' )] public static function question_is_only_child_of_top_category_in_context(int $categoryid): bool { - \core\deprecation::emit_deprecation_if_present([__CLASS__, __FUNCTION__]); + \core\deprecation::emit_deprecation([__CLASS__, __FUNCTION__]); $manager = new category_manager(); return $manager->is_only_child_of_top_category_in_context($categoryid); } @@ -117,7 +117,7 @@ class helper { mdl: 'MDL-72397' )] public static function question_is_top_category(int $categoryid): bool { - \core\deprecation::emit_deprecation_if_present([__CLASS__, __FUNCTION__]); + \core\deprecation::emit_deprecation([__CLASS__, __FUNCTION__]); $manager = new category_manager(); return $manager->is_top_category($categoryid); } @@ -138,7 +138,7 @@ class helper { mdl: 'MDL-72397' )] public static function question_can_delete_cat(int $todelete): void { - \core\deprecation::emit_deprecation_if_present([__CLASS__, __FUNCTION__]); + \core\deprecation::emit_deprecation([__CLASS__, __FUNCTION__]); $manager = new category_manager(); $manager->require_can_delete_category($todelete); } diff --git a/question/bank/managecategories/classes/question_category_list.php b/question/bank/managecategories/classes/question_category_list.php index ced825233b7..74e0d5463fc 100644 --- a/question/bank/managecategories/classes/question_category_list.php +++ b/question/bank/managecategories/classes/question_category_list.php @@ -89,7 +89,7 @@ class question_category_list extends moodle_list { public function __construct($type='ul', $attributes='', $editable = false, $pageurl=null, $page = 0, $pageparamname = 'page', $itemsperpage = DEFAULT_QUESTIONS_PER_PAGE, $context = null) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); parent::__construct('ul', '', $editable, $pageurl, $page, 'cpage', $itemsperpage); $this->context = $context; } @@ -101,7 +101,7 @@ class question_category_list extends moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804 */ public function get_records(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->records = helper::get_categories_for_contexts($this->context->id, $this->sortby); } @@ -115,7 +115,7 @@ class question_category_list extends moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804 */ public function get_top_level_parent_id($item): int { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); // Put the item at the highest level it can go. $topcategory = question_get_top_category($item->item->contextid, true); return $topcategory->id; @@ -133,7 +133,7 @@ class question_category_list extends moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804 */ public function process_actions($left, $right, $moveup, $movedown): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $category = new stdClass(); if (!empty($left)) { // Moved Left (In to another category). diff --git a/question/bank/managecategories/classes/question_category_list_item.php b/question/bank/managecategories/classes/question_category_list_item.php index 1f288a271a2..bc1af0615e1 100644 --- a/question/bank/managecategories/classes/question_category_list_item.php +++ b/question/bank/managecategories/classes/question_category_list_item.php @@ -39,7 +39,7 @@ class question_category_list_item extends \list_item { * @deprecated MDL-72397 Since Moodle 4.5 */ public function set_icon_html($first, $last, $lastitem): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG; $category = $this->item; $url = new moodle_url('/question/bank/managecategories/category.php', @@ -82,7 +82,7 @@ class question_category_list_item extends \list_item { * @deprecated MDL-72397 Since Moodle 4.5 */ public function item_html($extraargs = []): string { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $PAGE, $OUTPUT; $str = $extraargs['str']; $category = $this->item; diff --git a/question/bank/managecategories/classes/question_category_object.php b/question/bank/managecategories/classes/question_category_object.php index d2c4a1bc7bd..8aa0bb45f60 100644 --- a/question/bank/managecategories/classes/question_category_object.php +++ b/question/bank/managecategories/classes/question_category_object.php @@ -92,7 +92,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function __construct($page, $pageurl, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->tab = str_repeat(' ', $this->tabsize); $this->str = new stdClass(); @@ -139,7 +139,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function initialize($page, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $lastlist = null; foreach ($contexts as $context) { $this->editlists[$context->id] = @@ -176,7 +176,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function display_user_interface(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); // Interface for editing existing categories. $this->output_edit_lists(); } @@ -194,7 +194,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function output_new_table(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->catform->display(); } @@ -213,7 +213,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function output_edit_lists(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $OUTPUT; echo $OUTPUT->heading_with_help(get_string('questioncategories', 'question'), 'editcategories', 'question'); @@ -247,7 +247,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function get_course_ids(array $categories): array { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $courseids = []; foreach ($categories as $key => $cat) { $courseids[$key] = $cat->course; @@ -272,7 +272,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function edit_single_category(int $categoryid): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); // Interface for adding a new category. global $DB; @@ -311,7 +311,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function set_viable_parents(array &$parentstrings, object $category): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); unset($parentstrings[$category->id]); if (isset($category->children)) { foreach ($category->children as $child) { @@ -336,7 +336,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function get_question_categories(?int $parent = null, string $sort = "sortorder ASC"): array { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $COURSE, $DB; if (is_null($parent)) { $categories = $DB->get_records('question_categories', ['course' => $COURSE->id], $sort); @@ -361,7 +361,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function delete_category(int $categoryid): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG, $DB; helper::question_can_delete_cat($categoryid); if (!$category = $DB->get_record("question_categories", ["id" => $categoryid])) { // Security. @@ -395,7 +395,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function move_questions_and_delete_category(int $oldcat, int $newcat): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); helper::question_can_delete_cat($oldcat); $this->move_questions($oldcat, $newcat); $this->delete_category($oldcat); @@ -411,7 +411,7 @@ class question_category_object { * @deprecated No longer used by internal code and not recommended since Moodle 4.2 MDL-77299. */ public function display_move_form($questionsincategory, $category): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); debugging( 'display_move_form() is deprecated and no longer used by internal code.', DEBUG_DEVELOPER @@ -440,7 +440,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function move_questions(int $oldcat, int $newcat): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $questionids = $this->get_real_question_ids_in_category($oldcat); question_move_questions_to_category($questionids, $newcat); } @@ -470,7 +470,7 @@ class question_category_object { )] public function add_category($newparent, $newcategory, $newinfo, $return = false, $newinfoformat = FORMAT_HTML, $idnumber = null): int { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB; if (empty($newcategory)) { throw new moodle_exception('categorynamecantbeblank', 'question'); @@ -545,7 +545,7 @@ class question_category_object { )] public function update_category($updateid, $newparent, $newname, $newinfo, $newinfoformat = FORMAT_HTML, $idnumber = null, $redirect = true): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG, $DB; if (empty($newname)) { throw new moodle_exception('categorynamecantbeblank', 'question'); @@ -640,7 +640,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function get_real_question_ids_in_category(int $categoryid): array { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB; $sql = "SELECT q.id diff --git a/report/eventlist/classes/list_generator.php b/report/eventlist/classes/list_generator.php index fa7b6319bc9..9e367f9273c 100644 --- a/report/eventlist/classes/list_generator.php +++ b/report/eventlist/classes/list_generator.php @@ -77,7 +77,7 @@ class report_eventlist_list_generator { */ #[\core\attribute\deprecated('::get_all_events_list', since: '4.0', mdl: 'MDL-72498', final: true)] public static function get_core_events_list() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -135,7 +135,7 @@ class report_eventlist_list_generator { */ #[\core\attribute\deprecated('::get_all_events_list', since: '4.0', mdl: 'MDL-72498', final: true)] public static function get_non_core_event_list() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/reportbuilder/classes/local/helpers/audience.php b/reportbuilder/classes/local/helpers/audience.php index 738d429cccb..0c57b660aee 100644 --- a/reportbuilder/classes/local/helpers/audience.php +++ b/reportbuilder/classes/local/helpers/audience.php @@ -284,6 +284,6 @@ class audience { */ #[\core\attribute\deprecated('custom_report_audience_cards_exporter', since: '4.1', final: true)] public static function get_all_audiences_menu_types() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } } diff --git a/reportbuilder/classes/local/helpers/report.php b/reportbuilder/classes/local/helpers/report.php index a8d87559f2b..c14c9c71893 100644 --- a/reportbuilder/classes/local/helpers/report.php +++ b/reportbuilder/classes/local/helpers/report.php @@ -420,7 +420,7 @@ class report { */ #[\core\attribute\deprecated('custom_report_column_cards_exporter', since: '4.1', final: true)] public static function get_available_columns() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/repository/onedrive/lib.php b/repository/onedrive/lib.php index baf5cf41574..f211cb50073 100644 --- a/repository/onedrive/lib.php +++ b/repository/onedrive/lib.php @@ -1020,7 +1020,7 @@ class repository_onedrive extends repository { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)] public static function can_import_skydrive_files() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -1028,7 +1028,7 @@ class repository_onedrive extends repository { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)] public static function import_skydrive_files() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/user/classes/table/participants_search.php b/user/classes/table/participants_search.php index cd1b7b6f835..7f851c72f7b 100644 --- a/user/classes/table/participants_search.php +++ b/user/classes/table/participants_search.php @@ -140,7 +140,7 @@ class participants_search { )] public function get_total_participants_count(string $additionalwhere = '', array $additionalparams = []): int { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB;