Skip to content

Commit 551fec0

Browse files
committed
cr - change this to self where appropriate
1 parent b8a5865 commit 551fec0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

block_my_feedback.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function get_content(): stdClass {
6464

6565
if (self::is_teacher()) {
6666
// Teacher content.
67-
$template->mods = $this->fetch_marking($USER);
67+
$template->mods = self::fetch_marking($USER);
6868
} else {
6969
// Student content.
7070
$template->mods = $this->fetch_feedback($USER);
@@ -102,7 +102,7 @@ public static function is_teacher(): bool {
102102
*
103103
* @param stdClass $user
104104
*/
105-
public function fetch_marking(stdClass $user): ?array {
105+
public static function fetch_marking(stdClass $user): ?array {
106106
// User courses.
107107
$courses = enrol_get_all_users_courses($user->id, false, ['enddate']);
108108
// Marking.
@@ -142,7 +142,7 @@ public function fetch_marking(stdClass $user): ?array {
142142
$assess->cmid = $cmid;
143143
$assess->modname = $mod->modname;
144144
// Get due date and require marking.
145-
$assess = $this->get_mod_data($mod, $assess);
145+
$assess = self::get_mod_data($mod, $assess);
146146

147147
// Check mod has require marking (only set when there is a due date).
148148
if (isset($assess->requiremarking)) {
@@ -176,7 +176,7 @@ public function fetch_marking(stdClass $user): ?array {
176176
* @param cm_info $mod
177177
* @param stdClass $assess
178178
*/
179-
public function get_mod_data($mod, $assess): ?stdClass {
179+
public static function get_mod_data($mod, $assess): ?stdClass {
180180
global $CFG;
181181
// Mods have different fields for due date, and require marking.
182182
switch ($mod->modname) {

0 commit comments

Comments
 (0)