Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java
===================================================================
diff -u -r6bfa03ad456ce58485d7f46bf300ddaf54f64a89 -rade8f831292a12702670cf78c88345efc3572956
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 6bfa03ad456ce58485d7f46bf300ddaf54f64a89)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision ade8f831292a12702670cf78c88345efc3572956)
@@ -195,6 +195,7 @@
public static final String TO_TOOL_CONTENT_ID ="toToolContentId";
public static final String LEARNER_REPORT ="learnerRep";
public static final String REQUEST_LEARNING_REPORT ="requestLearningReport";
+ public static final String REQUEST_LEARNING_REPORT_VIEWONLY ="requestLearningReportViewOnly";
/*
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties
===================================================================
diff -u -r6bfa03ad456ce58485d7f46bf300ddaf54f64a89 -rade8f831292a12702670cf78c88345efc3572956
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties (.../QaResources.properties) (revision 6bfa03ad456ce58485d7f46bf300ddaf54f64a89)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties (.../QaResources.properties) (revision ade8f831292a12702670cf78c88345efc3572956)
@@ -147,6 +147,7 @@
label.content.notEditable =The content can not be edited since it is being used by learners.
label.learning.report =Learning Report
+label.learning.viewOnly =Responses Report
label.openEditor =Open Richtext Editor
label.user =User
label.question.col =Question:
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java
===================================================================
diff -u -r6bfa03ad456ce58485d7f46bf300ddaf54f64a89 -rade8f831292a12702670cf78c88345efc3572956
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java (.../QaUtils.java) (revision 6bfa03ad456ce58485d7f46bf300ddaf54f64a89)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java (.../QaUtils.java) (revision ade8f831292a12702670cf78c88345efc3572956)
@@ -549,6 +549,7 @@
request.getSession().removeAttribute(LOAD_MONITORING_CONTENT_EDITACTIVITY);
request.getSession().removeAttribute(MONITORING_ORIGINATED_DEFINELATER);
request.getSession().removeAttribute(REQUEST_LEARNING_REPORT);
+ request.getSession().removeAttribute(REQUEST_LEARNING_REPORT_VIEWONLY);
request.getSession().removeAttribute(USER_EXCEPTION_WRONG_FORMAT);
request.getSession().removeAttribute(USER_EXCEPTION_UNCOMPATIBLE_IDS);
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java
===================================================================
diff -u -r6bfa03ad456ce58485d7f46bf300ddaf54f64a89 -rade8f831292a12702670cf78c88345efc3572956
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 6bfa03ad456ce58485d7f46bf300ddaf54f64a89)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision ade8f831292a12702670cf78c88345efc3572956)
@@ -134,6 +134,7 @@
IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext());
logger.debug("retrieving qaService: " + qaService);
+ request.getSession().setAttribute(TOOL_SERVICE, qaService);
/*mark the http session as a learning activity */
request.getSession().setAttribute(TARGET_MODE,TARGET_MODE_LEARNING);
@@ -392,19 +393,25 @@
logger.debug("QaQueUsr:" + qaQueUsr);
if (qaQueUsr != null)
{
- String localToolSession=qaQueUsr.getQaSessionId().toString();
- logger.debug("localToolSession: " + localToolSession);
-
- Long incomingToolSessionId=(Long)request.getSession().getAttribute(AttributeNames.PARAM_TOOL_SESSION_ID);
- logger.debug("incomingToolSessionId: " + incomingToolSessionId);
-
- /* now we know that this user has already responsed before*/
- if (localToolSession.equals(incomingToolSessionId.toString()))
- {
logger.debug("the learner has already responsed to this content, just generate a read-only report.");
- return (mapping.findForward(LEARNER_REPORT));
- }
+ Boolean isUserNamesVisibleBoolean=(Boolean)request.getSession().getAttribute(IS_USERNAME_VISIBLE);
+ boolean isUserNamesVisible=isUserNamesVisibleBoolean.booleanValue();
+ logger.debug("isUserNamesVisible: " + isUserNamesVisible);
+
+ Long currentToolSessionId=(Long)request.getSession().getAttribute(TOOL_SESSION_ID);
+ logger.debug("currentToolSessionId: " + currentToolSessionId);
+
+ QaMonitoringAction qaMonitoringAction= new QaMonitoringAction();
+ /*the report should have all the users' entries OR
+ * the report should have only the current session's entries*/
+ request.getSession().setAttribute(REQUEST_LEARNING_REPORT_VIEWONLY, new Boolean(true).toString());
+ qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, currentToolSessionId.toString());
+
+ request.getSession().setAttribute(REQUEST_LEARNING_REPORT, new Boolean(true).toString());
+ logger.debug("fwd'ing to." + LEARNER_REPORT);
+ return (mapping.findForward(LEARNER_REPORT));
+
}
/*
* present user with the questions.
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java
===================================================================
diff -u -r17227fcaca4173406ed5a9251ea10d2353e919f7 -rade8f831292a12702670cf78c88345efc3572956
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 17227fcaca4173406ed5a9251ea10d2353e919f7)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision ade8f831292a12702670cf78c88345efc3572956)
@@ -484,6 +484,19 @@
public void refreshSummaryData(HttpServletRequest request, QaContent qaContent, IQaService qaService,
boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId)
{
+ if (qaService == null)
+ {
+ logger.debug("will retrieve qaService");
+ qaService = QaServiceProxy.getQaService(getServlet().getServletContext());
+ logger.debug("retrieving qaService from session: " + qaService);
+ }
+ if (qaService == null)
+ {
+ qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE);
+ logger.debug("qaService: " + qaService);
+ }
+
+
logger.debug("isUserNamesVisible: " + isUserNamesVisible);
logger.debug("isLearnerRequest: " + isLearnerRequest);
Index: lams_tool_laqa/web/monitoring/LearnerRep.jsp
===================================================================
diff -u -r03a83c5c77b771974fb90318e94672f6a443511a -rade8f831292a12702670cf78c88345efc3572956
--- lams_tool_laqa/web/monitoring/LearnerRep.jsp (.../LearnerRep.jsp) (revision 03a83c5c77b771974fb90318e94672f6a443511a)
+++ lams_tool_laqa/web/monitoring/LearnerRep.jsp (.../LearnerRep.jsp) (revision ade8f831292a12702670cf78c88345efc3572956)
@@ -71,7 +71,14 @@
-
+
+
+
+
+
+
+
+
@@ -82,19 +89,23 @@
-
+
+
+
+
+