]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16200 question/type/datasetdependent/ missing version.php. This was a mistake...
authortjhunt <tjhunt>
Tue, 26 Aug 2008 01:09:23 +0000 (01:09 +0000)
committertjhunt <tjhunt>
Tue, 26 Aug 2008 01:09:23 +0000 (01:09 +0000)
mod/quiz/db/upgrade.php
mod/quiz/version.php
question/type/datasetdependent/version.php [new file with mode: 0644]

index bc0bee07b12b24ebb0007dea7d39c53fc5f09f50..61305afa38b800d08d6519f645bd14c128e759f8 100644 (file)
@@ -186,6 +186,16 @@ function xmldb_quiz_upgrade($oldversion) {
         upgrade_mod_savepoint($result, 2008082200, 'quiz');
     }
 
+    /// Now that the quiz is no longer responsible for creating all the question
+    /// bank tables, and some of the tables are now the responsibility of the
+    /// datasetdependent question type, which did not have a version.php file before,
+    /// we need to say that these tables are already installed, otherwise XMLDB
+    /// will try to create them again and give an error.
+    if ($result && $oldversion < 2008082600) {
+        set_config('qtype_datasetdependent_version', 2008082600);
+        upgrade_mod_savepoint($result, 2008082600, 'quiz');
+    }
+
     return $result;
 }
 
index a4756d62f1e7cf68710f56a8739fcfd7ba357cc5..b964a6f4ef5e8783bff83ba582dd92dc85bebadd 100644 (file)
@@ -5,7 +5,7 @@
 //  This fragment is called by moodle_needs_upgrading() and /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2008082200;   // The (date) version of this module
+$module->version  = 2008082600;   // The (date) version of this module
 $module->requires = 2008072401;   // Requires this Moodle version
 $module->cron     = 0;            // How often should cron check this module (seconds)?
 
diff --git a/question/type/datasetdependent/version.php b/question/type/datasetdependent/version.php
new file mode 100644 (file)
index 0000000..f15f65b
--- /dev/null
@@ -0,0 +1,6 @@
+<?PHP // $Id$
+
+$plugin->version  = 2008082600;
+$plugin->requires = 2007101000;
+
+?>