Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java,v diff -u -r1.15 -r1.16 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java 13 Jul 2005 07:02:04 -0000 1.15 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java 14 Jul 2005 05:45:41 -0000 1.16 @@ -138,6 +138,7 @@ public static final String USER_EXCEPTION_USERID_NOTNUMERIC ="userExceptionUserIdNotNumeric"; public static final String USER_EXCEPTION_ONLYCONTENT_ANDNOSESSIONS ="userExceptionOnlyContentAndNoSessions"; public static final String USER_EXCEPTION_USERID_EXISTING ="userExceptionUserIdExisting"; + public static final String USER_EXCEPTION_USER_DOESNOTEXIST ="userExceptionUserDoesNotExist"; public static final String USER_EXCEPTION_MONITORINGTAB_CONTENTID_REQUIRED ="userExceptionMonitoringTabContentIdRequired"; public static final String USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP ="userExceptionDefaultContentNotSetup"; public static final String USER_EXCEPTION_NO_TOOL_SESSIONS ="userExceptionNoToolSessions"; @@ -151,6 +152,7 @@ public static final String USER_EXCEPTION_MODE_REQUIRED ="userExceptionModeRequired"; public static final String PORTFOLIO_REPORT ="portfolioReport"; public static final String PORTFOLIO_REQUEST ="portfolioRequest"; + public static final int MAX_GROUPS_COUNT =250; /** * user actions Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/Attic/QaResources.properties,v diff -u -r1.8 -r1.9 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties 13 Jul 2005 23:50:53 -0000 1.8 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties 14 Jul 2005 05:45:41 -0000 1.9 @@ -85,6 +85,7 @@ error.toolSession.doesNotExist =Tool Activity Error! Can't continue. The toolsession id passed to the Tool Activity does not refer to an existing tool session. error.content.onlyContentAndNoSessions =A report can not be generated since no tool sessions has been passed to the Tool Activity. error.content.noToolSessions =A report can not be generated since there has not been any student activity on this content. +error.user.doesNotExist =Tool Activity Error! Can't continue. The user id passed to the Tool Activity does not refer to an existing user. error.tab.contentId.required =Sorry, the screen is not available. The Tool Activity requires a content id. monitoring.feedback.instructionUpdate =The content has been updated successfully. Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/Attic/QaUtils.java,v diff -u -r1.10 -r1.11 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java 13 Jul 2005 03:12:28 -0000 1.10 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java 14 Jul 2005 05:45:41 -0000 1.11 @@ -270,18 +270,14 @@ } - public static User createAuthoringUser(Integer userId) + + public static User createSimpleUser(Integer userId) { User user=new User(); user.setUserId(userId); return user; } - public static User createStandardUser(Integer userId) - { - return createAuthoringUser(userId); - } - public static User createUser(Integer userId) { User user=new User(); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java,v diff -u -r1.7 -r1.8 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java 13 Jul 2005 04:50:38 -0000 1.7 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java 14 Jul 2005 05:45:42 -0000 1.8 @@ -459,6 +459,7 @@ * A boolean true isUsernameVisible indicates that all user names to be displayed. * Only applies to learning mode. */ + Boolean isUsernameVisible=(Boolean)request.getSession().getAttribute(IS_USERNAME_VISIBLE); logger.debug("IS_USERNAME_VISIBLE: " + isUsernameVisible); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaExportPortfolioStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/Attic/QaExportPortfolioStarterAction.java,v diff -u -r1.6 -r1.7 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaExportPortfolioStarterAction.java 13 Jul 2005 23:50:59 -0000 1.6 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaExportPortfolioStarterAction.java 14 Jul 2005 05:45:42 -0000 1.7 @@ -41,6 +41,7 @@ import org.lamsfoundation.lams.tool.qa.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaApplicationException; import org.lamsfoundation.lams.tool.qa.QaContent; +import org.lamsfoundation.lams.tool.qa.QaQueUsr; import org.lamsfoundation.lams.tool.qa.QaSession; import org.lamsfoundation.lams.tool.qa.QaStringComparator; import org.lamsfoundation.lams.tool.qa.QaUtils; @@ -82,7 +83,7 @@ logger.debug("userId: " + userId); try { - User user=QaUtils.createStandardUser(new Integer(userId)); + User user=QaUtils.createSimpleUser(new Integer(userId)); request.getSession().setAttribute(TOOL_USER, user); } catch(NumberFormatException e) @@ -159,15 +160,16 @@ return (mapping.findForward(PORTFOLIO_REPORT)); } logger.debug("final toolSessionId before exists test :" + toolSessionId); - } - QaSession qaSession=qaService.retrieveQaSessionOrNullById(toolSessionId.longValue()); - if (qaSession == null) - { - persistError(request,"error.toolSession.doesNotExist"); - request.setAttribute(USER_EXCEPTION_TOOLSESSION_DOESNOTEXIST, new Boolean(true)); - logger.debug("forwarding to: " + PORTFOLIO_REPORT); - return (mapping.findForward(PORTFOLIO_REPORT)); + + QaSession qaSession=qaService.retrieveQaSessionOrNullById(toolSessionId.longValue()); + if (qaSession == null) + { + persistError(request,"error.toolSession.doesNotExist"); + request.setAttribute(USER_EXCEPTION_TOOLSESSION_DOESNOTEXIST, new Boolean(true)); + logger.debug("forwarding to: " + PORTFOLIO_REPORT); + return (mapping.findForward(PORTFOLIO_REPORT)); + } } logger.debug("final toolSessionId :" + toolSessionId); @@ -216,28 +218,59 @@ mode=(String)request.getSession().getAttribute(MODE); logger.debug("mode is: " + mode); - - toolContentId=(Long)request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); - toolSessionId=(Long)request.getSession().getAttribute(TOOL_SESSION_ID); - logger.debug("toolSessionId: " + toolSessionId); - - /** - whether the request is of mode learner or teacher, we construct a single listToolSessions object and - build the report based on that object. - */ - List listToolSessions=null; + Map mapToolSessions= new TreeMap(new QaStringComparator()); + request.getSession().setAttribute(MAP_TOOL_SESSIONS,mapToolSessions); + LearningUtil learningUtil= new LearningUtil(); + if (mode.equalsIgnoreCase(LEARNER)) { + toolSessionId=(Long)request.getSession().getAttribute(TOOL_SESSION_ID); + logger.debug("toolSessionId: " + toolSessionId); + + QaSession qaSession=qaService.retrieveQaSessionOrNullById(toolSessionId.longValue()); + QaContent qaContent=qaSession.getQaContent(); + logger.debug("using qaContent: " + qaContent); + logger.debug("using qaContent id : " + qaContent.getQaContentId()); + request.getSession().setAttribute(TOOL_CONTENT_ID, qaContent.getQaContentId()); + + /** is other learner's full name visible to this learner */ + logger.debug("IS_USERNAME_VISIBLE: " + qaContent.isUsernameVisible()); + request.getSession().setAttribute(IS_USERNAME_VISIBLE, new Boolean(qaContent.isUsernameVisible())); + + logger.debug("TOOL_USER is:" + request.getSession().getAttribute(TOOL_USER)); + User toolUser= (User)request.getSession().getAttribute(TOOL_USER); + logger.debug("TOOL_USER id:" + toolUser.getUserId()); + + QaQueUsr qaQueUsr=qaService.loadQaQueUsr(new Long(toolUser.getUserId().longValue())); + logger.debug("qaQueUsr:" + qaQueUsr); + + if (qaQueUsr != null) + { + request.getSession().setAttribute(CURRENTLEARNER_FULLNAME , qaQueUsr.getFullname()); + logger.debug("current learner fullname:" + qaQueUsr.getFullname()); + } + else + { + persistError(request,"error.user.doesNotExist"); + request.setAttribute(USER_EXCEPTION_USER_DOESNOTEXIST, new Boolean(true)); + logger.debug("forwarding to: " + PORTFOLIO_REPORT); + return (mapping.findForward(PORTFOLIO_REPORT)); + } + logger.debug("generate portfolio for mode: " + mode); request.getSession().setAttribute(TARGET_MODE, TARGET_MODE_LEARNING); /** a single toolSessionId */ - listToolSessions.add(1, toolSessionId); - logger.debug("listToolSessions: " + listToolSessions); + request.getSession().setAttribute(TOOL_SESSION_ID, toolSessionId); + logger.debug("build a learner report:"); + learningUtil.buidLearnerReport(request, 1); } else { + toolContentId=(Long)request.getSession().getAttribute(TOOL_CONTENT_ID); + logger.debug("toolContentId: " + toolContentId); + + List listToolSessions=null; logger.debug("generate portfolio for mode: " + mode); request.getSession().setAttribute(TARGET_MODE, TARGET_MODE_MONITORING); @@ -246,34 +279,31 @@ logger.debug("qa: " + qa); listToolSessions= qaService.getToolSessionsForContent(qa); logger.debug("listToolSessions: " + listToolSessions); + + if (listToolSessions.size() == 0) + { + persistError(request,"error.content.noToolSessions"); + request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true)); + logger.debug("forwarding to: " + PORTFOLIO_REPORT); + return (mapping.findForward(PORTFOLIO_REPORT)); + } + + Iterator sessionListIterator=listToolSessions.iterator(); + int toolSessionCounter=1; + while (sessionListIterator.hasNext()) + { + toolSessionId=(Long)sessionListIterator.next(); + logger.debug("toolSessionId: " + toolSessionId); + request.getSession().setAttribute(TOOL_SESSION_ID, toolSessionId); + learningUtil.buidLearnerReport(request, toolSessionCounter); + toolSessionCounter++; + } } - if (listToolSessions.size() == 0) - { - persistError(request,"error.content.noToolSessions"); - request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true)); - logger.debug("forwarding to: " + PORTFOLIO_REPORT); - return (mapping.findForward(PORTFOLIO_REPORT)); - } - - Map mapToolSessions= new TreeMap(new QaStringComparator()); - request.getSession().setAttribute(MAP_TOOL_SESSIONS,mapToolSessions); - LearningUtil learningUtil= new LearningUtil(); - - Iterator sessionListIterator=listToolSessions.iterator(); - int toolSessionCounter=1; - while (sessionListIterator.hasNext()) - { - toolSessionId=(Long)sessionListIterator.next(); - logger.debug("toolSessionId: " + toolSessionId); - request.getSession().setAttribute(TOOL_SESSION_ID, toolSessionId); - learningUtil.buidLearnerReport(request, toolSessionCounter); - toolSessionCounter++; - } - /** the flag to differentiate between request for monitoring versus request for portfolio */ request.setAttribute(PORTFOLIO_REQUEST, new Boolean(true)); logger.debug("generate portfolio jsp for mode: " + mode); + logger.debug("mapToolSessions: " + request.getSession().getAttribute(MAP_TOOL_SESSIONS)); return (mapping.findForward(PORTFOLIO_REPORT)); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java,v diff -u -r1.7 -r1.8 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java 13 Jul 2005 04:50:38 -0000 1.7 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java 14 Jul 2005 05:45:42 -0000 1.8 @@ -94,7 +94,7 @@ userId=request.getParameter(USER_ID); try { - User user=QaUtils.createAuthoringUser(new Integer(userId)); + User user=QaUtils.createSimpleUser(new Integer(userId)); request.getSession().setAttribute(TOOL_USER, user); } catch(NumberFormatException e) Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java,v diff -u -r1.12 -r1.13 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java 13 Jul 2005 04:50:38 -0000 1.12 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java 14 Jul 2005 05:45:42 -0000 1.13 @@ -201,7 +201,7 @@ try { /* Check QaUtils.createAuthoringUser again User Management Service is ready */ - User user=QaUtils.createAuthoringUser(new Integer(userId)); + User user=QaUtils.createSimpleUser(new Integer(userId)); request.getSession().setAttribute(TOOL_USER, user); } catch(NumberFormatException e) Index: lams_tool_laqa/web/BasicContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/Attic/BasicContent.jsp,v diff -u -r1.5 -r1.6 --- lams_tool_laqa/web/BasicContent.jsp 14 Jul 2005 01:07:42 -0000 1.5 +++ lams_tool_laqa/web/BasicContent.jsp 14 Jul 2005 05:45:42 -0000 1.6 @@ -10,7 +10,7 @@ - +
: @@ -93,7 +93,7 @@
- +
: Index: lams_tool_laqa/web/InstructionsContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/Attic/InstructionsContent.jsp,v diff -u -r1.5 -r1.6 --- lams_tool_laqa/web/InstructionsContent.jsp 14 Jul 2005 01:07:42 -0000 1.5 +++ lams_tool_laqa/web/InstructionsContent.jsp 14 Jul 2005 05:45:42 -0000 1.6 @@ -7,7 +7,7 @@
- +
- + - - - - - - -
: Index: lams_tool_laqa/web/learnerReport.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/Attic/learnerReport.jsp,v diff -u -r1.4 -r1.5 --- lams_tool_laqa/web/learnerReport.jsp 5 Jul 2005 07:09:46 -0000 1.4 +++ lams_tool_laqa/web/learnerReport.jsp 14 Jul 2005 05:45:42 -0000 1.5 @@ -14,133 +14,18 @@
  -
 
- - - - - - - - - - - - - - - - - - - <%String fullName ="fullName" + request.getAttribute("queIndex") + request.getAttribute("ansIndex"); - String aTime ="aTime" + request.getAttribute("queIndex") + request.getAttribute("ansIndex"); - String formattedAtime="formattedAtime" + request.getAttribute("queIndex") + request.getAttribute("ansIndex"); - String timeZoneId ="timeZoneId" + request.getAttribute("queIndex") + request.getAttribute("ansIndex"); - String answer ="answer" + request.getAttribute("queIndex") + request.getAttribute("ansIndex"); - String currentLearnerFullname=(String) request.getSession().getAttribute("currentLearnerFullname"); - - fullName = (String) request.getSession().getAttribute(fullName); - java.util.Date attemptTime= (java.util.Date) request.getSession().getAttribute(aTime); - formattedAtime =(String) request.getSession().getAttribute(formattedAtime); - timeZoneId = (String) request.getSession().getAttribute(timeZoneId); - answer = (String) request.getSession().getAttribute(answer); - - request.setAttribute("fullName", fullName); - request.setAttribute("attemptTime", attemptTime); - request.setAttribute("formattedAtime", formattedAtime); - request.setAttribute("timeZoneId", timeZoneId); - request.setAttribute("answer", answer); - request.setAttribute("currentLearnerFullname", currentLearnerFullname); - %> - - + - <% - if ((fullName != null) && (!fullName.equalsIgnoreCase(currentLearnerFullname))) - { - %> - - <%} - else if ((fullName != null) && (fullName.equalsIgnoreCase(currentLearnerFullname))) - {%> - - <%} - else if ((fullName == null)) - {%> - - <%}%> - - - - <% if (fullName != null) - { - %> - - - - <%}%> + + + - - - <% if (formattedAtime != null) - { - %> - - <%}%> - - <% if (timeZoneId != null) - { - %> - - <%}%> - - - <% if (answer != null) - { - %> - - <%}%> - - - - -
: -
               
- -     ( ) - - -     - - - -     - -     ( ) - -     -
+ +
+      +
-     - - - -     - -     -
 
-
- -
-
-
@@ -149,10 +34,7 @@
-
Index: lams_tool_laqa/web/monitoringReport.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/Attic/monitoringReport.jsp,v diff -u -r1.1 -r1.2 --- lams_tool_laqa/web/monitoringReport.jsp 21 Jun 2005 05:43:12 -0000 1.1 +++ lams_tool_laqa/web/monitoringReport.jsp 14 Jul 2005 05:45:42 -0000 1.2 @@ -19,13 +19,13 @@
- + requestScope.userExceptionNumberFormat != true}"> Index: lams_tool_laqa/web/portfolioReport.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/Attic/portfolioReport.jsp,v diff -u -r1.4 -r1.5 --- lams_tool_laqa/web/portfolioReport.jsp 13 Jul 2005 23:52:02 -0000 1.4 +++ lams_tool_laqa/web/portfolioReport.jsp 14 Jul 2005 05:45:42 -0000 1.5 @@ -5,15 +5,16 @@ <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %> - +
@@ -29,13 +30,21 @@ requestScope.userExceptionContentIdRequired != 'true' && requestScope.userExceptionNoToolSessions != 'true' && requestScope.userExceptionToolSessionDoesNotExist != 'true' && + requestScope.userExceptionUserDoesNotExist != 'true' && requestScope.userExceptionContentDoesNotExist != 'true' }"> - - -
+ + + + +
+
+ + + +
+
- - + \ No newline at end of file Index: lams_tool_laqa/web/singleLearnerReport.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/Attic/singleLearnerReport.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_laqa/web/singleLearnerReport.jsp 14 Jul 2005 05:45:42 -0000 1.1 @@ -0,0 +1,122 @@ +<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic-el" %> +<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %> +<%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %> + +
+ + + + + + + + + + + + + + + + + + + <%String fullName ="fullName" + request.getAttribute("queIndex") + request.getAttribute("ansIndex"); + String aTime ="aTime" + request.getAttribute("queIndex") + request.getAttribute("ansIndex"); + String formattedAtime="formattedAtime" + request.getAttribute("queIndex") + request.getAttribute("ansIndex"); + String timeZoneId ="timeZoneId" + request.getAttribute("queIndex") + request.getAttribute("ansIndex"); + String answer ="answer" + request.getAttribute("queIndex") + request.getAttribute("ansIndex"); + String currentLearnerFullname=(String) request.getSession().getAttribute("currentLearnerFullname"); + + fullName = (String) request.getSession().getAttribute(fullName); + java.util.Date attemptTime= (java.util.Date) request.getSession().getAttribute(aTime); + formattedAtime =(String) request.getSession().getAttribute(formattedAtime); + timeZoneId = (String) request.getSession().getAttribute(timeZoneId); + answer = (String) request.getSession().getAttribute(answer); + + request.setAttribute("fullName", fullName); + request.setAttribute("attemptTime", attemptTime); + request.setAttribute("formattedAtime", formattedAtime); + request.setAttribute("timeZoneId", timeZoneId); + request.setAttribute("answer", answer); + request.setAttribute("currentLearnerFullname", currentLearnerFullname); + %> + + + + <% + if ((fullName != null) && (!fullName.equalsIgnoreCase(currentLearnerFullname))) + { + %> + + <%} + else if ((fullName != null) && (fullName.equalsIgnoreCase(currentLearnerFullname))) + {%> + + <%} + else if ((fullName == null)) + {%> + + <%}%> + + + + <% if (fullName != null) + { + %> + + + + <%}%> + + + + <% if (formattedAtime != null) + { + %> + + <%}%> + + <% if (timeZoneId != null) + { + %> + + <%}%> + + + <% if (answer != null) + { + %> + + <%}%> + + + + +
: +
               
+ +     ( ) + + +     + + + +     + +     ( ) + +     + +     + + + +     + +     +
 
+