Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

First versions for postgres7

  • Loading branch information...
commit 592188b42cb7204054bd74d6782928069a407fdf 1 parent ffb7138
authored May 04, 2003
17  mod/workshop/db/postgres7.php
... ...
@@ -0,0 +1,17 @@
  1
+<?PHP // $Id$
  2
+
  3
+function gallery_upgrade($oldversion) {
  4
+// This function does anything necessary to upgrade
  5
+// older versions to match current functionality
  6
+
  7
+    global $CFG;
  8
+
  9
+    if ($oldversion < 2003043000) {
  10
+	
  11
+	}
  12
+    return true;
  13
+}
  14
+
  15
+
  16
+?>
  17
+
113  mod/workshop/db/postgres7.sql
... ...
@@ -0,0 +1,113 @@
  1
+#
  2
+# Table structure for table workshop
  3
+#
  4
+
  5
+CREATE TABLE prefix_workshop (
  6
+  id SERIAL8 PRIMARY KEY,
  7
+  course INT8  NOT NULL default '0',
  8
+  name varchar(255) NOT NULL default '',
  9
+  description text NOT NULL,
  10
+  nelements INT  NOT NULL default '10',
  11
+  phase INT2  NOT NULL default '0',
  12
+  format INT2  NOT NULL default '0',
  13
+  gradingstrategy INT2  NOT NULL default '1',
  14
+  resubmit INT2  NOT NULL default '0',
  15
+  graded INT2  NOT NULL default '1',
  16
+  showgrades INT2  NOT NULL default '0',
  17
+  anonymous INT2  NOT NULL default '0',
  18
+  includeself INT2  NOT NULL default '0',
  19
+  maxbytes INT8  NOT NULL default '100000',
  20
+  deadline INT8  NOT NULL default '0',
  21
+  grade INT8 NOT NULL default '0',
  22
+  ntassessments INT  NOT NULL default '0',
  23
+  nsassessments INT  NOT NULL default '0',
  24
+  timemodified INT8  NOT NULL default '0',
  25
+  mergegrades INT  NOT NULL default '0',
  26
+  teacherweight INT  NOT NULL default '5',
  27
+  peerweight INT  NOT NULL default '5',
  28
+  includeteachersgrade INT  NOT NULL default '0',
  29
+  biasweight INT  NOT NULL default '5',
  30
+  reliabilityweight INT  NOT NULL default '5',
  31
+  gradingweight INT  NOT NULL default '5'
  32
+);
  33
+# --------------------------------------------------------
  34
+
  35
+#
  36
+# Table structure for table workshop_submissions
  37
+#
  38
+
  39
+CREATE TABLE prefix_workshop_submissions (
  40
+  id SERIAL8 PRIMARY KEY,
  41
+  workshopid INT8  NOT NULL default '0',
  42
+  userid INT8  NOT NULL default '0',
  43
+  title varchar(100) NOT NULL default '',
  44
+  timecreated INT8  NOT NULL default '0',
  45
+  mailed INT2  NOT NULL default '0',
  46
+  teachergrade INT  NOT NULL default '0',
  47
+  peergrade INT  NOT NULL default '0',
  48
+  biasgrade INT  NOT NULL default '0',
  49
+  reliabilitygrade INT  NOT NULL default '0',
  50
+  gradinggrade INT  NOT NULL default '0',
  51
+  finalgrade INT  NOT NULL default '0'
  52
+);
  53
+CREATE INDEX prefix_workshop_submissions_title_idx on prefix_workshop_submissions (title);
  54
+# --------------------------------------------------------
  55
+
  56
+#
  57
+# Table structure for table workshop_assessments
  58
+#
  59
+
  60
+CREATE TABLE prefix_workshop_assessments (
  61
+  id SERIAL8 PRIMARY KEY,
  62
+  workshopid INT8  NOT NULL default '0',
  63
+  submissionid INT8  NOT NULL default '0',
  64
+  userid INT8  NOT NULL default '0',
  65
+  timecreated INT8  NOT NULL default '0',
  66
+  timegraded INT8  NOT NULL default '0',
  67
+  grade float NOT NULL default '0',
  68
+  gradinggrade INT NOT NULL default '0',
  69
+  mailed INT2  NOT NULL default '0',
  70
+  generalcomment text NOT NULL,
  71
+  teachercomment text NOT NULL
  72
+  );
  73
+# --------------------------------------------------------
  74
+
  75
+#
  76
+# Table structure for table workshop_elements
  77
+#
  78
+
  79
+CREATE TABLE prefix_workshop_elements (
  80
+  id SERIAL8 PRIMARY KEY,
  81
+  workshopid INT8  NOT NULL default '0',
  82
+  elementno INT  NOT NULL default '0',
  83
+  description text NOT NULL,
  84
+  scale INT  NOT NULL default '0',
  85
+  maxscore INT  NOT NULL default '1',
  86
+  weight float NOT NULL default '1.0'
  87
+);
  88
+# --------------------------------------------------------
  89
+
  90
+#
  91
+# Table structure for table workshop_grades
  92
+#
  93
+
  94
+CREATE TABLE prefix_workshop_grades (
  95
+  id SERIAL8 PRIMARY KEY,
  96
+  workshopid INT8  NOT NULL default '0', 
  97
+  assessmentid INT8  NOT NULL default '0',
  98
+  elementno INT8  NOT NULL default '0',
  99
+  feedback text NOT NULL default '',
  100
+  grade INT NOT NULL default '0'
  101
+);
  102
+# --------------------------------------------------------
  103
+
  104
+INSERT INTO prefix_log_display VALUES ('workshop', 'assess', 'workshop', 'name');
  105
+INSERT INTO prefix_log_display VALUES ('workshop', 'close', 'workshop', 'name');
  106
+INSERT INTO prefix_log_display VALUES ('workshop', 'display grades', 'workshop', 'name');
  107
+INSERT INTO prefix_log_display VALUES ('workshop', 'grade', 'workshop', 'name');
  108
+INSERT INTO prefix_log_display VALUES ('workshop', 'hide grades', 'workshop', 'name');
  109
+INSERT INTO prefix_log_display VALUES ('workshop', 'open', 'workshop', 'name');
  110
+INSERT INTO prefix_log_display VALUES ('workshop', 'submit', 'workshop', 'name');
  111
+INSERT INTO prefix_log_display VALUES ('workshop', 'view', 'workshop', 'name');
  112
+INSERT INTO prefix_log_display VALUES ('workshop', 'update', 'workshop', 'name');
  113
+

0 notes on commit 592188b

Please sign in to comment.
Something went wrong with that request. Please try again.