From 551fec063b9d664f7bc4af85a8adaa79b296417e Mon Sep 17 00:00:00 2001 From: Stuart Lamour Date: Fri, 6 Dec 2024 11:56:44 +0000 Subject: [PATCH] cr - change this to self where appropriate --- block_my_feedback.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block_my_feedback.php b/block_my_feedback.php index c821ae8..053e905 100644 --- a/block_my_feedback.php +++ b/block_my_feedback.php @@ -64,7 +64,7 @@ public function get_content(): stdClass { if (self::is_teacher()) { // Teacher content. - $template->mods = $this->fetch_marking($USER); + $template->mods = self::fetch_marking($USER); } else { // Student content. $template->mods = $this->fetch_feedback($USER); @@ -102,7 +102,7 @@ public static function is_teacher(): bool { * * @param stdClass $user */ - public function fetch_marking(stdClass $user): ?array { + public static function fetch_marking(stdClass $user): ?array { // User courses. $courses = enrol_get_all_users_courses($user->id, false, ['enddate']); // Marking. @@ -142,7 +142,7 @@ public function fetch_marking(stdClass $user): ?array { $assess->cmid = $cmid; $assess->modname = $mod->modname; // Get due date and require marking. - $assess = $this->get_mod_data($mod, $assess); + $assess = self::get_mod_data($mod, $assess); // Check mod has require marking (only set when there is a due date). if (isset($assess->requiremarking)) { @@ -176,7 +176,7 @@ public function fetch_marking(stdClass $user): ?array { * @param cm_info $mod * @param stdClass $assess */ - public function get_mod_data($mod, $assess): ?stdClass { + public static function get_mod_data($mod, $assess): ?stdClass { global $CFG; // Mods have different fields for due date, and require marking. switch ($mod->modname) {