Skip to content

Commit e826bc0

Browse files
author
Matthias Opitz
committed
updated use of feedback_tracker::count_missing_grades()
1 parent ae79afc commit e826bc0

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

block_my_feedback.php

+1-13
Original file line numberDiff line numberDiff line change
@@ -209,20 +209,8 @@ public static function add_mod_data(cm_info $mod, stdClass $assess): bool {
209209
return false;
210210
}
211211

212-
// Get the grade item associated with the module.
213-
require_once($CFG->libdir . '/gradelib.php');
214-
$gradeitem = grade_item::fetch([
215-
'itemtype' => 'mod',
216-
'itemmodule' => $mod->modname,
217-
'iteminstance' => $mod->instance,
218-
'itemnumber' => 0,
219-
'courseid' => $mod->course,
220-
]);
221-
222212
// Return null if no duedate or no marking.
223-
// TODO - seems off to include this here, rather than in count_missing_grades..
224-
require_once($CFG->dirroot.'/mod/assign/locallib.php');
225-
if (!$assess->requiremarking = feedback_tracker::count_missing_grades($gradeitem, $mod)) {
213+
if (!$assess->requiremarking = feedback_tracker::count_missing_grades($mod)) {
226214
return false;
227215
}
228216

0 commit comments

Comments
 (0)