Skip to content

Commit

Permalink
cr - change this to self where appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartlamour committed Dec 6, 2024
1 parent b8a5865 commit 551fec0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions block_my_feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 551fec0

Please sign in to comment.