Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some additions for postgresql

  • Loading branch information...
commit 775f689b0fd7eb4148b3e1e2042b68acc690e8a9 1 parent c563a9a
paca70 authored
Showing with 31 additions and 6 deletions.
  1. +17 −3 mod/workshop/db/postgres7.php
  2. +14 −3 mod/workshop/db/postgres7.sql
View
20 mod/workshop/db/postgres7.php
@@ -1,14 +1,28 @@
<?PHP // $Id$
-function gallery_upgrade($oldversion) {
+function workshop_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
global $CFG;
- if ($oldversion < 2003043000) {
+ if ($oldversion < 2003050400) {
+ table_column("workshop","graded", "agreeassessments", "INT","2", "", "0" ,"NOT NULL");
+ table_column("workshop", "showgrades","hidegrades", "INT","2", "","0", "NOT NULL");
+ table_column("workshop_assessments","","timeagreed", "INT","8", "UNSIGNED", "0", "NOT NULL" );
- }
+ execute_sql("
+ CREATE TABLE {$CFG->prefix}workshop_comments (
+ id SERIAL8 PRIMARY KEY ,
+ workshopid int8 NOT NULL default '0',
+ assessmentid int8 NOT NULL default '0',
+ userid int8 NOT NULL default '0',
+ timecreated int8 NOT NULL default '0',
+ mailed int2 NOT NULL default '0',
+ comments text NOT NULL
+ )
+ ");
+ }
return true;
}
View
17 mod/workshop/db/postgres7.sql
@@ -12,8 +12,8 @@ CREATE TABLE prefix_workshop (
format INT2 NOT NULL default '0',
gradingstrategy INT2 NOT NULL default '1',
resubmit INT2 NOT NULL default '0',
- graded INT2 NOT NULL default '1',
- showgrades INT2 NOT NULL default '0',
+ agreeassessments INT2 NOT NULL default '0',
+ hidegrades INT2 NOT NULL default '0',
anonymous INT2 NOT NULL default '0',
includeself INT2 NOT NULL default '0',
maxbytes INT8 NOT NULL default '100000',
@@ -28,7 +28,8 @@ CREATE TABLE prefix_workshop (
includeteachersgrade INT NOT NULL default '0',
biasweight INT NOT NULL default '5',
reliabilityweight INT NOT NULL default '5',
- gradingweight INT NOT NULL default '5'
+ gradingweight INT NOT NULL default '5',
+ timeagreed INT8 NOT NULL default '0'
);
# --------------------------------------------------------
@@ -100,6 +101,16 @@ CREATE TABLE prefix_workshop_grades (
grade INT NOT NULL default '0'
);
# --------------------------------------------------------
+CREATE TABLE prefix_workshop_comments (
+ id SERIAL8 PRIMARY KEY,
+ workshopid int8 NOT NULL default '0',
+ assessmentid int8 NOT NULL default '0',
+ userid int8 NOT NULL default '0',
+ timecreated int8 NOT NULL default '0',
+ mailed int2 NOT NULL default '0',
+ comments text NOT NULL
+);
+
INSERT INTO prefix_log_display VALUES ('workshop', 'assess', 'workshop', 'name');
INSERT INTO prefix_log_display VALUES ('workshop', 'close', 'workshop', 'name');
Please sign in to comment.
Something went wrong with that request. Please try again.