mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-31731 Advanced Grading: Marking Guide: fix bug with check to display warning about discrepency between module maxgrade and number of marks in Marking Guide.
This commit is contained in:
parent
e529ec8c09
commit
b4b1d49044
@ -331,7 +331,6 @@ class gradingform_guide_controller extends gradingform_controller {
|
||||
}
|
||||
}
|
||||
$comments->close();
|
||||
|
||||
if (empty($this->moduleinstance)) { // Only set if empty.
|
||||
$modulename = $this->get_component();
|
||||
$context = $this->get_context();
|
||||
@ -339,7 +338,8 @@ class gradingform_guide_controller extends gradingform_controller {
|
||||
$dbman = $DB->get_manager();
|
||||
$modulename = substr($modulename, 4);
|
||||
if ($dbman->table_exists($modulename)) {
|
||||
$this->moduleinstance = $DB->get_record($modulename, array('id' => $context->instanceid));
|
||||
$cm = get_coursemodule_from_id('assignment', $context->instanceid);
|
||||
$this->moduleinstance = $DB->get_record($modulename, array("id"=>$cm->instance));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user