Index: lams_contentrepository/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_contentrepository/build.xml,v diff -u -r1.28 -r1.28.2.1 --- lams_contentrepository/build.xml 7 Apr 2006 00:32:30 -0000 1.28 +++ lams_contentrepository/build.xml 12 Mar 2007 05:00:54 -0000 1.28.2.1 @@ -8,9 +8,6 @@ - - - Index: lams_tool_chat/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_chat/build.properties,v diff -u -r1.3 -r1.3.2.1 --- lams_tool_chat/build.properties 5 May 2006 00:31:11 -0000 1.3 +++ lams_tool_chat/build.properties 12 Mar 2007 05:05:13 -0000 1.3.2.1 @@ -2,8 +2,18 @@ # project-wide properties signature=lachat11 +# hide tool option +hideTool=false + +# language files package +language.files.package=org.lamsfoundation.lams.tool.chat + package=org/lamsfoundation/lams/tool/chat package.name=org.lamsfoundation.lams.tool.chat weblib=lib +tool.version=20070227 +# Minimum compatible version +min.server.version.number=2.0.200612051427 + Index: lams_tool_chat/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_chat/build.xml,v diff -u -r1.12 -r1.12.2.1 --- lams_tool_chat/build.xml 28 Sep 2006 23:29:57 -0000 1.12 +++ lams_tool_chat/build.xml 12 Mar 2007 05:05:13 -0000 1.12.2.1 @@ -81,9 +81,11 @@ + + @@ -342,15 +344,29 @@ - + + + + + + + + + + + + + + + @@ -372,6 +388,13 @@ + + + + + + + @@ -384,14 +407,18 @@ dbUsername="${db.username}" dbDriverUrl="${db.url}" dbDriverClass="com.mysql.jdbc.Driver" - deployFiles="${build.lib}/${product}.war,${build.lib}/${product}.jar" + deployFiles="${build.deploy}/${product}.war,${build.deploy}/${product}.jar" toolJarFileName="${product}.jar" - toolSignature="${signature}" - toolTablesScriptPath="${db.scripts}/create_lams_tool_chat.sql" - toolTablesDeleteScriptPath="${db.scripts}/drop_lams_tool_chat.sql" - toolActivityInsertScriptPath="${db.scripts}/activity_insert.sql" - toolLibraryInsertScriptPath="${db.scripts}/library_insert.sql" - toolInsertScriptPath="${db.scripts}/tool_insert.sql" + toolSignature="${signature}" + toolVersion="${tool.version}" + hideTool="${hideTool}" + minServerVersionNumber="${min.server.version.number}" + toolUpdateScriptPath="${build.deploy}/sql/updatescripts/updateTo${tool.version}.sql" + toolTablesScriptPath="${build.deploy}/sql/create_lams_tool_chat.sql" + toolTablesDeleteScriptPath="${build.deploy}/sql/drop_lams_tool_chat.sql" + toolActivityInsertScriptPath="${build.deploy}/sql/activity_insert.sql" + toolLibraryInsertScriptPath="${build.deploy}/sql/library_insert.sql" + toolInsertScriptPath="${build.deploy}/sql/tool_insert.sql" toolApplicationContextPath="/org/lamsfoundation/lams/tool/chat/chatApplicationContext.xml" lamsEarPath="${jboss.deploy}" toolContext="${toolContext}" toolWebUri="${product}.war" @@ -407,7 +434,7 @@ - + @@ -423,6 +450,10 @@ + + + Index: lams_tool_chat/.settings/org.eclipse.core.resources.prefs =================================================================== RCS file: /usr/local/cvsroot/lams_tool_chat/.settings/Attic/org.eclipse.core.resources.prefs,v diff -u -r1.1 -r1.1.2.1 --- lams_tool_chat/.settings/org.eclipse.core.resources.prefs 28 Mar 2006 02:15:07 -0000 1.1 +++ lams_tool_chat/.settings/org.eclipse.core.resources.prefs 12 Mar 2007 05:05:13 -0000 1.1.2.1 @@ -1,4 +1,3 @@ -#Wed Mar 22 11:10:51 EST 2006 +#Mon Mar 12 14:19:47 EST 2007 eclipse.preferences.version=1 encoding//conf/xdoclet/web-settings.xml=UTF-8 -encoding//web/WEB-INF/web.xml=UTF-8 Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `lams_tool_chat/conf/language/ApplicationResources_ar_JO.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3.2.1 refers to a dead (removed) revision in file `lams_tool_chat/conf/language/ApplicationResources_cy_GB.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3.2.1 refers to a dead (removed) revision in file `lams_tool_chat/conf/language/ApplicationResources_da_DK.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `lams_tool_chat/conf/language/ApplicationResources_de_DE.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `lams_tool_chat/conf/language/ApplicationResources_el_GR.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6.2.1 refers to a dead (removed) revision in file `lams_tool_chat/conf/language/ApplicationResources_es_ES.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3.2.1 refers to a dead (removed) revision in file `lams_tool_chat/conf/language/ApplicationResources_fr_FR.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4.2.1 refers to a dead (removed) revision in file `lams_tool_chat/conf/language/ApplicationResources_pl_PL.properties'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_chat/db/sql/tool_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_chat/db/sql/tool_insert.sql,v diff -u -r1.5 -r1.5.2.1 --- lams_tool_chat/db/sql/tool_insert.sql 8 Sep 2006 05:12:17 -0000 1.5 +++ lams_tool_chat/db/sql/tool_insert.sql 12 Mar 2007 05:05:12 -0000 1.5.2.1 @@ -25,7 +25,10 @@ moderation_url, help_url, language_file, -create_date_time +classpath_addition, +context_file, +create_date_time, +modified_date_time ) VALUES ( @@ -34,7 +37,7 @@ 'Chat', 'Chat', 'chat', -'1.1', +'@tool_version@', NULL, NULL, 0, @@ -52,5 +55,8 @@ 'tool/lachat11/moderate.do', 'http://wiki.lamsfoundation.org/display/lamsdocs/lachat11', 'org.lamsfoundation.lams.tool.chat.ApplicationResources', +'./lams-tool-lachat11.jar', +'/org/lamsfoundation/lams/tool/chat/chatApplicationContext.xml', +NOW(), NOW() ) Index: lams_tool_chat/db/sql/updatescripts/updateTo20070227.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_chat/db/sql/updatescripts/Attic/updateTo20070227.sql,v diff -u -r1.3 -r1.3.2.1 --- lams_tool_chat/db/sql/updatescripts/updateTo20070227.sql 8 Mar 2007 07:25:09 -0000 1.3 +++ lams_tool_chat/db/sql/updatescripts/updateTo20070227.sql 12 Mar 2007 05:05:13 -0000 1.3.2.1 @@ -1,4 +1,4 @@ -- Update the Notebook tables to 20070227 -- This is for the LAMS 2.0.1 release. -UPDATE lams_tool set modified_date_time = now(), classpath_addition = 'lams-tool-lachat11.jar', context_file = '/org/lamsfoundation/lams/tool/chat/chatApplicationContext.xml' where tool_signature = 'lachat11'; +UPDATE lams_tool set modified_date_time = now(), classpath_addition = './lams-tool-lachat11.jar', context_file = '/org/lamsfoundation/lams/tool/chat/chatApplicationContext.xml' where tool_signature = 'lachat11'; Index: lams_tool_forum/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/build.properties,v diff -u -r1.13 -r1.13.2.1 --- lams_tool_forum/build.properties 7 Sep 2005 23:40:32 -0000 1.13 +++ lams_tool_forum/build.properties 12 Mar 2007 05:05:25 -0000 1.13.2.1 @@ -9,4 +9,13 @@ ### project properties ### signature=lafrum11 project.displayname = lams forum tool +tool.version=20070227 +# hide tool option +hideTool=false + +# language files package +language.files.package=org.lamsfoundation.lams.tool.forum + +# Minimum compatible version +min.server.version.number=2.0.200612051427 Index: lams_tool_forum/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/build.xml,v diff -u -r1.43 -r1.43.2.1 --- lams_tool_forum/build.xml 28 Sep 2006 23:30:18 -0000 1.43 +++ lams_tool_forum/build.xml 12 Mar 2007 05:05:26 -0000 1.43.2.1 @@ -321,10 +321,25 @@ - - + + + + + + + + + + + + + + + + + @@ -343,6 +358,13 @@ + + + + + + + @@ -356,14 +378,18 @@ dbUsername="${db.username}" dbDriverUrl="${db.url}" dbDriverClass="com.mysql.jdbc.Driver" - deployFiles="${build.lib}/${product}.war,${build.lib}/${product}.jar" + deployFiles="${build.deploy}/${product}.war,${build.deploy}/${product}.jar" toolJarFileName="${product}.jar" toolSignature="${signature}" - toolTablesScriptPath="${db.scripts}/create_lams_tool_forum.sql" - toolTablesDeleteScriptPath="${db.scripts}/drop_lams_tool_forum.sql" - toolActivityInsertScriptPath="${db.scripts}/activity_insert.sql" - toolLibraryInsertScriptPath="${db.scripts}/library_insert.sql" - toolInsertScriptPath="${db.scripts}/tool_insert.sql" + toolVersion="${tool.version}" + hideTool="${hideTool}" + minServerVersionNumber="${min.server.version.number}" + toolUpdateScriptPath="${build.deploy}/sql/updatescripts/updateTo${tool.version}.sql" + toolTablesScriptPath="${build.deploy}/sql/create_lams_tool_forum.sql" + toolTablesDeleteScriptPath="${build.deploy}/sql/drop_lams_tool_forum.sql" + toolActivityInsertScriptPath="${build.deploy}/sql/activity_insert.sql" + toolLibraryInsertScriptPath="${build.deploy}/sql/library_insert.sql" + toolInsertScriptPath="${build.deploy}/sql/tool_insert.sql" toolApplicationContextPath="/org/lamsfoundation/lams/tool/forum/forumApplicationContext.xml" lamsEarPath="${jboss.deploy}" toolContext="${toolContext}" @@ -380,9 +406,7 @@ - - + @@ -400,6 +424,10 @@ + + + - Index: lams_tool_forum/web/jsps/learning/edit.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/learning/edit.jsp,v diff -u -r1.6 -r1.6.2.1 --- lams_tool_forum/web/jsps/learning/edit.jsp 28 Sep 2006 23:30:18 -0000 1.6 +++ lams_tool_forum/web/jsps/learning/edit.jsp 12 Mar 2007 05:05:25 -0000 1.6.2.1 @@ -1,5 +1,5 @@ <%@ include file="/common/taglibs.jsp"%> - + Index: lams_tool_forum/web/jsps/learning/reply.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/learning/reply.jsp,v diff -u -r1.7 -r1.7.2.1 --- lams_tool_forum/web/jsps/learning/reply.jsp 28 Sep 2006 23:30:18 -0000 1.7 +++ lams_tool_forum/web/jsps/learning/reply.jsp 12 Mar 2007 05:05:25 -0000 1.7.2.1 @@ -1,5 +1,5 @@ <%@ include file="/includes/taglibs.jsp"%> - + Index: lams_tool_lamc/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/build.properties,v diff -u -r1.4 -r1.4.4.1 --- lams_tool_lamc/build.properties 6 Dec 2005 14:51:20 -0000 1.4 +++ lams_tool_lamc/build.properties 12 Mar 2007 05:09:47 -0000 1.4.4.1 @@ -3,6 +3,18 @@ #name of this project signature=lamc11 +#version of this project +tool.version=20070214 + +# hide tool option +hideTool=false + +# language files package +language.files.package=org.lamsfoundation.lams.tool.mc + +# Minimum compatible version +min.server.version.number=2.0.200612051427 + #submit files package definition mc.package=org.lamsfoundation.lams.tool.mc mc.path=org/lamsfoundation/lams/tool/mc @@ -19,3 +31,4 @@ testweb=${basedir}/test/web testwebinf=${testweb}/WEB-INF + Index: lams_tool_lamc/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/build.xml,v diff -u -r1.33 -r1.33.4.1 --- lams_tool_lamc/build.xml 26 Oct 2006 01:00:38 -0000 1.33 +++ lams_tool_lamc/build.xml 12 Mar 2007 05:09:47 -0000 1.33.4.1 @@ -114,22 +114,15 @@ - + + + - - - - - - - - - - + @@ -327,9 +320,23 @@ - + + + + + + + + + + + + + + + @@ -348,6 +355,13 @@ + + + + + + + @@ -361,14 +375,18 @@ dbUsername="${db.username}" dbDriverUrl="${db.url}" dbDriverClass="com.mysql.jdbc.Driver" - deployFiles="${build.lib}/${product}.war,${build.lib}/${product}.jar" + deployFiles="${build.deploy}/${product}.war,${build.deploy}/${product}.jar" toolJarFileName="${product}.jar" toolSignature="${signature}" - toolTablesScriptPath="${db.scripts}/create_lams_tool_mc.sql" - toolTablesDeleteScriptPath="${db.scripts}/drop_lams_tool_mc.sql" - toolActivityInsertScriptPath="${db.scripts}/activity_insert.sql" - toolLibraryInsertScriptPath="${db.scripts}/library_insert.sql" - toolInsertScriptPath="${db.scripts}/tool_insert.sql" + toolVersion="${tool.version}" + hideTool="${hideTool}" + minServerVersionNumber="${min.server.version.number}" + toolUpdateScriptPath="${build.deploy}/sql/updatescripts/updateTo${tool.version}.sql" + toolTablesScriptPath="${build.deploy}/sql/create_lams_tool_mc.sql" + toolTablesDeleteScriptPath="${build.deploy}/sql/drop_lams_tool_mc.sql" + toolActivityInsertScriptPath="${build.deploy}/sql/activity_insert.sql" + toolLibraryInsertScriptPath="${build.deploy}/sql/library_insert.sql" + toolInsertScriptPath="${build.deploy}/sql/tool_insert.sql" toolApplicationContextPath="/org/lamsfoundation/lams/tool/mc/mcApplicationContext.xml" lamsEarPath="${jboss.deploy}" toolContext="${toolContext}" @@ -384,9 +402,7 @@ - - + @@ -405,6 +421,10 @@ + + + Index: lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McQueUsr.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/Attic/McQueUsr.hbm.xml,v diff -u -r1.9 -r1.9.4.1 --- lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McQueUsr.hbm.xml 23 Aug 2006 12:23:45 -0000 1.9 +++ lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McQueUsr.hbm.xml 12 Mar 2007 05:09:50 -0000 1.9.4.1 @@ -31,14 +31,14 @@ name="username" type="java.lang.String" column="username" - length="100" + length="255" > Fisheye: Tag 1.68.2.1 refers to a dead (removed) revision in file `lams_tool_lamc/conf/language/ApplicationResources.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.4.1 refers to a dead (removed) revision in file `lams_tool_lamc/conf/language/ApplicationResources_ar_JO.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.4.1 refers to a dead (removed) revision in file `lams_tool_lamc/conf/language/ApplicationResources_bg_BG.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5.2.1 refers to a dead (removed) revision in file `lams_tool_lamc/conf/language/ApplicationResources_cy_GB.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_tool_lamc/conf/language/ApplicationResources_en_AU.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.16.2.1 refers to a dead (removed) revision in file `lams_tool_lamc/conf/language/ApplicationResources_es_ES.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.14.2.1 refers to a dead (removed) revision in file `lams_tool_lamc/conf/language/ApplicationResources_ko_KR.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_tool_lamc/conf/language/ApplicationResources_mi_NZ.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.4.1 refers to a dead (removed) revision in file `lams_tool_lamc/conf/language/ApplicationResources_nl_BE.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `lams_tool_lamc/conf/language/ApplicationResources_pt_BR.properties'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_lamc/db/model/lams_tool_mc.clay =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/db/model/lams_tool_mc.clay,v diff -u -r1.38 -r1.38.4.1 --- lams_tool_lamc/db/model/lams_tool_mc.clay 17 Nov 2006 11:13:04 -0000 1.38 +++ lams_tool_lamc/db/model/lams_tool_mc.clay 12 Mar 2007 05:09:44 -0000 1.38.4.1 @@ -1,18 +1,18 @@ - - + + MCQ Tool for Lams 1.1 - + - + - + @@ -25,7 +25,7 @@ - + @@ -38,31 +38,31 @@ - + - + - + - + - + @@ -75,7 +75,7 @@ - + @@ -88,7 +88,7 @@ - + @@ -101,7 +101,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -127,19 +127,19 @@ - + - + - + @@ -152,7 +152,7 @@ - + @@ -165,7 +165,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -191,13 +191,13 @@ - + - + @@ -210,7 +210,7 @@ - + @@ -224,24 +224,24 @@ - + - + - + - + @@ -254,13 +254,13 @@ - + - + @@ -273,7 +273,7 @@ - + @@ -286,7 +286,7 @@ - + @@ -299,20 +299,20 @@ - + - + - + @@ -322,11 +322,11 @@ - + - + @@ -339,7 +339,7 @@ - + @@ -352,7 +352,7 @@ - + @@ -365,17 +365,17 @@ - + - + - + @@ -386,13 +386,13 @@ - + - + @@ -402,11 +402,11 @@ - + - + @@ -419,7 +419,7 @@ - + @@ -432,33 +432,33 @@ - + - + - + - + - + @@ -472,18 +472,18 @@ - + - + - + @@ -493,11 +493,11 @@ - + - + @@ -510,7 +510,7 @@ - + @@ -523,7 +523,7 @@ - + @@ -536,7 +536,7 @@ - + @@ -549,13 +549,13 @@ - + - + @@ -568,14 +568,14 @@ - + - + @@ -588,7 +588,7 @@ - + @@ -601,7 +601,7 @@ - + @@ -615,27 +615,27 @@ - + - + - + - + @@ -645,11 +645,11 @@ - + - + @@ -662,14 +662,14 @@ - + - + @@ -682,7 +682,7 @@ - + @@ -695,21 +695,21 @@ - + - + - + @@ -719,11 +719,11 @@ - + - + @@ -736,7 +736,7 @@ - + @@ -749,7 +749,7 @@ - + @@ -761,22 +761,22 @@ - - + + - - + + - + @@ -789,7 +789,7 @@ - + @@ -803,13 +803,13 @@ - + - + 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.21 -r1.21.4.1 --- lams_tool_lamc/db/sql/create_lams_tool_mc.sql 17 Nov 2006 11:13:05 -0000 1.21 +++ lams_tool_lamc/db/sql/create_lams_tool_mc.sql 12 Mar 2007 05:09:45 -0000 1.21.4.1 @@ -67,8 +67,8 @@ 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) + , username VARCHAR(255) + , fullname VARCHAR(255) , responseFinalised TINYINT(1) NOT NULL DEFAULT 0 , viewSummaryRequested TINYINT(1) NOT NULL DEFAULT 0 , PRIMARY KEY (uid) 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.20 -r1.20.4.1 --- lams_tool_lamc/db/sql/tool_insert.sql 14 Nov 2006 20:11:27 -0000 1.20 +++ lams_tool_lamc/db/sql/tool_insert.sql 12 Mar 2007 05:09:45 -0000 1.20.4.1 @@ -25,7 +25,10 @@ moderation_url, help_url, language_file, -create_date_time +classpath_addition, +context_file, +create_date_time, +modified_date_time ) VALUES ( @@ -34,7 +37,7 @@ 'MCQ', 'Multiple Choice Questions', 'mc', -'20061113', +'@tool_version@', NULL, NULL, 0, @@ -52,5 +55,7 @@ 'tool/lamc11/monitoringStarter.do', 'http://wiki.lamsfoundation.org/display/lamsdocs/lamc11', 'org.lamsfoundation.lams.tool.mc.ApplicationResources', -NOW() -) +'./lams-tool-lamc11.jar', +'/org/lamsfoundation/lams/tool/mc/mcApplicationContext.xml', +NOW(), +NOW()) 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.46 -r1.46.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java 17 Dec 2006 12:37:34 -0000 1.46 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java 12 Mar 2007 05:09:44 -0000 1.46.2.1 @@ -91,12 +91,12 @@ logger.debug("learnerProgress: " + learnerProgress); mcLearningForm.setLearnerProgress(learnerProgress); logger.debug("form is populated with learnerProgress"); + String learnerProgressUserId=request.getParameter("learnerProgressUserId"); + logger.debug("learnerProgressUserId: " + learnerProgressUserId); + mcLearningForm.setLearnerProgressUserId(learnerProgressUserId); + } - String learnerProgressUserId=request.getParameter("learnerProgressUserId"); - logger.debug("learnerProgressUserId: " + learnerProgressUserId); - mcLearningForm.setLearnerProgressUserId(learnerProgressUserId); - String questionListingMode=request.getParameter("questionListingMode"); logger.debug("questionListingMode: " + questionListingMode); mcLearningForm.setQuestionListingMode(questionListingMode); Index: lams_tool_lamc/web/learning/ViewAnswers.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/ViewAnswers.jsp,v diff -u -r1.50 -r1.50.4.1 --- lams_tool_lamc/web/learning/ViewAnswers.jsp 4 Dec 2006 16:45:58 -0000 1.50 +++ lams_tool_lamc/web/learning/ViewAnswers.jsp 12 Mar 2007 05:09:45 -0000 1.50.4.1 @@ -181,17 +181,39 @@ - - - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -209,13 +231,10 @@ - - - - - - - + + + + @@ -229,37 +248,16 @@ - + + - - - - - - - - - - - - - - - - - - - - - - - - + - + + @@ -270,9 +268,9 @@ + - Index: lams_tool_laqa/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/build.properties,v diff -u -r1.18 -r1.18.2.1 --- lams_tool_laqa/build.properties 29 Jun 2006 00:41:25 -0000 1.18 +++ lams_tool_laqa/build.properties 12 Mar 2007 05:10:28 -0000 1.18.2.1 @@ -3,6 +3,18 @@ #name of this project signature=laqa11 +#version of this project +tool.version=20070214 + +# hide tool option +hideTool=false + +# Language files package +language.files.package=org.lamsfoundation.lams.tool.qa + +# Minimum compatible version +min.server.version.number=2.0.200612051427 + #submit files package definition qa.package=org.lamsfoundation.lams.tool.qa qa.path=org/lamsfoundation/lams/tool/qa Index: lams_tool_laqa/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/build.xml,v diff -u -r1.33 -r1.33.2.1 --- lams_tool_laqa/build.xml 21 Dec 2006 04:22:05 -0000 1.33 +++ lams_tool_laqa/build.xml 12 Mar 2007 05:10:25 -0000 1.33.2.1 @@ -100,22 +100,15 @@ - + + + - - - - - - - - - - + @@ -320,9 +313,23 @@ - + + + + + + + + + + + + + + + @@ -341,6 +348,13 @@ + + + + + + + @@ -354,14 +368,18 @@ dbUsername="${db.username}" dbDriverUrl="${db.url}" dbDriverClass="com.mysql.jdbc.Driver" - deployFiles="${build.lib}/${product}.war,${build.lib}/${product}.jar" + deployFiles="${build.deploy}/${product}.war,${build.deploy}/${product}.jar" toolJarFileName="${product}.jar" toolSignature="${signature}" - toolTablesScriptPath="${db.scripts}/create_lams_tool_qa.sql" - toolTablesDeleteScriptPath="${db.scripts}/drop_lams_tool_qa.sql" - toolActivityInsertScriptPath="${db.scripts}/activity_insert.sql" - toolLibraryInsertScriptPath="${db.scripts}/library_insert.sql" - toolInsertScriptPath="${db.scripts}/tool_insert.sql" + toolVersion="${tool.version}" + hideTool="${hideTool}" + minServerVersionNumber="${min.server.version.number}" + toolUpdateScriptPath="${build.deploy}/sql/updatescripts/updateTo${tool.version}.sql" + toolTablesScriptPath="${build.deploy}/sql/create_lams_tool_qa.sql" + toolTablesDeleteScriptPath="${build.deploy}/sql/drop_lams_tool_qa.sql" + toolActivityInsertScriptPath="${build.deploy}/sql/activity_insert.sql" + toolLibraryInsertScriptPath="${build.deploy}/sql/library_insert.sql" + toolInsertScriptPath="${build.deploy}/sql/tool_insert.sql" toolApplicationContextPath="/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml" lamsEarPath="${jboss.deploy}" @@ -394,8 +412,7 @@ - + @@ -414,6 +431,10 @@ + + + Index: lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaQueUsr.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaQueUsr.hbm.xml,v diff -u -r1.3 -r1.3.2.1 --- lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaQueUsr.hbm.xml 24 Aug 2006 08:43:34 -0000 1.3 +++ lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaQueUsr.hbm.xml 12 Mar 2007 05:10:24 -0000 1.3.2.1 @@ -31,14 +31,14 @@ name="username" type="java.lang.String" column="username" - length="100" + length="255" > Fisheye: Tag 1.53.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_ar_JO.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_cy_GB.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_da_DK.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_el_GR.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_en_AU.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.10.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_es_ES.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.7.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_fr_FR.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.10.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_ko_KR.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_mi_NZ.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.11.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_no_NO.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_pt_BR.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6.2.1 refers to a dead (removed) revision in file `lams_tool_laqa/conf/language/ApplicationResources_sv_SE.properties'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/db/model/lams_tool_qa.clay =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/db/model/lams_tool_qa.clay,v diff -u -r1.25 -r1.25.2.1 --- lams_tool_laqa/db/model/lams_tool_qa.clay 13 Nov 2006 19:38:45 -0000 1.25 +++ lams_tool_laqa/db/model/lams_tool_qa.clay 12 Mar 2007 05:10:33 -0000 1.25.2.1 @@ -1,18 +1,18 @@ - - + + QA Tool for Lams 1.1 - + - + - + @@ -25,7 +25,7 @@ - + @@ -38,33 +38,33 @@ - + - + - + - + - + @@ -78,13 +78,13 @@ - + - + @@ -94,11 +94,11 @@ - + - + @@ -111,7 +111,7 @@ - + @@ -124,31 +124,31 @@ - + - + - + - + - + @@ -161,7 +161,7 @@ - + @@ -174,7 +174,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -200,7 +200,7 @@ - + @@ -213,7 +213,7 @@ - + @@ -226,7 +226,7 @@ - + @@ -239,19 +239,19 @@ - + - + - + @@ -264,13 +264,13 @@ - + - + @@ -283,10 +283,10 @@ - + - + @@ -297,19 +297,19 @@ - + - - + + - + @@ -322,7 +322,7 @@ - + @@ -334,15 +334,15 @@ - - + + - + @@ -355,7 +355,7 @@ - + @@ -367,15 +367,15 @@ - - + + - + @@ -389,13 +389,13 @@ - + - + @@ -405,11 +405,11 @@ - + - + @@ -422,19 +422,19 @@ - + - + - + @@ -447,7 +447,7 @@ - + @@ -461,13 +461,13 @@ - + - + @@ -477,11 +477,11 @@ - + - + @@ -494,7 +494,7 @@ - + @@ -507,26 +507,26 @@ - + - + - + - + @@ -539,7 +539,7 @@ - + @@ -552,7 +552,7 @@ - + @@ -566,20 +566,20 @@ - + - + - + @@ -589,11 +589,11 @@ - + - + @@ -606,14 +606,14 @@ - + - + @@ -626,14 +626,14 @@ - + - + @@ -647,13 +647,13 @@ - + - + Index: lams_tool_laqa/db/sql/create_lams_tool_qa.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/db/sql/create_lams_tool_qa.sql,v diff -u -r1.45 -r1.45.2.1 --- lams_tool_laqa/db/sql/create_lams_tool_qa.sql 13 Nov 2006 19:38:47 -0000 1.45 +++ lams_tool_laqa/db/sql/create_lams_tool_qa.sql 12 Mar 2007 05:10:24 -0000 1.45.2.1 @@ -38,10 +38,10 @@ CREATE TABLE tl_laqa11_que_usr ( uid BIGINT(20) NOT NULL AUTO_INCREMENT , que_usr_id BIGINT(20) NOT NULL - , username VARCHAR(100) + , username VARCHAR(255) , responseFinalized TINYINT(1) NOT NULL DEFAULT 0 , qa_session_id BIGINT(20) NOT NULL - , fullname VARCHAR(100) + , fullname VARCHAR(255) , learnerFinished TINYINT(1) NOT NULL , PRIMARY KEY (uid) , INDEX (qa_session_id) Index: lams_tool_laqa/db/sql/tool_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/db/sql/tool_insert.sql,v diff -u -r1.23 -r1.23.2.1 --- lams_tool_laqa/db/sql/tool_insert.sql 13 Nov 2006 07:02:57 -0000 1.23 +++ lams_tool_laqa/db/sql/tool_insert.sql 12 Mar 2007 05:10:24 -0000 1.23.2.1 @@ -46,7 +46,10 @@ moderation_url, help_url, language_file, -create_date_time +classpath_addition, +context_file, +create_date_time, +modified_date_time ) VALUES ( @@ -55,7 +58,7 @@ 'Question and Answer', 'Q/A Tool', 'qa', -'20061113', +'@tool_version@', NULL, NULL, 0, @@ -73,5 +76,8 @@ 'tool/laqa11/monitoringStarter.do', 'http://wiki.lamsfoundation.org/display/lamsdocs/laqa11', 'org.lamsfoundation.lams.tool.qa.ApplicationResources', +'./lams-tool-laqa11.jar', +'/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml', +NOW(), NOW() ) Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java,v diff -u -r1.11 -r1.11.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java 3 Dec 2006 14:58:03 -0000 1.11 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java 12 Mar 2007 05:10:32 -0000 1.11.2.1 @@ -114,7 +114,7 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(content); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - qaMonitoringAction.refreshSummaryData(request, content, qaService, true, true, toolSessionID.toString(), + qaMonitoringAction.refreshSummaryData(request, content, qaService, content.isUsernameVisible(), true, toolSessionID.toString(), userID.toString(), generalLearnerFlowDTO, false, toolSessionID.toString()); logger.debug("end refreshSummaryData for learner mode."); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/Attic/MonitoringUtil.java,v diff -u -r1.39 -r1.39.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java 3 Dec 2006 14:58:02 -0000 1.39 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java 12 Mar 2007 05:10:33 -0000 1.39.2.1 @@ -23,6 +23,7 @@ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; +import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -202,6 +203,9 @@ * ends up populating the attempt history for all the users of all the tool sessions for a content * buildGroupsQuestionData(HttpServletRequest request, McContent mcContent) * + * User id is needed if isUserNamesVisible is false && is learnerRequest = true, + * as it is required to work out if the data being analysed is the current user. + * * @param request * @param mcContent * @return List @@ -260,7 +264,10 @@ return listMonitoredAnswersContainerDTO; } - + /** User id is needed if learnerRequest = true, as it is required to work out if the data being + * analysed is the current user (for not show other names) or to work out which is the user's answers + * (for not show all answers). + */ public static Map buildGroupsAttemptData(HttpServletRequest request, QaContent qaContent, IQaService qaService, QaQueContent qaQueContent, String questionUid, boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId) { @@ -329,33 +336,26 @@ } else { - /*request is for learner report, use only the passed tool session in the report*/ + /*request is for learner report, use only the passed tool session in the report. */ logger.debug("using currentSessionId for the learner report:" + currentSessionId); - while (itMap.hasNext()) + QaSession qaSession= qaService.retrieveQaSession(new Long(currentSessionId).longValue()); + logger.debug("qaSession: " + " = " + qaSession); + if (qaSession != null) { - Map.Entry pairs = (Map.Entry)itMap.next(); - logger.debug("using the summary tool sessions pair: " + pairs.getKey() + " = " + pairs.getValue()); - - if (!(pairs.getValue().toString().equals("None")) && !(pairs.getValue().toString().equals("All"))) - { - logger.debug("using the numerical summary tool sessions pair: " + " = " + pairs.getValue()); - - if (currentSessionId.equals(pairs.getValue())) - { - logger.debug("only using this tool session for the learner report: " + " = " + pairs.getValue()); - QaSession qaSession= qaService.retrieveQaSession(new Long(pairs.getValue().toString()).longValue()); - logger.debug("qaSession: " + " = " + qaSession); - if (qaSession != null) - { - List listUsers=qaService.getUserBySessionOnly(qaSession); - logger.debug("listQaUsers for session id:" + qaSession.getQaSessionId() + " = " + listUsers); - Map sessionUsersAttempts=populateSessionUsersAttempts(request, qaService, qaSession.getQaSessionId(), listUsers, questionUid, - isUserNamesVisible, isLearnerRequest, userId); - listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); - } - } - } - } + List listUsers=null; + if ( qaContent.isShowOtherAnswers() ) { + listUsers = qaService.getUserBySessionOnly(qaSession); + } else { + listUsers = new ArrayList(); + QaQueUsr currentUser = qaService.getQaUserBySession(new Long(userId).longValue(),qaSession.getUid()); + if ( currentUser != null ) + listUsers.add(currentUser); + } + logger.debug("listQaUsers for session id:" + qaSession.getQaSessionId() + " = " + listUsers); + Map sessionUsersAttempts=populateSessionUsersAttempts(request, qaService, qaSession.getQaSessionId(), listUsers, questionUid, + isUserNamesVisible, isLearnerRequest, userId); + listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); + } } logger.debug("final listMonitoredAttemptsContainerDTO:..." + listMonitoredAttemptsContainerDTO); @@ -366,8 +366,10 @@ /** - * ends up populating all the user's attempt data of a particular tool session + * Populates all the user's attempt data of a particular tool session * populateSessionUsersAttempts(HttpServletRequest request,List listUsers) + * User id is needed if isUserNamesVisible is false && is learnerRequest = true, + * as it is required to work out if the data being analysed is the current user. * * @param request * @param listUsers @@ -386,218 +388,56 @@ Map mapMonitoredUserContainerDTO= new TreeMap(new QaStringComparator()); List listMonitoredUserContainerDTO= new LinkedList(); Iterator itUsers=listUsers.iterator(); - - - if (userId == null) + + while (itUsers.hasNext()) { - logger.debug("request is not for learner progress report"); - if ((isUserNamesVisible) && (!isLearnerRequest)) - { - logger.debug("isUserNamesVisible true, isLearnerRequest false" ); - logger.debug("getting alll the user' data"); - while (itUsers.hasNext()) - { - QaQueUsr qaQueUsr=(QaQueUsr)itUsers.next(); - logger.debug("qaQueUsr: " + qaQueUsr); - - if (qaQueUsr != null) - { - logger.debug("getting listUserAttempts for user id: " + qaQueUsr.getUid() + " and que content id: " + questionUid); - List listUserAttempts=qaService.getAttemptsForUserAndQuestionContent(qaQueUsr.getUid(), new Long(questionUid)); - logger.debug("listUserAttempts: " + listUserAttempts); - - Iterator itAttempts=listUserAttempts.iterator(); - while (itAttempts.hasNext()) - { - QaUsrResp qaUsrResp=(QaUsrResp)itAttempts.next(); - logger.debug("qaUsrResp: " + qaUsrResp); - - if (qaUsrResp != null) - { - QaMonitoredUserDTO qaMonitoredUserDTO = new QaMonitoredUserDTO(); - qaMonitoredUserDTO.setAttemptTime(qaUsrResp.getAttemptTime()); - qaMonitoredUserDTO.setTimeZone(qaUsrResp.getTimezone()); - qaMonitoredUserDTO.setUid(qaUsrResp.getResponseId().toString()); - qaMonitoredUserDTO.setUserName(qaQueUsr.getFullname()); - qaMonitoredUserDTO.setQueUsrId(qaQueUsr.getUid().toString()); - qaMonitoredUserDTO.setSessionId(sessionId.toString()); - qaMonitoredUserDTO.setResponse(qaUsrResp.getAnswer()); - - String responsePresentable=QaUtils.replaceNewLines(qaUsrResp.getAnswer()); - logger.debug("responsePresentable: " + responsePresentable); - qaMonitoredUserDTO.setResponsePresentable(responsePresentable); - - qaMonitoredUserDTO.setQuestionUid(questionUid); - qaMonitoredUserDTO.setVisible(new Boolean(qaUsrResp.isVisible()).toString()); - listMonitoredUserContainerDTO.add(qaMonitoredUserDTO); - } - } - } - } - } - else if ((isUserNamesVisible) && (isLearnerRequest)) - { - logger.debug("just populating data normally just like monitoring summary, except that the data is ony for a specific session" ); - logger.debug("isUserNamesVisible true, isLearnerRequest true" ); + QaQueUsr qaQueUsr=(QaQueUsr)itUsers.next(); + logger.debug("qaQueUsr: " + qaQueUsr); + + if (qaQueUsr != null) + { + logger.debug("getting listUserAttempts for user id: " + qaQueUsr.getUid() + " and que content id: " + questionUid); + List listUserAttempts=qaService.getAttemptsForUserAndQuestionContent(qaQueUsr.getUid(), new Long(questionUid)); + logger.debug("listUserAttempts: " + listUserAttempts); - String userID = QaUtils.getCurrentLearnerID(); - logger.debug("userID: " + userID); - QaQueUsr qaQueUsr=qaService.getQaQueUsrById(new Long(userID).longValue()); - logger.debug("the current user qaQueUsr " + qaQueUsr + " and username: " + qaQueUsr.getUsername()); - - while (itUsers.hasNext()) - { - qaQueUsr=(QaQueUsr)itUsers.next(); - logger.debug("qaQueUsr: " + qaQueUsr); - - if (qaQueUsr != null) - { - logger.debug("getting listUserAttempts for user id: " + qaQueUsr.getUid() + " and que content id: " + questionUid); - List listUserAttempts=qaService.getAttemptsForUserAndQuestionContent(qaQueUsr.getUid(), new Long(questionUid)); - logger.debug("listUserAttempts: " + listUserAttempts); - - Iterator itAttempts=listUserAttempts.iterator(); - while (itAttempts.hasNext()) - { - QaUsrResp qaUsrResp=(QaUsrResp)itAttempts.next(); - logger.debug("qaUsrResp: " + qaUsrResp); - - if (qaUsrResp != null) - { - QaMonitoredUserDTO qaMonitoredUserDTO = new QaMonitoredUserDTO(); - qaMonitoredUserDTO.setAttemptTime(qaUsrResp.getAttemptTime()); - qaMonitoredUserDTO.setTimeZone(qaUsrResp.getTimezone()); - qaMonitoredUserDTO.setUid(qaUsrResp.getResponseId().toString()); - qaMonitoredUserDTO.setUserName(qaQueUsr.getFullname()); - qaMonitoredUserDTO.setQueUsrId(qaQueUsr.getUid().toString()); - qaMonitoredUserDTO.setSessionId(sessionId.toString()); - qaMonitoredUserDTO.setResponse(qaUsrResp.getAnswer()); - - String responsePresentable=QaUtils.replaceNewLines(qaUsrResp.getAnswer()); - logger.debug("responsePresentable: " + responsePresentable); - qaMonitoredUserDTO.setResponsePresentable(responsePresentable); - - qaMonitoredUserDTO.setQuestionUid(questionUid); - qaMonitoredUserDTO.setVisible(new Boolean(qaUsrResp.isVisible()).toString()); - listMonitoredUserContainerDTO.add(qaMonitoredUserDTO); - } - } - } - } - } - else if ((!isUserNamesVisible) && (isLearnerRequest)) - { - logger.debug("populating data normally exception are for a specific session and other user names are not visible."); - logger.debug("isUserNamesVisible false, isLearnerRequest true" ); - logger.debug("getting only current user's data" ); + Iterator itAttempts=listUserAttempts.iterator(); + while (itAttempts.hasNext()) + { + QaUsrResp qaUsrResp=(QaUsrResp)itAttempts.next(); + logger.debug("qaUsrResp: " + qaUsrResp); + + if (qaUsrResp != null) + { + QaMonitoredUserDTO qaMonitoredUserDTO = new QaMonitoredUserDTO(); + qaMonitoredUserDTO.setAttemptTime(qaUsrResp.getAttemptTime()); + qaMonitoredUserDTO.setTimeZone(qaUsrResp.getTimezone()); + qaMonitoredUserDTO.setUid(qaUsrResp.getResponseId().toString()); + + if (!isUserNamesVisible && isLearnerRequest && + !userId.equals(qaQueUsr.getQueUsrId().toString()) ) { + logger.debug("this is not current user, put his name as blank."); + qaMonitoredUserDTO.setUserName(" "); + } else { + logger.debug("this is current user, put his name normally."); + qaMonitoredUserDTO.setUserName(qaQueUsr.getFullname()); + } + + qaMonitoredUserDTO.setQueUsrId(qaQueUsr.getUid().toString()); + qaMonitoredUserDTO.setSessionId(sessionId.toString()); + qaMonitoredUserDTO.setResponse(qaUsrResp.getAnswer()); + + String responsePresentable=QaUtils.replaceNewLines(qaUsrResp.getAnswer()); + logger.debug("responsePresentable: " + responsePresentable); + qaMonitoredUserDTO.setResponsePresentable(responsePresentable); - String userID = QaUtils.getCurrentLearnerID(); - logger.debug("userID: " + userID); - - while (itUsers.hasNext()) - { - QaQueUsr qaQueUsr=(QaQueUsr)itUsers.next(); - logger.debug("qaQueUsr: " + qaQueUsr); - - if (qaQueUsr != null) - { - logger.debug("getting listUserAttempts for user id: " + qaQueUsr.getUid() + " and que content id: " + questionUid); - List listUserAttempts=qaService.getAttemptsForUserAndQuestionContent(qaQueUsr.getUid(), new Long(questionUid)); - logger.debug("listUserAttempts: " + listUserAttempts); - - Iterator itAttempts=listUserAttempts.iterator(); - while (itAttempts.hasNext()) - { - QaUsrResp qaUsrResp=(QaUsrResp)itAttempts.next(); - logger.debug("qaUsrResp: " + qaUsrResp); - - if (qaUsrResp != null) - { - QaMonitoredUserDTO qaMonitoredUserDTO = new QaMonitoredUserDTO(); - qaMonitoredUserDTO.setAttemptTime(qaUsrResp.getAttemptTime()); - qaMonitoredUserDTO.setTimeZone(qaUsrResp.getTimezone()); - qaMonitoredUserDTO.setUid(qaUsrResp.getResponseId().toString()); - - logger.debug("userID versus queUsrId: " + userID + "-" + qaQueUsr.getQueUsrId()); - if (userID.equals(qaQueUsr.getQueUsrId().toString())) - { - logger.debug("this is current user, put his name normally."); - qaMonitoredUserDTO.setUserName(qaQueUsr.getFullname()); - } - else - { - logger.debug("this is not current user, put his name as blank."); - qaMonitoredUserDTO.setUserName(" "); - } - - qaMonitoredUserDTO.setQueUsrId(qaQueUsr.getUid().toString()); - qaMonitoredUserDTO.setSessionId(sessionId.toString()); - qaMonitoredUserDTO.setResponse(qaUsrResp.getAnswer()); - - String responsePresentable=QaUtils.replaceNewLines(qaUsrResp.getAnswer()); - logger.debug("responsePresentable: " + responsePresentable); - qaMonitoredUserDTO.setResponsePresentable(responsePresentable); - - qaMonitoredUserDTO.setQuestionUid(questionUid); - qaMonitoredUserDTO.setVisible(new Boolean(qaUsrResp.isVisible()).toString()); - listMonitoredUserContainerDTO.add(qaMonitoredUserDTO); - } - } - } - } - } + qaMonitoredUserDTO.setQuestionUid(questionUid); + qaMonitoredUserDTO.setVisible(new Boolean(qaUsrResp.isVisible()).toString()); + listMonitoredUserContainerDTO.add(qaMonitoredUserDTO); + } + } + } } - else - { - logger.debug("request is for learner progress report: " + userId); - while (itUsers.hasNext()) - { - QaQueUsr qaQueUsr=(QaQueUsr)itUsers.next(); - logger.debug("qaQueUsr: " + qaQueUsr); - - if (qaQueUsr != null) - { - logger.debug("getting listUserAttempts for user id: " + qaQueUsr.getUid() + " and que content id: " + questionUid); - List listUserAttempts=qaService.getAttemptsForUserAndQuestionContent(qaQueUsr.getUid(), new Long(questionUid)); - logger.debug("listUserAttempts: " + listUserAttempts); - - Iterator itAttempts=listUserAttempts.iterator(); - while (itAttempts.hasNext()) - { - QaUsrResp qaUsrResp=(QaUsrResp)itAttempts.next(); - logger.debug("qaUsrResp: " + qaUsrResp); - - if (qaUsrResp != null) - { - logger.debug("userID versus queUsrId: " + userId + "-" + qaQueUsr.getQueUsrId()); - if (userId.equals(qaQueUsr.getQueUsrId().toString())) - { - logger.debug("this is the user requested , include his name for learner progress."); - QaMonitoredUserDTO qaMonitoredUserDTO = new QaMonitoredUserDTO(); - qaMonitoredUserDTO.setAttemptTime(qaUsrResp.getAttemptTime()); - qaMonitoredUserDTO.setTimeZone(qaUsrResp.getTimezone()); - qaMonitoredUserDTO.setUid(qaUsrResp.getResponseId().toString()); - qaMonitoredUserDTO.setUserName(qaQueUsr.getFullname()); - qaMonitoredUserDTO.setQueUsrId(qaQueUsr.getUid().toString()); - qaMonitoredUserDTO.setSessionId(sessionId.toString()); - qaMonitoredUserDTO.setResponse(qaUsrResp.getAnswer()); - - String responsePresentable=QaUtils.replaceNewLines(qaUsrResp.getAnswer()); - logger.debug("responsePresentable: " + responsePresentable); - qaMonitoredUserDTO.setResponsePresentable(responsePresentable); - - qaMonitoredUserDTO.setQuestionUid(questionUid); - qaMonitoredUserDTO.setVisible(new Boolean(qaUsrResp.isVisible()).toString()); - listMonitoredUserContainerDTO.add(qaMonitoredUserDTO); - } - } - } - } - } - - } - logger.debug("final listMonitoredUserContainerDTO: " + listMonitoredUserContainerDTO); mapMonitoredUserContainerDTO=convertToMcMonitoredUserDTOMap(listMonitoredUserContainerDTO); logger.debug("final mapMonitoredUserContainerDTO:..." + mapMonitoredUserContainerDTO); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java,v diff -u -r1.32 -r1.32.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 26 Nov 2006 22:25:37 -0000 1.32 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 12 Mar 2007 05:10:32 -0000 1.32.2.1 @@ -552,6 +552,11 @@ /** + * Stores all results and moves onto the next step. + * If view other users answers = true, then goes to the + * view all answers screen, otherwise goes straight + * to the reflection screen (if any). + * * returns Learner Report for a session * ActionForward viewAllResults(ActionMapping mapping, ActionForm form, @@ -567,7 +572,7 @@ * @throws IOException * @throws ServletException */ - public ActionForward viewAllResults(ActionMapping mapping, + public ActionForward storeAllResults(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, @@ -627,12 +632,23 @@ learningUtil.setContentInUse(new Long(toolContentID).longValue(), qaService); logger.debug("content has been set in use"); - logger.debug("start generating learning report..."); + if ( qaContent.isShowOtherAnswers() ) { + return prepareViewAllAnswers(mapping, request, qaLearningForm, qaService, toolSessionID, userID, qaSession, toolContentID, qaContent, generalLearnerFlowDTO, isUserNamesVisible); + } else if ( qaContent.isReflect() ) { + return forwardtoReflection(mapping, request, qaContent, qaService, toolSessionID, userID, qaLearningForm); + } else { + return endLearning(mapping, qaLearningForm, request, response); + } + } + + /** Set up the data for the view all answers screen */ + private ActionForward prepareViewAllAnswers(ActionMapping mapping, HttpServletRequest request, QaLearningForm qaLearningForm, IQaService qaService, String toolSessionID, String userID, QaSession qaSession, String toolContentID, QaContent qaContent, GeneralLearnerFlowDTO generalLearnerFlowDTO, boolean isUserNamesVisible) { + logger.debug("start generating learning report..."); logger.debug("toolContentID: " + toolContentID); QaMonitoringAction qaMonitoringAction= new QaMonitoringAction(); - qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, toolSessionID, null, + qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, toolSessionID, userID, generalLearnerFlowDTO, false , toolSessionID); generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); @@ -787,7 +803,8 @@ QaMonitoringAction qaMonitoringAction= new QaMonitoringAction(); - qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, toolSessionID, null, + qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, + toolSessionID, userID, generalLearnerFlowDTO, false , toolSessionID); generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); @@ -1261,7 +1278,7 @@ QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); logger.debug("using generalLearnerFlowDTO: " + generalLearnerFlowDTO); qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, - toolSessionID, null, generalLearnerFlowDTO, false, toolSessionID); + toolSessionID, userID, generalLearnerFlowDTO, false, toolSessionID); logger.debug("final generalLearnerFlowDTO: " + generalLearnerFlowDTO); @@ -1440,7 +1457,13 @@ String userID=request.getParameter("userID"); logger.debug("userID: " + userID); qaLearningForm.setUserID(userID); - + + return forwardtoReflection(mapping, request, qaContent, qaService, toolSessionID, userID, qaLearningForm) ; + } + + private ActionForward forwardtoReflection(ActionMapping mapping, HttpServletRequest request, + QaContent qaContent, IQaService qaService, String toolSessionID, + String userID, QaLearningForm qaLearningForm) { GeneralLearnerFlowDTO generalLearnerFlowDTO= new GeneralLearnerFlowDTO(); generalLearnerFlowDTO.setActivityTitle(qaContent.getTitle()); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java,v diff -u -r1.67 -r1.67.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java 26 Nov 2006 22:25:37 -0000 1.67 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java 12 Mar 2007 05:10:33 -0000 1.67.2.1 @@ -56,6 +56,7 @@ import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.SessionMap; @@ -233,6 +234,7 @@ logger.debug("error during validation"); } + // this is the user id of the current user, set up in validateParameters String userID=qaLearningForm.getUserID(); logger.debug("userID: " + userID); @@ -447,38 +449,39 @@ /* by now, we know that the mode is either teacher or learner * check if the mode is teacher and request is for Learner Progress */ - logger.debug("userID: " + userID); - String learnerProgressUserId=request.getParameter(USER_ID); - logger.debug("learnerProgressUserId: " + learnerProgressUserId); + logger.debug("current userID: " + userID); + String learnerProgressUserIdString = WebUtil.readStrParam(request, AttributeNames.PARAM_USER_ID, true); + logger.debug("learnerProgressUserId: " + learnerProgressUserIdString); - if ((learnerProgressUserId != null) && (mode.equals("teacher"))) + if ((learnerProgressUserIdString != null) && (mode.equals("teacher"))) { logger.debug("start generating learner progress report for toolSessionID: " + toolSessionID); - - /* the report should have only this user's entries(with userId)*/ + + /* the report should have the all entries for the users in this tool session, + * and display under the "my answers" section the answers for the user id in the url */ + qaLearningForm.setUserID(learnerProgressUserIdString); + Long learnerProgressUserId = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); QaMonitoringAction qaMonitoringAction= new QaMonitoringAction(); logger.debug("using generalLearnerFlowDTO: " + generalLearnerFlowDTO); generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); generalLearnerFlowDTO.setTeacherViewOnly(new Boolean(true).toString()); - qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, true, true, toolSessionID, learnerProgressUserId, + qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, qaContent.isUsernameVisible(), true, + toolSessionID, learnerProgressUserIdString, generalLearnerFlowDTO, false, toolSessionID); logger.debug("presenting teacher's report"); - - HttpSession ss = SessionManager.getSession(); - /* get back login user DTO */ - UserDTO toolUser = (UserDTO) ss.getAttribute(AttributeNames.USER); - Long userId=new Long(toolUser.getUserID().longValue()); + QaQueUsr qaQueUsrLocal=qaService.getQaUserBySession(learnerProgressUserId, qaSession.getUid()); - QaQueUsr qaQueUsrLocal=qaService.getQaUserBySession(userId, qaSession.getUid()); - logger.debug("qaQueUsrLocal: " + qaQueUsrLocal); - logger.debug("qaQueUsrLocal uid : " + qaQueUsrLocal.getUid()); + if ( qaQueUsrLocal != null ) { + logger.debug("qaQueUsrLocal uid : " + qaQueUsrLocal.getUid()); + generalLearnerFlowDTO.setUserUid(qaQueUsrLocal.getUid().toString()); + } else { + generalLearnerFlowDTO.setUserUid(null); + } - generalLearnerFlowDTO.setUserUid(qaQueUsrLocal.getUid().toString()); - logger.debug("fwd'ing to for learner progress" + INDIVIDUAL_LEARNER_REPORT); return (mapping.findForward(INDIVIDUAL_LEARNER_REPORT)); @@ -557,7 +560,7 @@ logger.debug("using generalLearnerFlowDTO: " + generalLearnerFlowDTO); qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, - currentToolSessionID.toString(), null, generalLearnerFlowDTO, false, toolSessionID); + currentToolSessionID.toString(), userID, generalLearnerFlowDTO, false, toolSessionID); logger.debug("final generalLearnerFlowDTO: " + generalLearnerFlowDTO); logger.debug("current sessionMap: " + sessionMap); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java,v diff -u -r1.56 -r1.56.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java 3 Dec 2006 14:58:02 -0000 1.56 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java 12 Mar 2007 05:10:30 -0000 1.56.2.1 @@ -1660,10 +1660,11 @@ /** - * populates data for summary screen - * refreshSummaryData(HttpServletRequest request, QaContent qaContent, IQaService qaService, - boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId) - + * populates data for summary screen, view all results screen and export portfolio. + * + * User id is needed if isUserNamesVisible is false && learnerRequest is true, + * as it is required to work out if the data being analysed is the current user. + * * @param request * @param qaContent * @param qaService Index: lams_tool_laqa/web/export/exportportfolio.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/export/exportportfolio.jsp,v diff -u -r1.20 -r1.20.2.1 --- lams_tool_laqa/web/export/exportportfolio.jsp 4 Dec 2006 15:39:04 -0000 1.20 +++ lams_tool_laqa/web/export/exportportfolio.jsp 12 Mar 2007 05:10:25 -0000 1.20.2.1 @@ -38,22 +38,20 @@ - - - + + - - - - - - - - - - + + + + + + + + + @@ -179,41 +177,47 @@ - - - + + + <%-- Reflection heading - do first time through loop --%> + + + - - - - - - - - - - - - - - - - : - + + + + + + - - - + <%-- The actual output of a reflection --%> + + + + + + + + : + - - - - - - - - + + + + + + + + + <%-- Close off table / rows - do last time through loop --%> + + + + + + Index: lams_tool_laqa/web/learning/IndividualLearnerResults.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/IndividualLearnerResults.jsp,v diff -u -r1.27 -r1.27.2.1 --- lams_tool_laqa/web/learning/IndividualLearnerResults.jsp 4 Dec 2006 01:35:31 -0000 1.27 +++ lams_tool_laqa/web/learning/IndividualLearnerResults.jsp 12 Mar 2007 05:10:24 -0000 1.27.2.1 @@ -144,23 +144,23 @@ + onclick="submitMethod('storeAllResults');" styleClass="button"> Index: lams_tool_larsrc/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/build.properties,v diff -u -r1.3 -r1.3.2.1 --- lams_tool_larsrc/build.properties 17 Aug 2006 03:54:42 -0000 1.3 +++ lams_tool_larsrc/build.properties 12 Mar 2007 05:09:19 -0000 1.3.2.1 @@ -11,3 +11,15 @@ signature=larsrc11 project.displayname = lams share resources tool weblib=lib + +#project version +tool.version=20070227 + +# hide tool option +hideTool=false + +# Minimum compatible version +min.server.version.number=2.0.200612051427 + +# Language files package +language.files.package=org.lamsfoundation.lams.tool.rsrc Index: lams_tool_larsrc/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/build.xml,v diff -u -r1.13 -r1.13.2.1 --- lams_tool_larsrc/build.xml 28 Sep 2006 23:31:19 -0000 1.13 +++ lams_tool_larsrc/build.xml 12 Mar 2007 05:09:19 -0000 1.13.2.1 @@ -326,14 +326,28 @@ - - + + - + + + + + + + + + + + + + + + @@ -345,6 +359,13 @@ + + + + + + + @@ -364,14 +385,18 @@ dbUsername="${db.username}" dbDriverUrl="${db.url}" dbDriverClass="com.mysql.jdbc.Driver" - deployFiles="${build.lib}/${product}.war,${build.lib}/${product}.jar" + deployFiles="${build.deploy}/${product}.war,${build.deploy}/${product}.jar" toolJarFileName="${product}.jar" toolSignature="${signature}" - toolTablesScriptPath="${db.scripts}/create_lams_tool_rsrc.sql" - toolTablesDeleteScriptPath="${db.scripts}/drop_lams_tool_rsrc.sql" - toolActivityInsertScriptPath="${db.scripts}/activity_insert.sql" - toolLibraryInsertScriptPath="${db.scripts}/library_insert.sql" - toolInsertScriptPath="${db.scripts}/tool_insert.sql" + toolVersion="${tool.version}" + hideTool="${hideTool}" + minServerVersionNumber="${min.server.version.number}" + toolUpdateScriptPath="${build.deploy}/sql/updatescripts/updateTo${tool.version}.sql" + toolTablesScriptPath="${build.deploy}/sql/create_lams_tool_rsrc.sql" + toolTablesDeleteScriptPath="${build.deploy}/sql/drop_lams_tool_rsrc.sql" + toolActivityInsertScriptPath="${build.deploy}/sql/activity_insert.sql" + toolLibraryInsertScriptPath="${build.deploy}/sql/library_insert.sql" + toolInsertScriptPath="${build.deploy}/sql/tool_insert.sql" toolApplicationContextPath="/org/lamsfoundation/lams/tool/rsrc/rsrcApplicationContext.xml" lamsEarPath="${jboss.deploy}" @@ -390,9 +415,7 @@ - - + @@ -410,6 +433,10 @@ + + + items = null; Resource resource; items = service.getResourceItemsBySessionId(sessionId); resource = service.getResourceBySessionId(sessionId); //check whehter finish lock is on/off - boolean lock = resource.getLockWhenFinished() && resourceUser.isSessionFinished(); + boolean lock = resource.getLockWhenFinished() && resourceUser !=null && resourceUser.isSessionFinished(); //check whether there is only one resource item and run auto flag is true or not. @@ -182,18 +190,19 @@ // get notebook entry String entryText = new String(); - NotebookEntry notebookEntry = service.getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, - ResourceConstants.TOOL_SIGNATURE, resourceUser.getUserId().intValue()); - - if (notebookEntry != null) { - entryText = notebookEntry.getEntry(); + if ( resourceUser != null ) { + NotebookEntry notebookEntry = service.getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + ResourceConstants.TOOL_SIGNATURE, resourceUser.getUserId().intValue()); + if (notebookEntry != null) { + entryText = notebookEntry.getEntry(); + } } //basic information sessionMap.put(ResourceConstants.ATTR_TITLE,resource.getTitle()); sessionMap.put(ResourceConstants.ATTR_RESOURCE_INSTRUCTION,resource.getInstructions()); sessionMap.put(ResourceConstants.ATTR_FINISH_LOCK,lock); - sessionMap.put(ResourceConstants.ATTR_USER_FINISHED, resourceUser.isSessionFinished()); + sessionMap.put(ResourceConstants.ATTR_USER_FINISHED, resourceUser !=null && resourceUser.isSessionFinished()); sessionMap.put(AttributeNames.PARAM_TOOL_SESSION_ID,sessionId); sessionMap.put(AttributeNames.ATTR_MODE,mode); @@ -237,7 +246,8 @@ } //set complete flag for display purpose - service.retrieveComplete(resourceItemList, resourceUser); + if ( resourceUser !=null ) + service.retrieveComplete(resourceItemList, resourceUser); sessionMap.put(ResourceConstants.ATTR_RESOURCE,resource); @@ -561,6 +571,15 @@ } return resourceUser; } + private ResourceUser getSpecifiedUser(IResourceService service, Long sessionId, Integer userId) { + ResourceUser resourceUser = service.getUserByIDAndSession(new Long(userId.intValue()),sessionId); + if ( resourceUser == null ) { + log.error("Unable to find specified user for share resources activity. Screens are likely to fail. SessionId=" + +sessionId+" UserId="+userId); + } + return resourceUser; + } + /** * @param itemForm * @return Index: lams_tool_larsrc/web/WEB-INF/web.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/WEB-INF/web.xml,v diff -u -r1.14 -r1.14.2.1 --- lams_tool_larsrc/web/WEB-INF/web.xml 31 Oct 2006 05:12:56 -0000 1.14 +++ lams_tool_larsrc/web/WEB-INF/web.xml 12 Mar 2007 05:09:19 -0000 1.14.2.1 @@ -278,6 +278,7 @@ /download/ + LEARNER AUTHOR MONITOR TEACHER Index: lams_tool_larsrc/web/pages/learning/learning.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/learning/learning.jsp,v diff -u -r1.37 -r1.37.2.1 --- lams_tool_larsrc/web/pages/learning/learning.jsp 3 Dec 2006 03:34:38 -0000 1.37 +++ lams_tool_larsrc/web/pages/learning/learning.jsp 12 Mar 2007 05:09:20 -0000 1.37.2.1 @@ -138,12 +138,13 @@ - - - + + + + + - @@ -231,10 +232,12 @@ - - - + + + + + Index: lams_tool_nb/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/build.properties,v diff -u -r1.11 -r1.11.2.1 --- lams_tool_nb/build.properties 7 Apr 2006 00:46:45 -0000 1.11 +++ lams_tool_nb/build.properties 12 Mar 2007 05:10:45 -0000 1.11.2.1 @@ -8,4 +8,16 @@ ## Test toolContentID test.contentid=355 +# project version +tool.version=20070214 +# hide tool option +hideTool=false + +# Minimum compatible version +min.server.version.number=2.0.200612051427 + +# Language files package +language.files.package=org.lamsfoundation.lams.tool.noticeboard + + Index: lams_tool_nb/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/build.xml,v diff -u -r1.29 -r1.29.2.1 --- lams_tool_nb/build.xml 28 Sep 2006 23:31:32 -0000 1.29 +++ lams_tool_nb/build.xml 12 Mar 2007 05:10:45 -0000 1.29.2.1 @@ -79,9 +79,11 @@ + + @@ -403,9 +405,23 @@ - + + + + + + + + + + + + + + + @@ -424,6 +440,13 @@ + + + + + + + @@ -437,14 +460,18 @@ dbUsername="${db.username}" dbDriverUrl="${db.url}" dbDriverClass="com.mysql.jdbc.Driver" - deployFiles="${build.lib}/${product}.war,${build.lib}/${product}.jar" + deployFiles="${build.deploy}/${product}.war,${build.deploy}/${product}.jar" toolJarFileName="${product}.jar" toolSignature="${signature}" - toolTablesScriptPath="${db.scripts}/create_lams_tool_nb.sql" - toolTablesDeleteScriptPath="${db.scripts}/drop_lams_tool_nb.sql" - toolActivityInsertScriptPath="${db.scripts}/activity_insert.sql" - toolLibraryInsertScriptPath="${db.scripts}/library_insert.sql" - toolInsertScriptPath="${db.scripts}/tool_insert.sql" + toolVersion="${tool.version}" + hideTool="${hideTool}" + minServerVersionNumber="${min.server.version.number}" + toolUpdateScriptPath="${build.deploy}/sql/updatescripts/updateTo${tool.version}.sql" + toolTablesScriptPath="${build.deploy}/sql/create_lams_tool_nb.sql" + toolTablesDeleteScriptPath="${build.deploy}/sql/drop_lams_tool_nb.sql" + toolActivityInsertScriptPath="${build.deploy}/sql/activity_insert.sql" + toolLibraryInsertScriptPath="${build.deploy}/sql/library_insert.sql" + toolInsertScriptPath="${build.deploy}/sql/tool_insert.sql" toolApplicationContextPath="/org/lamsfoundation/lams/tool/noticeboard/applicationContext.xml" lamsEarPath="${jboss.deploy}" toolContext="${toolContext}" @@ -460,9 +487,7 @@ - - + @@ -479,8 +504,12 @@ - + + + + Index: lams_tool_nb/conf/hibernate/mappings/org/lamsfoundation/lams/tool/noticeboard/NoticeboardUser.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/conf/hibernate/mappings/org/lamsfoundation/lams/tool/noticeboard/Attic/NoticeboardUser.hbm.xml,v diff -u -r1.3 -r1.3.2.1 --- lams_tool_nb/conf/hibernate/mappings/org/lamsfoundation/lams/tool/noticeboard/NoticeboardUser.hbm.xml 15 Feb 2006 01:38:10 -0000 1.3 +++ lams_tool_nb/conf/hibernate/mappings/org/lamsfoundation/lams/tool/noticeboard/NoticeboardUser.hbm.xml 12 Mar 2007 05:10:45 -0000 1.3.2.1 @@ -31,7 +31,7 @@ update="true" insert="true" column="fullname" - length="50" + length="255" /> - - + + + - + - + - + - + - - + + - - - + + + - + - - + + - - - + + + - + - + - + - + - + - + - + - + - + - - + + - - - + + + - + - - + + - - - + + + - + - - + + - - - + + + - + - - + + - - - + + + - + - + - + - + - + - + - + - + - - + + - - - + + + - + - - + + - - - + + + - + - - + + - - - + + + - + - + - + - + - + - - - + + + - + - + @@ -213,78 +213,78 @@ - + - + - + - - + + - - - + + + - + - - + + - - - + + + - + - - + + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - + @@ -294,90 +294,90 @@ - + - + - + - - + + - - - + + + - + - - + + - - - + + + - + - - - + + + - + - - + + - - - + + + - + - - + + - - - + + + - + - - + + - - - + + + - + - + Index: lams_tool_nb/db/sql/create_lams_tool_nb.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/db/sql/create_lams_tool_nb.sql,v diff -u -r1.18 -r1.18.2.1 --- lams_tool_nb/db/sql/create_lams_tool_nb.sql 31 Oct 2006 04:22:52 -0000 1.18 +++ lams_tool_nb/db/sql/create_lams_tool_nb.sql 12 Mar 2007 05:10:45 -0000 1.18.2.1 @@ -36,8 +36,8 @@ uid BIGINT(20) NOT NULL AUTO_INCREMENT , user_id BIGINT(20) NOT NULL , nb_session_uid BIGINT(20) NOT NULL - , username VARCHAR(50) - , fullname VARCHAR(50) + , username VARCHAR(255) + , fullname VARCHAR(255) , user_status VARCHAR(50) , PRIMARY KEY (uid) , INDEX (nb_session_uid) Index: lams_tool_nb/db/sql/init_lams_tool_nb.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/db/sql/Attic/init_lams_tool_nb.sql,v diff -u -r1.13 -r1.13.2.1 --- lams_tool_nb/db/sql/init_lams_tool_nb.sql 21 Mar 2006 06:54:17 -0000 1.13 +++ lams_tool_nb/db/sql/init_lams_tool_nb.sql 12 Mar 2007 05:10:45 -0000 1.13.2.1 @@ -40,8 +40,8 @@ uid BIGINT(20) NOT NULL AUTO_INCREMENT , user_id BIGINT(20) NOT NULL , nb_session_uid BIGINT(20) NOT NULL - , username VARCHAR(50) - , fullname VARCHAR(50) + , username VARCHAR(255) + , fullname VARCHAR(255) , user_status VARCHAR(50) , PRIMARY KEY (uid) , INDEX (nb_session_uid) Index: lams_tool_nb/db/sql/tool_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/db/sql/tool_insert.sql,v diff -u -r1.21 -r1.21.2.1 --- lams_tool_nb/db/sql/tool_insert.sql 3 Nov 2006 00:09:52 -0000 1.21 +++ lams_tool_nb/db/sql/tool_insert.sql 12 Mar 2007 05:10:45 -0000 1.21.2.1 @@ -25,7 +25,10 @@ moderation_url, help_url, language_file, -create_date_time +classpath_addition, +context_file, +create_date_time, +modified_date_time ) VALUES ( @@ -34,7 +37,7 @@ 'NoticeboardX', 'Displays a NoticeboardX', 'nb', -'20061102', +'@tool_version@', NULL, NULL, 0, @@ -52,5 +55,8 @@ NULL, 'http://wiki.lamsfoundation.org/display/lamsdocs/lanb11', 'org.lamsfoundation.lams.tool.noticeboard.ApplicationResources', +'./lams-tool-lanb11.jar', +'/org/lamsfoundation/lams/tool/noticeboard/applicationContext.xml', +NOW(), NOW() ); Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardUser.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardUser.java,v diff -u -r1.6 -r1.6.2.1 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardUser.java 17 Sep 2006 06:26:26 -0000 1.6 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardUser.java 12 Mar 2007 05:10:48 -0000 1.6.2.1 @@ -89,7 +89,7 @@ /** * @hibernate.property * column="fullname" - * length="50" + * length="255" * * @return Returns the fullname. */ @@ -156,7 +156,7 @@ /** * @hibernate.property * column="username" - * length="50" + * length="255" * * @return Returns the username. */ Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerStarterAction.java,v diff -u -r1.25 -r1.25.2.1 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerStarterAction.java 20 Nov 2006 23:45:14 -0000 1.25 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerStarterAction.java 12 Mar 2007 05:10:45 -0000 1.25.2.1 @@ -101,6 +101,11 @@ return new Long(user.getUserID().longValue()); } + /** Get the user id from the url - needed for the monitoring mode */ + public Long getUserIDFromURLCall(HttpServletRequest request) { + return WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); + } + public ActionForward unspecified( ActionMapping mapping, ActionForm form, @@ -122,7 +127,6 @@ ActionMessages message = new ActionMessages(); INoticeboardService nbService = NoticeboardServiceProxy.getNbService(getServlet().getServletContext()); - Long userID = getUserID(request); Long toolSessionID = NbWebUtil.convertToLong(learnerForm.getToolSessionID()); if (toolSessionID == null) @@ -147,25 +151,22 @@ return mapping.findForward(NoticeboardConstants.DEFINE_LATER); } - nbUser = nbService.retrieveNbUserBySession(userID, toolSessionID); boolean readOnly = false; ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE,false); + Long userID = null; if (mode == ToolAccessMode.LEARNER || mode == ToolAccessMode.AUTHOR ) { - if ( ! nbContent.isContentInUse() ) { + userID = getUserID(request); + nbUser = nbService.retrieveNbUserBySession(userID, toolSessionID); + + if ( ! nbContent.isContentInUse() ) { /* Set the ContentInUse flag to true, and defineLater flag to false */ nbContent.setContentInUse(true); nbService.saveNoticeboard(nbContent); } - if (nbUser != null) - { - if (nbUser.getUserStatus().equals(NoticeboardUser.COMPLETED)) { - readOnly = true; - } - } - else + if (nbUser == null) { //create a new user with this session id nbUser = new NoticeboardUser(userID); @@ -175,7 +176,10 @@ nbService.addUser(toolSessionID, nbUser); } } else { - readOnly = true; + // user will not exist if force completed. + userID = getUserIDFromURLCall(request); + nbUser = nbService.retrieveNbUserBySession(userID, toolSessionID); + readOnly = true; } learnerForm.copyValuesIntoForm(nbContent, readOnly, mode.toString()); @@ -187,10 +191,7 @@ request.setAttribute("reflectInstructions", nbContent.getReflectInstructions()); request.setAttribute("reflectOnActivity", nbContent.getReflectOnActivity()); - Boolean userFinished = false; - if (nbUser.getUserStatus().equals(NoticeboardUser.COMPLETED)) { - userFinished = true; - } + Boolean userFinished = (nbUser!=null && NoticeboardUser.COMPLETED.equals(nbUser.getUserStatus())); request.setAttribute("userFinished", userFinished); /* Index: lams_tool_nb/web/learnerContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/web/learnerContent.jsp,v diff -u -r1.21 -r1.21.2.1 --- lams_tool_nb/web/learnerContent.jsp 5 Jan 2007 03:13:52 -0000 1.21 +++ lams_tool_nb/web/learnerContent.jsp 12 Mar 2007 05:10:45 -0000 1.21.2.1 @@ -53,20 +53,22 @@ - - - - - - - - + + + + + + + + - - - - - + + + + + + +
+ + + + + + + + +
- - - - - - - - -
- +
- -
+ +