From d3bdb4ca2ba3b3d838a72cc141ff55cc01e9e7ef Mon Sep 17 00:00:00 2001 From: Daniel Perales Date: Wed, 23 Jul 2008 22:31:51 +0200 Subject: [PATCH] [svn r15838] updated tables survey, survey_question and created table survey_group --- main/inc/lib/add_course.lib.inc.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/main/inc/lib/add_course.lib.inc.php b/main/inc/lib/add_course.lib.inc.php index 107cf00aeb..2fe67db039 100644 --- a/main/inc/lib/add_course.lib.inc.php +++ b/main/inc/lib/add_course.lib.inc.php @@ -382,6 +382,7 @@ function update_Db_course($courseDbName) $TABLESURVEYQUESTIONOPTION = $courseDbName . 'survey_question_option'; $TABLESURVEYINVITATION = $courseDbName . 'survey_invitation'; $TABLESURVEYANSWER = $courseDbName . 'survey_answer'; + $TABLESURVEYGROUP = $courseDbName . 'survey_group'; // audiorecorder $TABLEAUDIORECORDER = $courseDbName.'audiorecorder'; @@ -1376,6 +1377,11 @@ function update_Db_course($courseDbName) mail_subject VARCHAR( 255 ) NOT NULL, anonymous enum('0','1') NOT NULL default '0', access_condition TEXT DEFAULT NULL, + shuffle bool NOT NULL default '0', + one_question_page bool NOT NULL default '0', + version varchar(20) NOT NULL default '', + parent_id int unsigned NOT NULL, + type bool NOT NULL default '0', PRIMARY KEY (survey_id) )"; @@ -1415,6 +1421,9 @@ function update_Db_course($courseDbName) sort int NOT NULL, shared_question_id int(11), max_value int(11), + cond_group_basic int unsigned NOT NULL default '0', + cond_group_sec1 int unsigned NOT NULL default '0', + cond_group_sec2 int unsigned NOT NULL default '0', PRIMARY KEY (question_id) )"; $result = api_sql_query($sql, __FILE__, __LINE__) or die(mysql_error($sql)); @@ -1458,6 +1467,16 @@ function update_Db_course($courseDbName) } */ + $sql = "CREATE TABLE `".$TABLESURVEYGROUP."` ( + id int unsigned NOT NULL auto_increment, + name(20) NOT NULL, + description(200) NOT NULL, + survey_id int unsigned NOT NULL, + PRIMARY KEY (id) + )"; + + $result = api_sql_query($sql, __FILE__, __LINE__) or die(mysql_error($sql)); + return 0; }