Skip to content

Commit

Permalink
updated use of feedback_tracker::count_missing_grades()
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Opitz committed Jan 21, 2025
1 parent ae79afc commit e826bc0
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions block_my_feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,8 @@ public static function add_mod_data(cm_info $mod, stdClass $assess): bool {
return false;
}

// Get the grade item associated with the module.
require_once($CFG->libdir . '/gradelib.php');
$gradeitem = grade_item::fetch([
'itemtype' => 'mod',
'itemmodule' => $mod->modname,
'iteminstance' => $mod->instance,
'itemnumber' => 0,
'courseid' => $mod->course,
]);

// Return null if no duedate or no marking.
// TODO - seems off to include this here, rather than in count_missing_grades..
require_once($CFG->dirroot.'/mod/assign/locallib.php');
if (!$assess->requiremarking = feedback_tracker::count_missing_grades($gradeitem, $mod)) {
if (!$assess->requiremarking = feedback_tracker::count_missing_grades($mod)) {
return false;
}

Expand Down

0 comments on commit e826bc0

Please sign in to comment.