]> git.mjollnir.org Git - moodle.git/commitdiff
Added a new field to cache "old" course_module visibility when
authormoodler <moodler>
Tue, 11 Apr 2006 07:04:55 +0000 (07:04 +0000)
committermoodler <moodler>
Tue, 11 Apr 2006 07:04:55 +0000 (07:04 +0000)
the whole module is disabled (see bug 5021)

lib/db/mysql.php
lib/db/mysql.sql
lib/db/postgres7.php
lib/db/postgres7.sql
version.php

index dd6c699516045fc10815d0bbd57376a389f4ed34..532055779cad94265c704f7045d98f2c301c73a1 100644 (file)
@@ -1776,6 +1776,10 @@ function main_upgrade($oldversion=0) {
         table_column('cache_text','formattedtext','formattedtext','longblob','','','','not null');
     }
     
+    if ($oldversion < 2006041100) {
+        table_column('course_modules','','visibleold','integer','1','unsigned','1','not null', 'visible');
+    }
+    
     return $result;
 }
 
index 972aa860a9c66ee65b770eec294663939aa78045..fe04ed9828c7076d2be516c1a71150543a852a63 100644 (file)
@@ -159,6 +159,7 @@ CREATE TABLE `prefix_course_modules` (
   `score` tinyint(4) NOT NULL default '0',
   `indent` int(5) unsigned NOT NULL default '0',
   `visible` tinyint(1) NOT NULL default '1',
+  `visibleold` tinyint(1) NOT NULL default '1',
   `groupmode` tinyint(4) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `id` (`id`),
index 81230be653bbfbf6f9ec2ffede57203637444982..713e0ece6590ae023a332f065fb75653489c6621 100644 (file)
@@ -1488,6 +1488,10 @@ function main_upgrade($oldversion=0) {
         execute_sql(" CREATE INDEX {$CFG->prefix}course_sections_coursesection_idx ON {$CFG->prefix}course_sections (course,section) ", false);
     }
 
+    if ($oldversion < 2006041100) {
+        table_column('course_modules','','visibleold','integer','1','unsigned','1','not null', 'visible');
+    }
+
     return $result;
 }
 
index a413aedae6f0bf21a8c94cda1cd1ab2224efd136..ca5ea44a2ef222b9f0876021ce72b8143537b656 100644 (file)
@@ -104,6 +104,7 @@ CREATE TABLE prefix_course_modules (
    score integer NOT NULL default '0',
    indent integer NOT NULL default '0',
    visible integer NOT NULL default '1',
+   visibleold integer NOT NULL default '1',
    groupmode integer NOT NULL default '0'
 );
 
index f2f63a06a132c9201304fdcb409ae36d6c00dcfa..b998ece6c9984199fb91e754b828da3ecb801648 100644 (file)
@@ -6,9 +6,9 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-   $version = 2006041001;  // YYYYMMDD = date
+   $version = 2006041100;  // YYYYMMDD = date
                            //       XY = increments within a single day
 
-   $release = '1.6 Beta 2';    // Human-friendly version name
+   $release = '1.6 Beta 3';    // Human-friendly version name
 
 ?>