This file contains the upgrade code to upgrade from mod_assignment to mod_assign
Copyright: | 2012 NetSpot {@link http://www.netspot.com.au} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 416 lines (20 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
assign_upgrade_manager:: (2 methods):
upgrade_assignment()
duplicate_course_module()
Class: assign_upgrade_manager - X-Ref
Class to manage upgrades from mod_assignment to mod_assignupgrade_assignment($oldassignmentid, & $log) X-Ref |
This function converts all of the base settings for an instance of the old assignment to the new format. Then it calls each of the plugins to see if they can help upgrade this assignment. param: int $oldassignmentid (don't rely on the old assignment type even being installed) param: string $log This string gets appended to during the conversion process return: bool true or false |
duplicate_course_module(stdClass $cm, $moduleid, $newinstanceid) X-Ref |
Create a duplicate course module record so we can create the upgraded assign module alongside the old assignment module. param: stdClass $cm The old course module record param: int $moduleid The id of the new assign module param: int $newinstanceid The id of the new instance of the assign module return: mixed stdClass|bool The new course module record or FALSE |