Index: lams_tool_laqa/db/sql/create_lams_tool_qa.sql
===================================================================
diff -u -r792f3d848039cb49080fbaf49d9bc2b2d461943e -r18ebee3fd6c583b848ef9aebba2c8204dae08c52
--- lams_tool_laqa/db/sql/create_lams_tool_qa.sql (.../create_lams_tool_qa.sql) (revision 792f3d848039cb49080fbaf49d9bc2b2d461943e)
+++ lams_tool_laqa/db/sql/create_lams_tool_qa.sql (.../create_lams_tool_qa.sql) (revision 18ebee3fd6c583b848ef9aebba2c8204dae08c52)
@@ -2,12 +2,12 @@
uid BIGINT(20) NOT NULL AUTO_INCREMENT
, qa_content_id BIGINT(20) NOT NULL
, title VARCHAR(250) NOT NULL DEFAULT 'Questions and Answers'
- , instructions VARCHAR(250) NOT NULL DEFAULT 'Please, take a minute to answer the following questions.'
+ , instructions VARCHAR(250) NOT NULL DEFAULT 'Please answer the following questions.'
, creation_date VARCHAR(100)
, update_date DATETIME
, questions_sequenced TINYINT(1) NOT NULL
, username_visible TINYINT(1) NOT NULL DEFAULT 0
- , monitoring_report_title VARCHAR(100) DEFAULT 'Combined Learner Results'
+ , monitoring_report_title VARCHAR(100) DEFAULT 'Learner Results'
, report_title VARCHAR(100) DEFAULT 'Report'
, created_by BIGINT(20) NOT NULL DEFAULT 0
, run_offline TINYINT(1) DEFAULT 0
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java
===================================================================
diff -u -r5ce575b11f3206c1e80792d2a2be752612bd26d7 -r18ebee3fd6c583b848ef9aebba2c8204dae08c52
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 5ce575b11f3206c1e80792d2a2be752612bd26d7)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 18ebee3fd6c583b848ef9aebba2c8204dae08c52)
@@ -140,14 +140,6 @@
List sessionsList=qaService.getSessionNamesFromContent(qaContent);
logger.debug("sessionsList size is:..." + sessionsList.size());
- if (sessionsList.isEmpty())
- {
- /* inform in the Summary tab that the tool has no active sessions */
- request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString());
- logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
- }
-
-
Map sessionsMap=QaUtils.convertToStringMap(sessionsList, "String");
logger.debug("generated sessionsMap:..." + sessionsMap);
logger.debug("sessionsMap size:..." + sessionsMap.size());
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java
===================================================================
diff -u -r5ce575b11f3206c1e80792d2a2be752612bd26d7 -r18ebee3fd6c583b848ef9aebba2c8204dae08c52
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 5ce575b11f3206c1e80792d2a2be752612bd26d7)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 18ebee3fd6c583b848ef9aebba2c8204dae08c52)
@@ -508,6 +508,7 @@
* obtain and setup the current user's data
*/
+
String userID = "";
HttpSession ss = SessionManager.getSession();
logger.debug("ss: " + ss);
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java
===================================================================
diff -u -r5ce575b11f3206c1e80792d2a2be752612bd26d7 -r18ebee3fd6c583b848ef9aebba2c8204dae08c52
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 5ce575b11f3206c1e80792d2a2be752612bd26d7)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 18ebee3fd6c583b848ef9aebba2c8204dae08c52)
@@ -161,15 +161,18 @@
QaContent qaContent=qaService.loadQa(toolContentId.longValue());
logger.debug("existing qaContent:" + qaContent);
- Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService);
- logger.debug("summaryToolSessions: " + summaryToolSessions);
- if (summaryToolSessions.isEmpty())
+
+ if (qaService.studentActivityOccurredGlobal(qaContent))
{
- /* inform in the Summary tab that the tool has no active sessions */
+ request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(false).toString());
+ logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
+ }
+ else
+ {
request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString());
logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
}
-
+
refreshStatsData(request);
request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(false));
@@ -217,15 +220,17 @@
QaContent qaContent=qaService.loadQa(toolContentId.longValue());
logger.debug("existing qaContent:" + qaContent);
- Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService);
- logger.debug("summaryToolSessions: " + summaryToolSessions);
- if (summaryToolSessions.isEmpty())
+ if (qaService.studentActivityOccurredGlobal(qaContent))
{
- /* inform in the Summary tab that the tool has no active sessions */
+ request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(false).toString());
+ logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
+ }
+ else
+ {
request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString());
logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
}
-
+
refreshInstructionsData(request, qaContent);
request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(false));
@@ -339,19 +344,23 @@
/* this section is related to summary tab. Starts here. */
Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService);
logger.debug("summaryToolSessions: " + summaryToolSessions);
- if (summaryToolSessions.isEmpty())
- {
- /* inform in the Summary tab that the tool has no active sessions */
- request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString());
- logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
- }
-
request.getSession().setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions);
logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getSession().getAttribute(SUMMARY_TOOL_SESSIONS));
/* ends here. */
-
- request.getSession().setAttribute(CURRENT_MONITORING_TAB, "summary");
-
+
+
+ if (qaService.studentActivityOccurredGlobal(qaContent))
+ {
+ request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(false).toString());
+ logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
+ }
+ else
+ {
+ request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString());
+ logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
+ }
+
+ request.getSession().setAttribute(CURRENT_MONITORING_TAB, "summary");
return (mapping.findForward(LOAD_MONITORING));
}
@@ -705,14 +714,20 @@
/* this section is related to summary tab. Starts here. */
Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService);
logger.debug("summaryToolSessions: " + summaryToolSessions);
- if (summaryToolSessions.isEmpty())
+ request.getSession().setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions);
+
+
+ if (qaService.studentActivityOccurredGlobal(qaContent))
{
- QaUtils.cleanUpSessionAbsolute(request);
- /* inform in the Summary tab that the tool has no active sessions */
+ request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(false).toString());
+ logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
+ }
+ else
+ {
request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString());
logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
}
- request.getSession().setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions);
+
Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService);
logger.debug("summaryToolSessionsId: " + summaryToolSessionsId);
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java
===================================================================
diff -u -re9b9a4b7a0e27ad4a900150c29a30cd0e1eff428 -r18ebee3fd6c583b848ef9aebba2c8204dae08c52
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision e9b9a4b7a0e27ad4a900150c29a30cd0e1eff428)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 18ebee3fd6c583b848ef9aebba2c8204dae08c52)
@@ -114,6 +114,9 @@
request.getSession().setAttribute(CURRENT_MONITORING_TAB, "summary");
request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(false));
+ /*by default display summary data*/
+ request.setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(false).toString());
+
/*
* persist time zone information to session scope.
*/
Index: lams_tool_laqa/web/WEB-INF/struts-config.xml
===================================================================
diff -u -r5ce575b11f3206c1e80792d2a2be752612bd26d7 -r18ebee3fd6c583b848ef9aebba2c8204dae08c52
--- lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 5ce575b11f3206c1e80792d2a2be752612bd26d7)
+++ lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 18ebee3fd6c583b848ef9aebba2c8204dae08c52)
@@ -168,7 +168,7 @@
name="QaLearningForm"
scope="session"
unknown="false"
- validate="false"
+ validate="true"
input="/learningIndex.jsp">
@@ -233,7 +233,7 @@
input="/learning/AnswersContent.jsp"
parameter="method"
unknown="false"
- validate="false">
+ validate="true">