MDL-45537 mod_assign: Requiring locallib for class assign

This commit is contained in:
Frederic Massart 2014-05-15 15:52:48 +08:00 committed by Marina Glancy
parent 1de6c62dc7
commit 2507b7e060

View File

@ -918,6 +918,7 @@ function assign_grade_item_update($assign, $grades=null) {
if (isset($assign->gradefeedbackenabled)) {
$gradefeedbackenabled = $assign->gradefeedbackenabled;
} else if ($assign->grade == 0) { // Grade feedback is needed only when grade == 0.
require_once($CFG->dirroot . '/mod/assign/locallib.php');
$mod = get_coursemodule_from_instance('assign', $assign->id, $assign->courseid);
$cm = context_module::instance($mod->id);
$assignment = new assign($cm, null, null);