Index: lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McQueContent.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/Attic/McQueContent.hbm.xml,v diff -u -r1.16 -r1.17 --- lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McQueContent.hbm.xml 2 Oct 2006 01:59:54 -0000 1.16 +++ lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McQueContent.hbm.xml 15 Oct 2006 11:08:52 -0000 1.17 @@ -51,15 +51,6 @@ - - - - - - - - + MCQ Tool for Lams 1.1 @@ -246,32 +246,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -323,7 +297,7 @@ - + @@ -481,7 +455,7 @@
- + @@ -541,13 +515,6 @@ - - - - - - - @@ -714,7 +681,7 @@
- + Index: lams_tool_lamc/db/sql/create_lams_tool_mc.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/db/sql/create_lams_tool_mc.sql,v diff -u -r1.17 -r1.18 --- lams_tool_lamc/db/sql/create_lams_tool_mc.sql 2 Oct 2006 01:59:56 -0000 1.17 +++ lams_tool_lamc/db/sql/create_lams_tool_mc.sql 15 Oct 2006 11:08:52 -0000 1.18 @@ -1,125 +1,119 @@ -CREATE TABLE tl_lamc11_content ( - uid BIGINT(20) NOT NULL AUTO_INCREMENT - , content_id BIGINT(20) NOT NULL - , title TEXT - , instructions TEXT - , creation_date DATETIME - , update_date DATETIME - , reflect TINYINT(1) NOT NULL DEFAULT 0 - , questions_sequenced TINYINT(1) NOT NULL DEFAULT 0 - , created_by BIGINT(20) NOT NULL DEFAULT 0 - , run_offline TINYINT(1) NOT NULL DEFAULT 0 - , define_later TINYINT(1) NOT NULL DEFAULT 0 - , offline_instructions TEXT - , online_instructions TEXT - , content_in_use TINYINT(1) NOT NULL DEFAULT 0 - , retries TINYINT(1) NOT NULL DEFAULT 0 - , pass_mark INTEGER - , show_report TINYINT(1) NOT NULL DEFAULT 0 - , reflectionSubject TEXT - , UNIQUE UQ_tl_lamc11_content_1 (content_id) - , PRIMARY KEY (uid) -)TYPE=InnoDB; - -CREATE TABLE tl_lamc11_que_content ( - uid BIGINT(20) NOT NULL AUTO_INCREMENT - , question TEXT - , mark INT(5) NOT NULL DEFAULT 1 - , weight INT(5) NOT NULL DEFAULT 0 - , disabled TINYINT(1) NOT NULL DEFAULT 1 - , display_order INT(5) - , mc_content_id BIGINT(20) NOT NULL - , feedback TEXT - , PRIMARY KEY (uid) - , INDEX (mc_content_id) - , CONSTRAINT FK_tl_lamc11_que_content_1 FOREIGN KEY (mc_content_id) - REFERENCES tl_lamc11_content (uid) -)TYPE=InnoDB; - -CREATE TABLE tl_lamc11_options_content ( - uid BIGINT(20) NOT NULL AUTO_INCREMENT - , correct_option TINYINT(1) NOT NULL DEFAULT 0 - , mc_que_content_id BIGINT(20) NOT NULL - , mc_que_option_text VARCHAR(250) - , PRIMARY KEY (uid) - , INDEX (mc_que_content_id) - , CONSTRAINT FK_tl_lamc11_options_content_1 FOREIGN KEY (mc_que_content_id) - REFERENCES tl_lamc11_que_content (uid) -)TYPE=InnoDB; - -CREATE TABLE tl_lamc11_session ( - uid BIGINT(20) NOT NULL AUTO_INCREMENT - , mc_session_id BIGINT(20) NOT NULL - , session_start_date DATETIME - , session_end_date DATETIME - , session_name VARCHAR(100) - , session_status VARCHAR(100) - , mc_content_id BIGINT(20) NOT NULL - , UNIQUE UQ_tl_lamc11_session_1 (mc_session_id) - , PRIMARY KEY (uid) - , INDEX (mc_content_id) - , CONSTRAINT FK_tl_lamc_session_1 FOREIGN KEY (mc_content_id) - REFERENCES tl_lamc11_content (uid) -)TYPE=InnoDB; - -CREATE TABLE tl_lamc11_que_usr ( - uid BIGINT(20) NOT NULL AUTO_INCREMENT - , que_usr_id BIGINT(20) NOT NULL - , mc_session_id BIGINT(20) NOT NULL - , username VARCHAR(100) - , fullname VARCHAR(100) - , responseFinalised TINYINT(1) NOT NULL DEFAULT 0 - , viewSummaryRequested TINYINT(1) NOT NULL DEFAULT 0 - , PRIMARY KEY (uid) - , INDEX (mc_session_id) - , CONSTRAINT FK_tl_lamc11_que_usr_1 FOREIGN KEY (mc_session_id) - REFERENCES tl_lamc11_session (uid) -)TYPE=InnoDB; - -CREATE TABLE tl_lamc11_usr_attempt ( - uid BIGINT(20) NOT NULL AUTO_INCREMENT - , que_usr_id BIGINT(20) NOT NULL - , mc_que_content_id BIGINT(20) NOT NULL - , mc_que_option_id BIGINT(20) NOT NULL - , attempt_time DATETIME - , time_zone VARCHAR(255) - , isAttemptCorrect TINYINT(1) NOT NULL DEFAULT 0 - , mark VARCHAR(255) - , passed TINYINT(1) NOT NULL DEFAULT 0 - , attemptOrder INTEGER NOT NULL DEFAULT 1 - , finished TINYINT(1) DEFAULT 0 - , PRIMARY KEY (uid) - , INDEX (mc_que_content_id) - , CONSTRAINT FK_tl_lamc11_usr_attempt_2 FOREIGN KEY (mc_que_content_id) - REFERENCES tl_lamc11_que_content (uid) - , INDEX (mc_que_option_id) - , CONSTRAINT FK_tl_lamc11_usr_attempt_3 FOREIGN KEY (mc_que_option_id) - REFERENCES tl_lamc11_options_content (uid) - , INDEX (que_usr_id) - , CONSTRAINT FK_tl_lamc11_usr_attempt_4 FOREIGN KEY (que_usr_id) - REFERENCES tl_lamc11_que_usr (uid) -)TYPE=InnoDB; - -CREATE TABLE tl_lamc11_uploadedfile ( - submissionId BIGINT(20) NOT NULL AUTO_INCREMENT - , uuid VARCHAR(255) NOT NULL - , mc_content_id BIGINT(20) NOT NULL - , isOnline_File TINYINT(1) NOT NULL - , filename VARCHAR(255) NOT NULL - , PRIMARY KEY (submissionId) - , INDEX (mc_content_id) - , CONSTRAINT FK_tl_lamc11_uploadedFile FOREIGN KEY (mc_content_id) - REFERENCES tl_lamc11_content (uid) -)TYPE=InnoDB; - - -INSERT INTO tl_lamc11_content(uid, content_id , title, instructions, creation_date , reflect, questions_sequenced , created_by , run_offline , define_later, offline_instructions, online_instructions, content_in_use, retries, show_report, pass_mark) VALUES (1, ${default_content_id} , 'MCQ Title', 'MCQ Instructions', NOW(), 0, 0, 1, 0, 0, 'offline instructions','online instructions', 0, 0, 0, 0); - -INSERT INTO tl_lamc11_que_content (uid,question, mark, weight, disabled, display_order, mc_content_id) VALUES (1, 'A Sample question?', 1, 100, 0, 1,1); - -INSERT INTO tl_lamc11_options_content (uid, correct_option, mc_que_content_id, mc_que_option_text) VALUES (1, 0, 1,'Candidate Answer 1'); -INSERT INTO tl_lamc11_options_content (uid, correct_option, mc_que_content_id, mc_que_option_text) VALUES (2, 1, 1,'Candidate Answer 2'); - - - - +CREATE TABLE tl_lamc11_content ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , content_id BIGINT(20) NOT NULL + , title TEXT + , instructions TEXT + , creation_date DATETIME + , update_date DATETIME + , reflect TINYINT(1) NOT NULL DEFAULT 0 + , questions_sequenced TINYINT(1) NOT NULL DEFAULT 0 + , created_by BIGINT(20) NOT NULL DEFAULT 0 + , run_offline TINYINT(1) NOT NULL DEFAULT 0 + , define_later TINYINT(1) NOT NULL DEFAULT 0 + , offline_instructions TEXT + , online_instructions TEXT + , content_in_use TINYINT(1) NOT NULL DEFAULT 0 + , retries TINYINT(1) NOT NULL DEFAULT 0 + , pass_mark INTEGER + , show_report TINYINT(1) NOT NULL DEFAULT 0 + , reflectionSubject TEXT + , UNIQUE UQ_tl_lamc11_content_1 (content_id) + , PRIMARY KEY (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lamc11_que_content ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , question TEXT + , mark INT(5) NOT NULL DEFAULT 1 + , display_order INT(5) + , mc_content_id BIGINT(20) NOT NULL + , feedback TEXT + , PRIMARY KEY (uid) + , INDEX (mc_content_id) + , CONSTRAINT FK_tl_lamc11_que_content_1 FOREIGN KEY (mc_content_id) + REFERENCES tl_lamc11_content (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lamc11_options_content ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , correct_option TINYINT(1) NOT NULL DEFAULT 0 + , mc_que_content_id BIGINT(20) NOT NULL + , mc_que_option_text VARCHAR(250) + , PRIMARY KEY (uid) + , INDEX (mc_que_content_id) + , CONSTRAINT FK_tl_lamc11_options_content_1 FOREIGN KEY (mc_que_content_id) + REFERENCES tl_lamc11_que_content (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lamc11_session ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , mc_session_id BIGINT(20) NOT NULL + , session_start_date DATETIME + , session_end_date DATETIME + , session_name VARCHAR(100) + , session_status VARCHAR(100) + , mc_content_id BIGINT(20) NOT NULL + , UNIQUE UQ_tl_lamc11_session_1 (mc_session_id) + , PRIMARY KEY (uid) + , INDEX (mc_content_id) + , CONSTRAINT FK_tl_lamc_session_1 FOREIGN KEY (mc_content_id) + REFERENCES tl_lamc11_content (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lamc11_que_usr ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , que_usr_id BIGINT(20) NOT NULL + , mc_session_id BIGINT(20) NOT NULL + , username VARCHAR(100) + , fullname VARCHAR(100) + , responseFinalised TINYINT(1) NOT NULL DEFAULT 0 + , viewSummaryRequested TINYINT(1) NOT NULL DEFAULT 0 + , PRIMARY KEY (uid) + , INDEX (mc_session_id) + , CONSTRAINT FK_tl_lamc11_que_usr_1 FOREIGN KEY (mc_session_id) + REFERENCES tl_lamc11_session (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lamc11_usr_attempt ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , que_usr_id BIGINT(20) NOT NULL + , mc_que_content_id BIGINT(20) NOT NULL + , mc_que_option_id BIGINT(20) NOT NULL + , attempt_time DATETIME + , isAttemptCorrect TINYINT(1) NOT NULL DEFAULT 0 + , mark VARCHAR(255) + , passed TINYINT(1) NOT NULL DEFAULT 0 + , attemptOrder INTEGER NOT NULL DEFAULT 1 + , finished TINYINT(1) DEFAULT 0 + , PRIMARY KEY (uid) + , INDEX (mc_que_content_id) + , CONSTRAINT FK_tl_lamc11_usr_attempt_2 FOREIGN KEY (mc_que_content_id) + REFERENCES tl_lamc11_que_content (uid) + , INDEX (mc_que_option_id) + , CONSTRAINT FK_tl_lamc11_usr_attempt_3 FOREIGN KEY (mc_que_option_id) + REFERENCES tl_lamc11_options_content (uid) + , INDEX (que_usr_id) + , CONSTRAINT FK_tl_lamc11_usr_attempt_4 FOREIGN KEY (que_usr_id) + REFERENCES tl_lamc11_que_usr (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lamc11_uploadedfile ( + submissionId BIGINT(20) NOT NULL AUTO_INCREMENT + , uuid VARCHAR(255) NOT NULL + , mc_content_id BIGINT(20) NOT NULL + , isOnline_File TINYINT(1) NOT NULL + , filename VARCHAR(255) NOT NULL + , PRIMARY KEY (submissionId) + , INDEX (mc_content_id) + , CONSTRAINT FK_tl_lamc11_uploadedFile FOREIGN KEY (mc_content_id) + REFERENCES tl_lamc11_content (uid) +)TYPE=InnoDB; + +INSERT INTO tl_lamc11_content(uid, content_id , title, instructions, creation_date , reflect, questions_sequenced , created_by , run_offline , define_later, offline_instructions, online_instructions, content_in_use, retries, show_report, pass_mark) VALUES (1, ${default_content_id} , 'MCQ Title', 'MCQ Instructions', NOW(), 0, 0, 1, 0, 0, 'offline instructions','online instructions', 0, 0, 0, 0); + +INSERT INTO tl_lamc11_que_content (uid,question, mark, display_order, mc_content_id) VALUES (1, 'A Sample question?', 1,1,1); + +INSERT INTO tl_lamc11_options_content (uid, correct_option, mc_que_content_id, mc_que_option_text) VALUES (1, 0, 1,'Candidate Answer 1'); +INSERT INTO tl_lamc11_options_content (uid, correct_option, mc_que_content_id, mc_que_option_text) VALUES (2, 1, 1,'Candidate Answer 2'); + + Index: lams_tool_lamc/db/sql/tool_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/db/sql/tool_insert.sql,v diff -u -r1.18 -r1.19 --- lams_tool_lamc/db/sql/tool_insert.sql 8 Sep 2006 05:12:16 -0000 1.18 +++ lams_tool_lamc/db/sql/tool_insert.sql 15 Oct 2006 11:08:52 -0000 1.19 @@ -34,7 +34,7 @@ 'MCQ', 'Multiple Choice Questions', 'mc', -'1.1', +'20061015', NULL, NULL, 0, Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McLearnerAnswersDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/Attic/McLearnerAnswersDTO.java,v diff -u -r1.3 -r1.4 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McLearnerAnswersDTO.java 2 Oct 2006 02:06:35 -0000 1.3 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McLearnerAnswersDTO.java 15 Oct 2006 11:08:52 -0000 1.4 @@ -41,8 +41,6 @@ protected String questionUid; - protected String weight; - protected String mark; protected Map candidateAnswers; @@ -81,21 +79,7 @@ public void setQuestion(String question) { this.question = question; } - /** - * @return Returns the weight. - */ - public String getWeight() { - return weight; - } - /** - * @param weight The weight to set. - */ - public void setWeight(String weight) { - this.weight = weight; - } - - public String toString() { return new ToStringBuilder(this) .append("question: ", getQuestion()) Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McMonitoredAnswersDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McMonitoredAnswersDTO.java,v diff -u -r1.8 -r1.9 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McMonitoredAnswersDTO.java 2 Oct 2006 02:06:35 -0000 1.8 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McMonitoredAnswersDTO.java 15 Oct 2006 11:08:52 -0000 1.9 @@ -40,8 +40,6 @@ private String question; - private String weight; - private String mark; private String sessionId; @@ -110,7 +108,6 @@ return new ToStringBuilder(this) .append("questionUid: ", questionUid) .append("question: ", question) - .append("weight: ", weight) .append("candidateAnswers: ", candidateAnswers) .append("questionAttempts: ", questionAttempts) .append("candidateAnswersCorrect:", candidateAnswersCorrect) @@ -129,18 +126,6 @@ } /** - * @return Returns the weight. - */ - public String getWeight() { - return weight; - } - /** - * @param weight The weight to set. - */ - public void setWeight(String weight) { - this.weight = weight; - } - /** * @return Returns the candidateAnswersCorrect. */ public List getCandidateAnswersCorrect() { Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueContent.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueContent.java,v diff -u -r1.6 -r1.7 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueContent.java 2 Oct 2006 01:59:55 -0000 1.6 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueContent.java 15 Oct 2006 11:08:51 -0000 1.7 @@ -55,9 +55,6 @@ /** nullable persistent field */ private Integer displayOrder; - /** nullable persistent field */ - private Integer weight; - private Integer mark; private String feedback; @@ -93,42 +90,29 @@ this.mcOptionsContents = mcOptionsContents; } - public McQueContent(String question, Integer displayOrder, Integer weight, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { + public McQueContent(String question, Integer displayOrder, Integer mark, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { this.question = question; this.displayOrder = displayOrder; - this.weight = weight; - this.mcContent=mcContent; - this.mcUsrAttempts = mcUsrAttempts; - this.mcOptionsContents = mcOptionsContents; - } - - - public McQueContent(String question, Integer displayOrder, Integer weight, Integer mark, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { - this.question = question; - this.displayOrder = displayOrder; - this.weight = weight; this.mark = mark; this.mcContent=mcContent; this.mcUsrAttempts = mcUsrAttempts; this.mcOptionsContents = mcOptionsContents; } - public McQueContent(String question, Integer displayOrder, Integer weight, String feedback, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { + public McQueContent(String question, Integer displayOrder, String feedback, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { this.question = question; this.displayOrder = displayOrder; - this.weight = weight; this.feedback = feedback; this.mcContent=mcContent; this.mcUsrAttempts = mcUsrAttempts; this.mcOptionsContents = mcOptionsContents; } - public McQueContent(String question, Integer displayOrder, Integer weight, Integer mark, String feedback, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { + public McQueContent(String question, Integer displayOrder, Integer mark, String feedback, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { this.question = question; this.displayOrder = displayOrder; - this.weight = weight; this.mark = mark; this.feedback = feedback; this.mcContent=mcContent; @@ -146,20 +130,10 @@ this.mcOptionsContents = mcOptionsContents; } - public McQueContent(Long mcQueContentId, String question, Integer displayOrder, Integer weight, Set mcUsrAttempts, Set mcOptionsContents) { + public McQueContent(Long mcQueContentId, String question, Integer displayOrder, Integer mark, Set mcUsrAttempts, Set mcOptionsContents) { this.mcQueContentId = mcQueContentId; this.question = question; this.displayOrder = displayOrder; - this.weight=weight; - this.mcUsrAttempts = mcUsrAttempts; - this.mcOptionsContents = mcOptionsContents; - } - - public McQueContent(Long mcQueContentId, String question, Integer displayOrder, Integer weight,Integer mark, Set mcUsrAttempts, Set mcOptionsContents) { - this.mcQueContentId = mcQueContentId; - this.question = question; - this.displayOrder = displayOrder; - this.weight=weight; this.mark=mark; this.mcUsrAttempts = mcUsrAttempts; this.mcOptionsContents = mcOptionsContents; @@ -203,7 +177,6 @@ logger.debug("deep copying queContent: " + queContent); McQueContent newQueContent = new McQueContent(queContent.getQuestion(), queContent.getDisplayOrder(), - queContent.getWeight(), queContent.getMark(), queContent.getFeedback(), newMcContent, @@ -313,20 +286,6 @@ this.mcContentId = mcContentId; } - /** - * @return Returns the weight. - */ - public Integer getWeight() { - return weight; - } - /** - * @param weight The weight to set. - */ - public void setWeight(Integer weight) { - this.weight = weight; - } - - /** * @return Returns the logger. */ Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUsrAttempt.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUsrAttempt.java,v diff -u -r1.5 -r1.6 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUsrAttempt.java 17 Sep 2006 06:23:45 -0000 1.5 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUsrAttempt.java 15 Oct 2006 11:08:51 -0000 1.6 @@ -47,9 +47,6 @@ /** nullable persistent field */ private Date attemptTime; - /** nullable persistent field */ - private String timeZone; - private Integer mark; private boolean finished; @@ -74,40 +71,36 @@ private org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent; /** full constructor */ - public McUsrAttempt(Long attemptId, Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, + public McUsrAttempt(Long attemptId, Date attemptTime, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent) { this.attemptId = attemptId; this.attemptTime = attemptTime; - this.timeZone = timeZone; this.mcQueContent = mcQueContent; this.mcQueUsr = mcQueUsr; this.mcOptionsContent = mcOptionsContent; } - public McUsrAttempt(Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, + public McUsrAttempt(Date attemptTime, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent) { this.attemptTime = attemptTime; - this.timeZone = timeZone; this.mcQueContent = mcQueContent; this.mcQueUsr = mcQueUsr; this.mcOptionsContent = mcOptionsContent; } - public McUsrAttempt(Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, + public McUsrAttempt(Date attemptTime, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent, Integer mark, boolean passed) { this.attemptTime = attemptTime; - this.timeZone = timeZone; this.mcQueContent = mcQueContent; this.mcQueUsr = mcQueUsr; this.mcOptionsContent = mcOptionsContent; this.mark = mark; this.passed = passed; } - public McUsrAttempt(Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, + public McUsrAttempt(Date attemptTime, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent, Integer mark, boolean passed, Integer attemptOrder) { this.attemptTime = attemptTime; - this.timeZone = timeZone; this.mcQueContent = mcQueContent; this.mcQueUsr = mcQueUsr; this.mcOptionsContent = mcOptionsContent; @@ -116,10 +109,9 @@ this.attemptOrder=attemptOrder; } - public McUsrAttempt(Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, + public McUsrAttempt(Date attemptTime, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent, Integer mark, boolean passed, Integer attemptOrder, boolean attemptCorrect) { this.attemptTime = attemptTime; - this.timeZone = timeZone; this.mcQueContent = mcQueContent; this.mcQueUsr = mcQueUsr; this.mcOptionsContent = mcOptionsContent; @@ -166,14 +158,6 @@ this.attemptTime = attemptTime; } - public String getTimeZone() { - return this.timeZone; - } - - public void setTimeZone(String timeZone) { - this.timeZone = timeZone; - } - public org.lamsfoundation.lams.tool.mc.pojos.McQueContent getMcQueContent() { return this.mcQueContent; } Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java,v diff -u -r1.83 -r1.84 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java 15 Oct 2006 04:55:30 -0000 1.83 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java 15 Oct 2006 11:08:49 -0000 1.84 @@ -2571,8 +2571,6 @@ question.setQuestion(WebUtil.convertNewlines((String)questionMap.get(CONTENT_Q_QUESTION))); // In 1.0.2 all questions are implicitly assumed to be 1 and be of equal weight - // I think the weights are actually ignored, so just set to 0 (FM) - question.setWeight( 0 ); question.setMark( 1 ); String correctAnswer = (String)questionMap.get(CONTENT_Q_ANSWER); Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java,v diff -u -r1.53 -r1.54 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java 3 Oct 2006 21:53:58 -0000 1.53 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java 15 Oct 2006 11:08:52 -0000 1.54 @@ -252,19 +252,17 @@ * @param displayOrder */ public static void updateExistingQuestionContent(HttpServletRequest request, Map mapFeedbackIncorrect, Map mapFeedbackCorrect, - McQueContent mcQueContent, String displayOrder, String weight, IMcService mcService) + McQueContent mcQueContent, String displayOrder, IMcService mcService) { logger.debug("doing updateExistingQuestionContent..."); logger.debug("using displayOrder: " + displayOrder); - logger.debug("using weight: " + weight); String incorrectFeedback=(String)mapFeedbackIncorrect.get(displayOrder); logger.debug("new incorrectFeedback will be :" + incorrectFeedback); String correctFeedback=(String)mapFeedbackCorrect.get(displayOrder); logger.debug("new correctFeedback will be :" + correctFeedback); mcQueContent.setDisplayOrder(new Integer(displayOrder)); - mcQueContent.setWeight(new Integer(weight)); mcService.saveOrUpdateMcQueContent(mcQueContent); logger.debug("updated mcQueContent in the db: " + mcQueContent); @@ -1685,7 +1683,6 @@ McQueContent queContent= new McQueContent(pairs.getValue().toString(), new Integer(displayOrder), - new Integer(0), new Integer(currentMark), currentFeedback, mcContent, Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java,v diff -u -r1.39 -r1.40 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java 10 Oct 2006 11:15:13 -0000 1.39 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java 15 Oct 2006 11:08:52 -0000 1.40 @@ -557,11 +557,7 @@ { logger.debug("starting createLearnerAttempt: "); Date attempTime=McUtils.getGMTDateTime(); - //String timeZone= McUtils.getCurrentTimeZone(); - String timeZone= ""; - logger.debug("timeZone: " + timeZone); - Iterator itSelectedMap = selectedQuestionAndCandidateAnswersDTO.iterator(); while (itSelectedMap.hasNext()) { @@ -580,7 +576,7 @@ logger.debug("isAttemptCorrect: " + isAttemptCorrect); logger.debug("requesting createIndividualOptions"); - createIndividualOptions(request, candidateAnswers, mcQueContent, mcQueUsr, attempTime, timeZone, mark, passed, + createIndividualOptions(request, candidateAnswers, mcQueContent, mcQueUsr, attempTime, mark, passed, new Integer(highestAttemptOrder), isAttemptCorrect,mcService); } @@ -598,15 +594,14 @@ * @param mcQueContent * @param mcQueUsr * @param attempTime - * @param timeZone * @param mark * @param passed * @param highestAttemptOrder * @param isAttemptCorrect * @param mcService */ public static void createIndividualOptions(HttpServletRequest request, Map candidateAnswers, McQueContent mcQueContent, - McQueUsr mcQueUsr, Date attempTime, String timeZone, int mark, boolean passed, Integer highestAttemptOrder, String isAttemptCorrect, + McQueUsr mcQueUsr, Date attempTime, int mark, boolean passed, Integer highestAttemptOrder, String isAttemptCorrect, IMcService mcService) { logger.debug("starting createIndividualOptions"); @@ -630,7 +625,7 @@ logger.debug("mcOptsContent: " + mcOptsContent); if (mcOptsContent != null) { - McUsrAttempt mcUsrAttempt=new McUsrAttempt(attempTime, timeZone, mcQueContent, mcQueUsr, mcOptsContent, IntegerMark, passed, highestAttemptOrder, new Boolean(isAttemptCorrect).booleanValue()); + McUsrAttempt mcUsrAttempt=new McUsrAttempt(attempTime, mcQueContent, mcQueUsr, mcOptsContent, IntegerMark, passed, highestAttemptOrder, new Boolean(isAttemptCorrect).booleanValue()); mcService.createMcUsrAttempt(mcUsrAttempt); logger.debug("created mcUsrAttempt in the db :" + mcUsrAttempt); } @@ -639,39 +634,7 @@ } } - /** - * Map buildWeightsMap(HttpServletRequest request, Long toolContentId, IMcService mcService) - * - * @param request - * @param toolContentId - * @return Map - */ - public static Map buildWeightsMap(HttpServletRequest request, Long toolContentId, IMcService mcService) - { - logger.debug("starting buildWeightsMap : " + toolContentId); - Map mapWeights= new TreeMap(new McComparator()); - McContent mcContent=mcService.retrieveMc(toolContentId); - logger.debug("mcContent : " + mcContent); - - List questionsContent=mcService.refreshQuestionContent(mcContent.getUid()); - logger.debug("questionsContent : " + questionsContent); - - Iterator listIterator=questionsContent.iterator(); - Long mapIndex=new Long(1); - while (listIterator.hasNext()) - { - McQueContent mcQueContent=(McQueContent)listIterator.next(); - logger.debug("mcQueContent : " + mcQueContent); - mapWeights.put(mapIndex.toString(),mcQueContent.getWeight().toString()); - mapIndex=new Long(mapIndex.longValue()+1); - } - logger.debug("mapWeights : " + mapWeights); - return mapWeights; - } - - - /** * Map buildMarksMap(HttpServletRequest request, Long toolContentId, IMcService mcService) * * @param request @@ -775,7 +738,6 @@ mcLearnerAnswersDTO.setDisplayOrder(mcQueContent.getDisplayOrder().toString()); mcLearnerAnswersDTO.setQuestionUid(mcQueContent.getUid().toString()); - mcLearnerAnswersDTO.setWeight(mcQueContent.getWeight().toString()); mcLearnerAnswersDTO.setMark(mcQueContent.getMark().toString()); mcLearnerAnswersDTO.setCandidateAnswerUids(mapCandidateAnswerUids); Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java,v diff -u -r1.46 -r1.47 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java 11 Oct 2006 22:44:04 -0000 1.46 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java 15 Oct 2006 11:08:52 -0000 1.47 @@ -551,7 +551,6 @@ logger.debug("learnerInput: " + learnerInput); int mark=0; - int userWeight=0; int userMarks=0; int totalMarksPossible=0; @@ -576,7 +575,6 @@ mcLearnerAnswersDTO.setQuestion(mcQueContent.getQuestion()); mcLearnerAnswersDTO.setDisplayOrder(mcQueContent.getDisplayOrder().toString()); - mcLearnerAnswersDTO.setWeight(mcQueContent.getWeight().toString()); mcLearnerAnswersDTO.setQuestionUid(mcQueContent.getUid().toString()); mcLearnerAnswersDTO.setMark(mcQueContent.getMark().toString()); @@ -645,12 +643,9 @@ { mcLearnerAnswersDTO.setFeedbackCorrect(mcQueContent.getFeedback()); ++mark; - int weight=mcQueContent.getWeight().intValue(); - logger.debug("weight: " + weight); totalUserMarks+=currentMark; - userWeight=userWeight + weight; userMarks=userMarks + currentMark;; } else @@ -665,14 +660,12 @@ } logger.debug("final questionAndCandidateAnswersList: " + questionAndCandidateAnswersList); logger.debug("final mark: " + mark); - logger.debug("final userWeight: " + userWeight); logger.debug("final userMarks: " + userMarks); logger.debug("totalUserMarks: " + totalUserMarks); logger.debug("totalMarksPossible: " + totalMarksPossible); mcTempDataHolderDTO.setLearnerMark(new Integer(mark).toString()); - mcTempDataHolderDTO.setTotalUserWeight(new Integer(userWeight).toString()); mcTempDataHolderDTO.setTotalUserMark(new Integer(userMarks).toString()); mcTempDataHolderDTO.setTotalReportableUserMark(new Integer(totalUserMarks).toString()); mcTempDataHolderDTO.setTotalMarksPossible(new Integer(totalMarksPossible).toString()); Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/MonitoringUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/MonitoringUtil.java,v diff -u -r1.27 -r1.28 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/MonitoringUtil.java 10 Oct 2006 11:15:13 -0000 1.27 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/MonitoringUtil.java 15 Oct 2006 11:08:52 -0000 1.28 @@ -128,10 +128,7 @@ McMonitoredAnswersDTO mcMonitoredAnswersDTO= new McMonitoredAnswersDTO(); mcMonitoredAnswersDTO.setQuestionUid(mcQueContent.getUid().toString()); mcMonitoredAnswersDTO.setQuestion(mcQueContent.getQuestion()); - mcMonitoredAnswersDTO.setWeight(mcQueContent.getWeight().toString()); mcMonitoredAnswersDTO.setMark(mcQueContent.getMark().toString()); - - List listCandidateAnswers=mcService.findMcOptionNamesByQueId(mcQueContent.getUid()); logger.debug("listCandidateAnswers:..." + listCandidateAnswers); @@ -188,7 +185,6 @@ McMonitoredAnswersDTO mcMonitoredAnswersDTO= new McMonitoredAnswersDTO(); mcMonitoredAnswersDTO.setQuestionUid(mcQueContent.getUid().toString()); mcMonitoredAnswersDTO.setQuestion(mcQueContent.getQuestion()); - mcMonitoredAnswersDTO.setWeight(mcQueContent.getWeight().toString()); mcMonitoredAnswersDTO.setMark(mcQueContent.getMark().toString()); List listCandidateAnswers=mcService.findMcOptionNamesByQueId(mcQueContent.getUid()); @@ -509,7 +505,6 @@ } logger.debug("final isAttemptCorrect: " + isAttemptCorrect); logger.debug("mcUsrAttemptUser: " + mcUsrAttemptUser); - logger.debug("mcUsrAttemptUser weight: " + mcUsrAttemptUser.getMcQueContent().getWeight().toString()); if (isAttemptCorrect) { Index: lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/TestMcUsrAttempt.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/Attic/TestMcUsrAttempt.java,v diff -u -r1.8 -r1.9 --- lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/TestMcUsrAttempt.java 17 Sep 2006 06:23:44 -0000 1.8 +++ lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/TestMcUsrAttempt.java 15 Oct 2006 11:08:52 -0000 1.9 @@ -70,18 +70,15 @@ McQueUsr mcQueUsr=mcUserDAO.findMcUserById(TEST_MY_USER_ID); - McUsrAttempt mcUsrAttempt= new McUsrAttempt(new Long(33), new Date(System.currentTimeMillis()), - "Sydney", mcQueContent, mcQueUsr, mcOptionsContent ); McUsrAttempt mcUsrAttempt2= new McUsrAttempt(new Long(34), new Date(System.currentTimeMillis()), - "ACT", mcQueContent, mcQueUsr, mcOptionsContent