obj:idnumber undefined notice MDL-22456 fixed and committed into HEAD.

This commit is contained in:
aparup 2010-05-28 01:53:09 +00:00
parent 7a41d66003
commit 66b250fd9d
3 changed files with 9 additions and 0 deletions

View File

@ -1070,6 +1070,7 @@ function get_array_of_activities($courseid) {
$mod[$seq]->cm = $rawmods[$seq]->id;
$mod[$seq]->mod = $rawmods[$seq]->modname;
$mod[$seq]->section = $section->section;
$mod[$seq]->idnumber = $rawmods[$seq]->idnumber;
$mod[$seq]->visible = $rawmods[$seq]->visible;
$mod[$seq]->groupmode = $rawmods[$seq]->groupmode;
$mod[$seq]->groupingid = $rawmods[$seq]->groupingid;

View File

@ -4156,6 +4156,13 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
/// Main savepoint reached
upgrade_main_savepoint($result, 2010052700);
}
if ($result && $oldversion < 2010052600) {
/// Changes to modinfo mean we need to rebuild course cache
require_once($CFG->dirroot . '/course/lib.php');
rebuild_course_cache(0, true);
upgrade_main_savepoint($result, 2010052600);
}
return $result;
}

View File

@ -2880,6 +2880,7 @@ function &get_fast_modinfo(&$course, $userid=0) {
$cm->instance = $mod->id;
$cm->course = $course->id;
$cm->modname = $mod->mod;
$cm->idnumber = $mod->idnumber;
$cm->name = $mod->name;
$cm->visible = $mod->visible;
$cm->sectionnum = $mod->section;