|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Namespaces | |
| namespace | mod |
Local Library of functions for module scorm. | |
Functions | |
| xmldb_workshop_upgrade ($oldversion) | |
| xmldb_workshop_upgrade | ( | $ | oldversion | ) |
Performs upgrade of the database structure and data
Workshop supports upgrades from version 1.9.0 and higher only. During 1.9 > 2.0 upgrade, there are significant database changes.
| int | $oldversion | the version we are upgrading from |
the following blocks contain all the db/upgrade.php logic from MOODLE_19_STABLE branch so that it does not matter if we are upgrading from 1.9.0, 1.9.3 or 1.9.whatever
Upgrading from workshop 1.9.x - big things going to happen now... The migration procedure is divided into smaller chunks using incremental versions 2009102900, 2009102901, 2009102902 etc. The day zero of the new workshop 2.0 is version 2009103000 since when the upgrade code is maintained.
Migration from 1.9 - step 1 - rename old tables
Migration from 1.9 - step 2 - create new workshop core tables
Migration from 1.9 - step 3 - migrate workshop instances
Migration from 1.9 - step 4 - migrate submissions
Migration from 1.9 - step 5 - migrate submission attachment to new file storage
Migration from 1.9 - step 6 - migrate assessments
End of migration from 1.9
Add 'published' field into workshop_submissions
Add 'evaluation' field into workshop
Set the value of the new 'evaluation' field to 'best', there is no alternative at the moment
Add 'late' field into workshop_submissions
Create legacy _old tables to sync install.xml and real database
In most cases these tables already exists because they were created during 1.9->2.0 migration This step is just for those site that were installed from vanilla 2.0 and these _old tables were not created. Note that these tables will be dropped again later in 2.x
Check the course_module integrity - see MDL-26312 for details
Because of a bug in Workshop upgrade code, multiple workshop course_modules can potentially point to a single workshop instance. The chance is pretty low as in most cases, the upgrade failed. But under certain circumstances, workshop could be upgraded with this data integrity issue. We want to detect it now and let the admin know.
Fix the eventually corrupted workshop table id sequence
Definition at line 36 of file upgrade.php.
