MDL-26312 Workshop: fixed upgrade of module instances from 1.9 to 2.0
commitd0fb170520ea16bb5c745041ba2352e5511aa140
authorDavid Mudrak <david@moodle.com>
Tue, 8 Feb 2011 15:37:54 +0000 (8 16:37 +0100)
committerDavid Mudrak <david@moodle.com>
Fri, 11 Feb 2011 06:43:04 +0000 (11 07:43 +0100)
treebb73aaa784c9189edc87cacd81f6eea61d7bd253
parentd911c72bf9e300a5ccd95d5c434daa04c056ae6e
MDL-26312 Workshop: fixed upgrade of module instances from 1.9 to 2.0

The patch changes workshop_upgrade_module_instances() so that it
processes old workshop records ordered by their id and it keeps the
instances id by using import_record() instead of insert_record().
Thanks to this, there is no mapping of workshop ids needed so the
function workshop_upgrade_workshop_id_mappings() is dropped and all
callers use plain workshop record.
mod/workshop/db/upgradelib.php
mod/workshop/form/accumulative/db/upgradelib.php
mod/workshop/form/comments/db/upgradelib.php
mod/workshop/form/numerrors/db/upgradelib.php
mod/workshop/form/rubric/db/upgradelib.php