MDL-45365 Courselib unit tests: cmid -> instanceid confusion

Yet again an instanceid is being passed instead of a cmid.
This commit is contained in:
Damyon Wiese 2014-05-01 14:00:40 +08:00
parent 254402dbbe
commit 6a20bfa06d

View File

@ -144,7 +144,8 @@ class core_course_courselib_testcase extends advanced_testcase {
// The goal not being to fully test assign_add_instance() we'll stop here for the assign tests - to avoid too many DB queries.
// Advanced grading.
$contextmodule = context_module::instance($dbmodinstance->id);
$cm = get_coursemodule_from_instance('assign', $dbmodinstance->id);
$contextmodule = context_module::instance($cm->id);
$advancedgradingmethod = $DB->get_record('grading_areas',
array('contextid' => $contextmodule->id,
'activemethod' => $moduleinfo->advancedgradingmethod_submissions));