@@ -38,7 +38,7 @@ public function init() {
38
38
39
39
if (!isset ($ USER ->firstname )) {
40
40
$ this ->title = get_string ('pluginname ' , 'block_my_feedback ' );
41
- } else if ($ this -> is_teacher ()) {
41
+ } else if (self :: is_teacher ()) {
42
42
$ this ->title = get_string ('markingfor ' , 'block_my_feedback ' ).' ' .$ USER ->firstname ;
43
43
} else {
44
44
$ this ->title = get_string ('feedbackfor ' , 'block_my_feedback ' ).' ' .$ USER ->firstname ;
@@ -62,7 +62,7 @@ public function get_content(): stdClass {
62
62
63
63
$ template = new stdClass ();
64
64
65
- if ($ this -> is_teacher ()) {
65
+ if (self :: is_teacher ()) {
66
66
// Teacher content.
67
67
$ template ->mods = $ this ->fetch_marking ($ USER );
68
68
} else {
@@ -183,7 +183,7 @@ public function get_mod_data($mod, $assess): ?stdClass {
183
183
case 'assign ' :
184
184
185
185
// Check mod due date is relevant.
186
- $ duedate = $ this -> duedate_in_range ($ mod ->customdata ['duedate ' ]);
186
+ $ duedate = self :: duedate_in_range ($ mod ->customdata ['duedate ' ]);
187
187
if (!$ duedate ) {
188
188
return null ;
189
189
}
@@ -221,7 +221,7 @@ public function get_mod_data($mod, $assess): ?stdClass {
221
221
*
222
222
* @param stdClass $course
223
223
*/
224
- public function is_course_current (stdClass $ course ): bool {
224
+ public static function is_course_current (stdClass $ course ): bool {
225
225
// Start date.
226
226
if ($ course ->startdate > time ()) {
227
227
return false ; // Before the start date.
@@ -246,7 +246,7 @@ public function is_course_current(stdClass $course): bool {
246
246
*
247
247
* @param int $duedate
248
248
*/
249
- public function duedate_in_range (int $ duedate ): ?int {
249
+ public static function duedate_in_range (int $ duedate ): ?int {
250
250
// Only show dates within UCL limits for marking.
251
251
$ startdate = strtotime ('-2 month ' ); // Longer time to try retain overdue marking at the top.
252
252
$ cutoffdate = strtotime ('+1 month ' );
0 commit comments