summaryrefslogtreecommitdiffstats
path: root/modules-available/exams
diff options
context:
space:
mode:
authorChristian Klinger2016-06-17 16:16:26 +0200
committerChristian Klinger2016-06-17 16:16:26 +0200
commitee62a13b0e6fc14add5189c7fc560dd0670c1aeb (patch)
treecb9af8bfcf0379c345feef690cf4daf6ff3045b3 /modules-available/exams
parentAdded a localized version of momentjs. (diff)
downloadslx-admin-ee62a13b0e6fc14add5189c7fc560dd0670c1aeb.tar.gz
slx-admin-ee62a13b0e6fc14add5189c7fc560dd0670c1aeb.tar.xz
slx-admin-ee62a13b0e6fc14add5189c7fc560dd0670c1aeb.zip
Added installation script.
Diffstat (limited to 'modules-available/exams')
-rw-r--r--modules-available/exams/install.inc.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules-available/exams/install.inc.php b/modules-available/exams/install.inc.php
new file mode 100644
index 00000000..b61a0af2
--- /dev/null
+++ b/modules-available/exams/install.inc.php
@@ -0,0 +1,18 @@
+<?php
+
+$res = array();
+
+$res[] = tableCreate('exams', '
+ `examid` int(11) NOT NULL AUTO_INCREMENT,
+ `starttime` int(11) NOT NULL,
+ `endtime` int(11) NOT NULL,
+ `description` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`examid`)
+ ');
+
+
+if (in_array(UPDATE_DONE, $res)) {
+ finalResponse(UPDATE_DONE, 'Tables created successfully');
+}
+
+finalResponse(UPDATE_NOOP, 'Everything already up to date');