Index: lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McQueContent.hbm.xml =================================================================== diff -u -r8522cd628329e0031e21b48f2750b1fd9b1842a6 -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McQueContent.hbm.xml (.../McQueContent.hbm.xml) (revision 8522cd628329e0031e21b48f2750b1fd9b1842a6) +++ lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McQueContent.hbm.xml (.../McQueContent.hbm.xml) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -r8522cd628329e0031e21b48f2750b1fd9b1842a6 -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/db/sql/create_lams_tool_mc.sql (.../create_lams_tool_mc.sql) (revision 8522cd628329e0031e21b48f2750b1fd9b1842a6) +++ lams_tool_lamc/db/sql/create_lams_tool_mc.sql (.../create_lams_tool_mc.sql) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -r29061495077c3902e109677c6e7c0bb15723b544 -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/db/sql/tool_insert.sql (.../tool_insert.sql) (revision 29061495077c3902e109677c6e7c0bb15723b544) +++ lams_tool_lamc/db/sql/tool_insert.sql (.../tool_insert.sql) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -r81e4b129f71e63322c81c9016ec1ffa93f3c5944 -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McLearnerAnswersDTO.java (.../McLearnerAnswersDTO.java) (revision 81e4b129f71e63322c81c9016ec1ffa93f3c5944) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McLearnerAnswersDTO.java (.../McLearnerAnswersDTO.java) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -r81e4b129f71e63322c81c9016ec1ffa93f3c5944 -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McMonitoredAnswersDTO.java (.../McMonitoredAnswersDTO.java) (revision 81e4b129f71e63322c81c9016ec1ffa93f3c5944) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McMonitoredAnswersDTO.java (.../McMonitoredAnswersDTO.java) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -r8522cd628329e0031e21b48f2750b1fd9b1842a6 -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueContent.java (.../McQueContent.java) (revision 8522cd628329e0031e21b48f2750b1fd9b1842a6) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueContent.java (.../McQueContent.java) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUsrAttempt.java (.../McUsrAttempt.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUsrAttempt.java (.../McUsrAttempt.java) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -r9e404dff209b29c6df8b3e2e12a88077413d5095 -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java (.../McServicePOJO.java) (revision 9e404dff209b29c6df8b3e2e12a88077413d5095) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java (.../McServicePOJO.java) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -r993fec58a7198f31f151cf47d6ba331148ce4fae -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java (.../AuthoringUtil.java) (revision 993fec58a7198f31f151cf47d6ba331148ce4fae) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java (.../AuthoringUtil.java) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -rc3b793637eab6ae0c12968c3c07f9993c1ef6f16 -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java (.../LearningUtil.java) (revision c3b793637eab6ae0c12968c3c07f9993c1ef6f16) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java (.../LearningUtil.java) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -rdacf1ee355d21928e50734b6bb5d378ed4ce8f9b -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java (.../McLearningAction.java) (revision dacf1ee355d21928e50734b6bb5d378ed4ce8f9b) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java (.../McLearningAction.java) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -rc3b793637eab6ae0c12968c3c07f9993c1ef6f16 -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision c3b793637eab6ae0c12968c3c07f9993c1ef6f16) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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 =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r771dd93b9ea84cec2b55db5c66a5d187da0874c0 --- lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/TestMcUsrAttempt.java (.../TestMcUsrAttempt.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/TestMcUsrAttempt.java (.../TestMcUsrAttempt.java) (revision 771dd93b9ea84cec2b55db5c66a5d187da0874c0) @@ -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