From: vyshane Date: Tue, 22 Aug 2006 02:24:45 +0000 (+0000) Subject: Need to pass the module id and not the object to add_course_module X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ac195b6fa60bacfc523f10480f5e4ebf2b018074;p=moodle.git Need to pass the module id and not the object to add_course_module --- diff --git a/mod/forum/db/mysql.php b/mod/forum/db/mysql.php index 384f64f3da..97db13f99b 100644 --- a/mod/forum/db/mysql.php +++ b/mod/forum/db/mysql.php @@ -231,7 +231,7 @@ function forum_upgrade($oldversion) { if ($oldversion < 2006081800) { // Upgrades for new roles and capabilities support. - $forummodid = get_record('modules', 'name', 'forum'); + $forummod = get_record('modules', 'name', 'forum'); if ($forums = get_records('forum')) { @@ -258,7 +258,7 @@ function forum_upgrade($oldversion) { // section 0 in the course. $mod = new object; $mod->course = $forum->course; - $mod->module = $forummodid; + $mod->module = $forummod->id; $mod->instance = $forum->id; $mod->section = 0; $mod->visible = 0;