mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
MDL-35389: Fix an error when changing locked state of a assignment is changed
This commit is contained in:
parent
a3ab18c735
commit
79e7dfcc76
@ -782,7 +782,9 @@ function assign_get_user_grades($assign, $userid=0) {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/mod/assign/locallib.php');
|
||||
|
||||
$assignment = new assign(null, null, null);
|
||||
$cm = get_coursemodule_from_instance('assign', $assign->id, 0, false, MUST_EXIST);
|
||||
$context = context_module::instance($cm->id);
|
||||
$assignment = new assign($context, null, null);
|
||||
$assignment->set_instance($assign);
|
||||
return $assignment->get_user_grades_for_gradebook($userid);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user