Index: lams_tool_forum/db/sql/updatescripts/updateTo20080220.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/db/sql/updatescripts/Attic/updateTo20080220.sql,v diff -u -r1.2 -r1.3 --- lams_tool_forum/db/sql/updatescripts/updateTo20080220.sql 18 Mar 2008 04:21:17 -0000 1.2 +++ lams_tool_forum/db/sql/updatescripts/updateTo20080220.sql 6 Jun 2008 03:59:24 -0000 1.3 @@ -1,8 +1,7 @@ -- Update the Notebook tables to 20080220 -- This is for the LAMS 2.1 release. -ALTER TABLE tl_lafrum11_message -ADD COLUMN authored_parent_uid bigint; +ALTER TABLE tl_lafrum11_message ADD COLUMN authored_parent_uid bigint; alter table tl_lafrum11_message add index IX_msg_auth_parent (authored_parent_uid); Index: lams_tool_lamc/db/sql/updatescripts/updateTo20070820.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/db/sql/updatescripts/Attic/updateTo20070820.sql,v diff -u -r1.5 -r1.6 --- lams_tool_lamc/db/sql/updatescripts/updateTo20070820.sql 18 Mar 2008 04:21:28 -0000 1.5 +++ lams_tool_lamc/db/sql/updatescripts/updateTo20070820.sql 6 Jun 2008 03:59:24 -0000 1.6 @@ -1,31 +1,22 @@ -- Update the Multiple Choice tables from version 20070214 to 20070820 -- This is for the LAMS 2.0.1 release. -ALTER TABLE tl_lamc11_que_usr -ADD COLUMN last_attempt_order INTEGER -, ADD COLUMN last_attempt_total_mark INTEGER; +ALTER TABLE tl_lamc11_que_usr ADD COLUMN last_attempt_order INTEGER, ADD COLUMN last_attempt_total_mark INTEGER; -ALTER TABLE tl_lamc11_content -ADD COLUMN displayAnswers TINYINT(1) NOT NULL DEFAULT 1 AFTER randomize; +ALTER TABLE tl_lamc11_content ADD COLUMN displayAnswers TINYINT(1) NOT NULL DEFAULT 1 AFTER randomize; -- Fix problems with the marks in the attempt table. It was recording the number of questions answered correctly for the activity. -- Now it records the mark for each question. The overall mark is put in the que_usr table. -update tl_lamc11_usr_attempt a -set a.mark = (select c.mark from tl_lamc11_que_content c where c.uid = a.mc_que_content_id) -where a.isAttemptCorrect = 1; +update tl_lamc11_usr_attempt a set a.mark = (select c.mark from tl_lamc11_que_content c where c.uid = a.mc_que_content_id) where a.isAttemptCorrect = 1; -update tl_lamc11_usr_attempt a -set a.mark = 0 -where a.isAttemptCorrect = 0; +update tl_lamc11_usr_attempt a set a.mark = 0 where a.isAttemptCorrect = 0; -- Now that the individual marks are right, we can recalculate the overall mark for an attempt. We need to find just the -- final attempt for each user. At present, there can only be one option selected for a question, so we don't -- need to worry about repeated data. -update tl_lamc11_que_usr qu1 set qu1.last_attempt_order = -( select max(attemptOrder) from tl_lamc11_usr_attempt att where att.que_usr_id = qu1.uid ); +update tl_lamc11_que_usr qu1 set qu1.last_attempt_order = ( select max(attemptOrder) from tl_lamc11_usr_attempt att where att.que_usr_id = qu1.uid ); -update tl_lamc11_que_usr qu1 set qu1.last_attempt_total_mark = -( select sum(mark) from tl_lamc11_usr_attempt att where att.que_usr_id = qu1.uid and att.attemptOrder = qu1.last_attempt_order); +update tl_lamc11_que_usr qu1 set qu1.last_attempt_total_mark = ( select sum(mark) from tl_lamc11_usr_attempt att where att.que_usr_id = qu1.uid and att.attemptOrder = qu1.last_attempt_order); update lams_tool set supports_outputs = 1 where tool_signature = "lamc11"; Index: lams_tool_vote/db/sql/updatescripts/updateTo20080326.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/db/sql/updatescripts/Attic/updateTo20080326.sql,v diff -u -r1.1 -r1.2 --- lams_tool_vote/db/sql/updatescripts/updateTo20080326.sql 26 Mar 2008 04:08:39 -0000 1.1 +++ lams_tool_vote/db/sql/updatescripts/updateTo20080326.sql 6 Jun 2008 03:59:23 -0000 1.2 @@ -1,20 +1,13 @@ -- Update the Vote tables to version 20080108 -- This is for the LAMS 2.1 release. -UPDATE tl_lavote11_content -SET lock_on_finish = 0 -WHERE content_id = ( - SELECT default_tool_content_id - FROM lams_tool - WHERE tool_signature = 'lavote11' -); +UPDATE tl_lavote11_content SET lock_on_finish = 0 WHERE content_id = (SELECT default_tool_content_id FROM lams_tool WHERE tool_signature = 'lavote11'); UPDATE lams_tool SET modified_date_time = NOW() WHERE tool_signature = 'lavote11'; update lams_tool set supports_outputs = 1 where tool_signature = "lavote11"; -ALTER TABLE tl_lavote11_content -ADD COLUMN show_results TINYINT(1) NOT NULL DEFAULT 1; +ALTER TABLE tl_lavote11_content ADD COLUMN show_results TINYINT(1) NOT NULL DEFAULT 1; UPDATE tl_lavote11_content set show_results = 1;