diff --git a/mod/exercise/db/postgres7.php b/mod/exercise/db/postgres7.php index adf6d9556e8..41485690dd2 100644 --- a/mod/exercise/db/postgres7.php +++ b/mod/exercise/db/postgres7.php @@ -6,10 +6,6 @@ function exercise_upgrade($oldversion) { global $CFG; - if ($oldversion < 2003121000) { - execute_sql(" ALTER TABLE `{$CFG->prefix}exercise_submissions` ADD `late` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'"); - } - if ($oldversion < 2004062300) { table_column("exercise", "", "gradinggrade", "INTEGER", "4", "UNSIGNED", "0", "NOT NULL", "grade"); table_column("exercise", "", "assessmentcomps", "INTEGER", "4", "UNSIGNED", "2", "NOT NULL", "usemaximum"); @@ -44,6 +40,10 @@ function exercise_upgrade($oldversion) { modify_database('','CREATE INDEX prefix_exercise_grades_exerciseid_idx ON prefix_exercise_grades (exerciseid);'); } + if ($oldversion < 2006080702) { + table_column("exercise_submissions", "", "late", "INTEGER", "4", "UNSIGNED", "0", "NOT NULL"); + } + return true; } diff --git a/mod/exercise/db/postgres7.sql b/mod/exercise/db/postgres7.sql index 112a78bbfb0..ddc8b4a47a9 100644 --- a/mod/exercise/db/postgres7.sql +++ b/mod/exercise/db/postgres7.sql @@ -39,7 +39,8 @@ CREATE TABLE prefix_exercise_submissions ( timecreated INT8 NOT NULL default '0', resubmit INT NOT NULL default '0', mailed INT NOT NULL default '0', - isexercise INT NOT NULL default '0' + isexercise INT NOT NULL default '0', + late INT4 NOT NULL default '0' ); CREATE INDEX prefix_exercise_submissions_userid_idx ON prefix_exercise_submissions (userid); CREATE INDEX prefix_exercise_submissions_exerciseid_idx ON prefix_exercise_submissions (exerciseid); diff --git a/mod/exercise/version.php b/mod/exercise/version.php index 2a193cb7d7f..3c562b88956 100644 --- a/mod/exercise/version.php +++ b/mod/exercise/version.php @@ -5,7 +5,7 @@ // This fragment is called by /admin/index.php //////////////////////////////////////////////////////////////////////////////// -$module->version = 2006080701; // change only last two digits in 1.6.x!! +$module->version = 2006080702; // change only last two digits in 1.6.x!! $module->requires = 2006050512; // Requires this Moodle version $module->cron = 60; diff --git a/mod/scorm/db/postgres7.sql b/mod/scorm/db/postgres7.sql index 9715611eafa..13061cacead 100755 --- a/mod/scorm/db/postgres7.sql +++ b/mod/scorm/db/postgres7.sql @@ -7,6 +7,7 @@ CREATE TABLE prefix_scorm ( course integer NOT NULL default '0', name varchar(255) NOT NULL default '', reference varchar(255) NOT NULL default '', + version varchar(9) NOT NULL default '', maxgrade real NOT NULL default '0', grademethod integer NOT NULL default '0', maxattempt integer NOT NULL default '1', diff --git a/question/type/rqp/db/postgres7.php b/question/type/rqp/db/postgres7.php index bac7a523493..fd62bd8b81d 100644 --- a/question/type/rqp/db/postgres7.php +++ b/question/type/rqp/db/postgres7.php @@ -5,6 +5,16 @@ function qtype_rqp_upgrade($oldversion=0) { global $CFG; + if ($oldversion < 2006032201) { + modify_database('','CREATE TABLE prefix_question_rqp_servers ( + id SERIAL PRIMARY KEY, + typeid integer NOT NULL default 0, + url varchar(255) NOT NULL default \'\', + can_render INT4 NOT NULL default 0, + can_author INT4 NOT NULL default 0 + );'); + } + return true; } diff --git a/question/type/rqp/db/postgres7.sql b/question/type/rqp/db/postgres7.sql index 63ff3451cf3..0e7510275b0 100644 --- a/question/type/rqp/db/postgres7.sql +++ b/question/type/rqp/db/postgres7.sql @@ -17,6 +17,19 @@ CREATE TABLE prefix_question_rqp ( CREATE INDEX prefix_question_rqp_question_idx ON prefix_question_rqp (question); +# -------------------------------------------------------- + +# +# Table structure for table prefix_question_rqp_servers +# + +CREATE TABLE prefix_question_rqp_servers ( + id SERIAL PRIMARY KEY, + typeid integer NOT NULL default '0', + url varchar(255) NOT NULL default '', + can_render INT4 NOT NULL default '0', + can_author INT4 NOT NULL default '0' +); # -------------------------------------------------------- diff --git a/question/type/rqp/version.php b/question/type/rqp/version.php index 2d2a8d9fa7f..2010dbe4b6e 100644 --- a/question/type/rqp/version.php +++ b/question/type/rqp/version.php @@ -1,6 +1,6 @@ version = 2006032200; +$plugin->version = 2006032201; $plugin->requires = 2006032200; ?>