@@ -64,7 +64,7 @@ public function get_content(): stdClass {
64
64
65
65
if (self ::is_teacher ()) {
66
66
// Teacher content.
67
- $ template ->mods = $ this -> fetch_marking ($ USER );
67
+ $ template ->mods = self :: fetch_marking ($ USER );
68
68
} else {
69
69
// Student content.
70
70
$ template ->mods = $ this ->fetch_feedback ($ USER );
@@ -102,7 +102,7 @@ public static function is_teacher(): bool {
102
102
*
103
103
* @param stdClass $user
104
104
*/
105
- public function fetch_marking (stdClass $ user ): ?array {
105
+ public static function fetch_marking (stdClass $ user ): ?array {
106
106
// User courses.
107
107
$ courses = enrol_get_all_users_courses ($ user ->id , false , ['enddate ' ]);
108
108
// Marking.
@@ -142,7 +142,7 @@ public function fetch_marking(stdClass $user): ?array {
142
142
$ assess ->cmid = $ cmid ;
143
143
$ assess ->modname = $ mod ->modname ;
144
144
// Get due date and require marking.
145
- $ assess = $ this -> get_mod_data ($ mod , $ assess );
145
+ $ assess = self :: get_mod_data ($ mod , $ assess );
146
146
147
147
// Check mod has require marking (only set when there is a due date).
148
148
if (isset ($ assess ->requiremarking )) {
@@ -176,7 +176,7 @@ public function fetch_marking(stdClass $user): ?array {
176
176
* @param cm_info $mod
177
177
* @param stdClass $assess
178
178
*/
179
- public function get_mod_data ($ mod , $ assess ): ?stdClass {
179
+ public static function get_mod_data ($ mod , $ assess ): ?stdClass {
180
180
global $ CFG ;
181
181
// Mods have different fields for due date, and require marking.
182
182
switch ($ mod ->modname ) {
0 commit comments