diff --git a/lib/db/install.xml b/lib/db/install.xml index e2e4b58d832..8095faefeb2 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -79,8 +79,6 @@ - - diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index cb3f716e0a9..1fad3d41432 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2401,5 +2401,28 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2013091000.02); } + if ($oldversion < 2013091000.03) { + + // Define field modinfo to be dropped from course. + $table = new xmldb_table('course'); + $field = new xmldb_field('modinfo'); + + // Conditionally launch drop field modinfo. + if ($dbman->field_exists($table, $field)) { + $dbman->drop_field($table, $field); + } + + // Define field sectioncache to be dropped from course. + $field = new xmldb_field('sectioncache'); + + // Conditionally launch drop field sectioncache. + if ($dbman->field_exists($table, $field)) { + $dbman->drop_field($table, $field); + } + + // Main savepoint reached. + upgrade_main_savepoint(true, 2013091000.03); + } + return true; } diff --git a/lib/setuplib.php b/lib/setuplib.php index 5da953abe64..492eb960f54 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -1174,7 +1174,7 @@ function disable_output_buffering() { */ function redirect_if_major_upgrade_required() { global $CFG; - $lastmajordbchanges = 2013090900.00; + $lastmajordbchanges = 2013091000.03; if (empty($CFG->version) or (float)$CFG->version < $lastmajordbchanges or during_initial_install() or !empty($CFG->adminsetuppending)) { try { diff --git a/lib/upgrade.txt b/lib/upgrade.txt index 6ecf4d1bcef..550f27120ea 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -27,6 +27,11 @@ information provided here is intended especially for developers. function that returns an approximate number of entries in the zip faster than the count() function. * Class cm_info no longer extends stdClass. All properties are read-only and calculated on first request only. * Class course_modinfo no longer extends stdClass. All properties are read-only. +* Database fields modinfo and sectioncache in table course are removed. Application cache core/coursemodinfo + is used instead. Course cache is still reset, rebuilt and retrieved using function rebuild_course_cache() and + get_fast_modinfo(). Purging all caches and every core upgrade purges course modinfo cache as well. + If function get_fast_modinfo() is called for multiple courses make sure to include field cacherev in course + object. DEPRECATIONS: Various previously deprecated functions have now been altered to throw DEBUG_DEVELOPER debugging notices @@ -98,6 +103,7 @@ Misc: * mygroupid() -> groups_get_all_groups() * js_minify() -> core_minify::js_files() * css_minify_css() -> core_minify::css_files() + * course_modinfo::build_section_cache() -> (no replacement) User-agent related functions: * check_browser_operating_system() -> core_useragent::check_browser_operating_system() diff --git a/version.php b/version.php index 86279535266..ec0fb5c85f9 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2013091000.02; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2013091000.03; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes.