mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
MDL-32909: assign_user_get_grades does not need to lookup context and was doing it wrong
cmidnumber is not the same as coursemodule->id
This commit is contained in:
parent
71d7bc34a8
commit
b11808c7d6
@ -754,8 +754,8 @@ function assign_get_user_grades($assign, $userid=0) {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/mod/assign/locallib.php');
|
||||
|
||||
$context = context_module::instance($assign->cmidnumber);
|
||||
$assignment = new assign($context, null, null);
|
||||
$assignment = new assign(null, null, null);
|
||||
$assignment->set_instance($assign);
|
||||
return $assignment->get_user_grades_for_gradebook($userid);
|
||||
}
|
||||
|
||||
|
@ -560,7 +560,7 @@ class assign {
|
||||
if ($this->adminconfig) {
|
||||
return $this->adminconfig;
|
||||
}
|
||||
$this->adminconfig = get_config('mod_assign');
|
||||
$this->adminconfig = get_config('assign');
|
||||
return $this->adminconfig;
|
||||
}
|
||||
|
||||
@ -2865,7 +2865,8 @@ class assign {
|
||||
$grades = array();
|
||||
$assignmentid = $this->get_instance()->id;
|
||||
|
||||
$gradebookpluginname = $CFG->assign_feedback_plugin_for_gradebook;
|
||||
$adminconfig = $this->get_admin_config();
|
||||
$gradebookpluginname = $adminconfig->feedback_plugin_for_gradebook;
|
||||
$gradebookplugin = null;
|
||||
|
||||
// find the gradebook plugin
|
||||
|
Loading…
x
Reference in New Issue
Block a user