From c732fe8f799d06fa25f8ce9ff72ec2e8a0f65e67 Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Mon, 10 Feb 2025 14:44:18 +0100 Subject: [PATCH] MDL-79086 core: Final removal of share_activity Signed-off-by: Daniel Ziegenberg --- .upgradenotes/MDL-79086-2025021013431846.yml | 5 +++++ lib/classes/moodlenet/activity_sender.php | 13 ++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 .upgradenotes/MDL-79086-2025021013431846.yml diff --git a/.upgradenotes/MDL-79086-2025021013431846.yml b/.upgradenotes/MDL-79086-2025021013431846.yml new file mode 100644 index 00000000000..4b166644dde --- /dev/null +++ b/.upgradenotes/MDL-79086-2025021013431846.yml @@ -0,0 +1,5 @@ +issueNumber: MDL-79086 +notes: + core: + - message: 'Final removal of `share_activity()` in `core\moodlenet\activity_sender`, please use `share_resource()` instead.' + type: removed diff --git a/lib/classes/moodlenet/activity_sender.php b/lib/classes/moodlenet/activity_sender.php index 7d64ce4bc35..21ec9df54b7 100644 --- a/lib/classes/moodlenet/activity_sender.php +++ b/lib/classes/moodlenet/activity_sender.php @@ -58,16 +58,11 @@ class activity_sender extends resource_sender { } /** - * Share an activity/resource to MoodleNet. - * - * @return array The HTTP response code from MoodleNet and the MoodleNet draft resource URL (URL empty string on fail). - * Format: ['responsecode' => 201, 'drafturl' => 'https://draft.mnurl/here'] - * @deprecated since Moodle 4.3 - * @todo Final deprecation MDL-79086 + * @deprecated since Moodle 4.3 MDL-75318 */ - public function share_activity(): array { - debugging('Method share_activity is deprecated, use share_resource instead.', DEBUG_DEVELOPER); - return $this->share_resource(); + #[\core\attribute\deprecated('share_resource()', since: '4.3', mdl: 'MDL-75318', final: true)] + public function share_activity() { + \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); } /**