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.41 -r1.42
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java 6 Mar 2006 13:35:55 -0000 1.41
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java 6 Mar 2006 21:25:24 -0000 1.42
@@ -193,7 +193,8 @@
public static final String CHECK_ALL_SESSIONS_COMPLETED ="checkAllSessionsCompleted";
public static final String FROM_TOOL_CONTENT_ID ="fromToolContentId";
public static final String TO_TOOL_CONTENT_ID ="toToolContentId";
- public static final String LEARNER_REPORT ="learnerReport";
+ public static final String LEARNER_REPORT ="learnerRep";
+ public static final String REQUEST_LEARNING_REPORT ="requestLearningReport";
/*
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.23 -r1.24
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties 6 Mar 2006 11:13:27 -0000 1.23
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties 6 Mar 2006 21:25:24 -0000 1.24
@@ -146,6 +146,7 @@
monitoring.feedback.instructionUpdate =The content has been updated successfully.
label.content.notEditable =The content can not be edited since it is being used by learners.
+label.learning.report =Learning 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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/Attic/QaUtils.java,v
diff -u -r1.30 -r1.31
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java 6 Mar 2006 13:35:55 -0000 1.30
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java 6 Mar 2006 21:25:24 -0000 1.31
@@ -548,6 +548,8 @@
request.getSession().removeAttribute(IS_MONITORED_CONTENT_IN_USE);
request.getSession().removeAttribute(LOAD_MONITORING_CONTENT_EDITACTIVITY);
request.getSession().removeAttribute(MONITORING_ORIGINATED_DEFINELATER);
+ request.getSession().removeAttribute(REQUEST_LEARNING_REPORT);
+
request.getSession().removeAttribute(USER_EXCEPTION_WRONG_FORMAT);
request.getSession().removeAttribute(USER_EXCEPTION_UNCOMPATIBLE_IDS);
request.getSession().removeAttribute(USER_EXCEPTION_NUMBERFORMAT);
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java,v
diff -u -r1.28 -r1.29
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java 3 Mar 2006 16:51:29 -0000 1.28
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java 6 Mar 2006 21:25:24 -0000 1.29
@@ -40,7 +40,7 @@
/**
- * This interface define the contract that all Survey service provider must
+ * This interface define the contract that all Q/A service provider must
* follow.
*
* @author Ozgur Demirtas
@@ -53,7 +53,7 @@
* @return the qa object
*/
- public QaContent retrieveQa(long toolContentId);
+ public QaContent retrieveQa(long toolContentId) throws QaApplicationException;;
/**
@@ -62,95 +62,92 @@
* @return the qa object or null
*/
- public QaContent loadQa(long toolContentId);
+ public QaContent loadQa(long toolContentId) throws QaApplicationException;;
- public QaContent getQaContentByUID(Long uid);
+ public QaContent getQaContentByUID(Long uid) throws QaApplicationException;;
- public int getTotalNumberOfUsers();
+ public int getTotalNumberOfUsers() throws QaApplicationException;;
- public int countSessionComplete();
+ public int countSessionComplete() throws QaApplicationException;;
/**
* Return the question content object according to the requested question content id.
* @param qaQueContentId qa question content id
* @return the qa question object
*/
- public QaQueContent retrieveQaQue(long qaQueContentId);
+ public QaQueContent retrieveQaQue(long qaQueContentId) throws QaApplicationException;;
- public QaQueUsr loadQaQueUsr(Long userId);
+ public QaQueUsr loadQaQueUsr(Long userId) throws QaApplicationException;;
- public List getAttemptsForUserAndQuestionContent(final Long queUsrId, final Long qaQueContentId);
+ public List getAttemptsForUserAndQuestionContent(final Long queUsrId, final Long qaQueContentId) throws QaApplicationException;;
- public void createQaQue(QaQueContent qaQueContent);
+ public void createQaQue(QaQueContent qaQueContent) throws QaApplicationException;;
- public void createQaUsrResp(QaUsrResp qaUsrResp);
+ public void createQaUsrResp(QaUsrResp qaUsrResp) throws QaApplicationException;;
- public QaUsrResp retrieveQaUsrResp(long responseId);
+ public QaUsrResp retrieveQaUsrResp(long responseId) throws QaApplicationException;;
- public void updateQaUsrResp(QaUsrResp qaUsrResp);
+ public void updateQaUsrResp(QaUsrResp qaUsrResp) throws QaApplicationException;;
/**
* Return the qa session object according to the requested session id.
* @param qaSessionId qa session id
* @return the qa session object
*/
- public QaSession retrieveQaSession(long qaSessionId);
+ public QaSession retrieveQaSession(long qaSessionId) throws QaApplicationException;;
public QaSession retrieveQaSessionOrNullById(long qaSessionId) throws QaApplicationException;
- public void createQaSession(QaSession qaSession);
+ public void createQaSession(QaSession qaSession) throws QaApplicationException;;
- public List getSessionNamesFromContent(QaContent qaContent);
+ public List getSessionNamesFromContent(QaContent qaContent) throws QaApplicationException;;
- public String getSessionNameById(long qaSessionId);
+ public String getSessionNameById(long qaSessionId) throws QaApplicationException;;
public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException;
- public List getSessionsFromContent(QaContent qaContent);
+ public List getSessionsFromContent(QaContent qaContent) throws QaApplicationException;;
- public void createQaQueUsr(QaQueUsr qaQueUsr);
+ public void createQaQueUsr(QaQueUsr qaQueUsr) throws QaApplicationException;;
- public void updateQaSession(QaSession qaSession);
+ public void updateQaSession(QaSession qaSession) throws QaApplicationException;;
/**
* Return the qa que user object according to the requested usr id.
* @param qaQaUsrId qa usr id
* @return the qa que usr object
*/
- public QaQueUsr retrieveQaQueUsr(long qaQaUsrId);
+ public QaQueUsr retrieveQaQueUsr(long qaQaUsrId) throws QaApplicationException;;
- public QaQueUsr getQaQueUsrById(long qaQueUsrId);
+ public QaQueUsr getQaQueUsrById(long qaQueUsrId) throws QaApplicationException;;
- public void updateQa(QaContent qa);
+ public void updateQa(QaContent qa) throws QaApplicationException;;
- public void createQa(QaContent qa);
+ public void createQa(QaContent qa) throws QaApplicationException;;
- public void deleteQa(QaContent qa);
+ public void deleteQa(QaContent qa) throws QaApplicationException;;
public void deleteQaSession(QaSession QaSession) throws QaApplicationException;
- public void deleteUsrRespByQueId(Long qaQueId);
+ public void deleteUsrRespByQueId(Long qaQueId) throws QaApplicationException;;
- public void deleteQaById(Long qaId);
+ public void deleteQaById(Long qaId) throws QaApplicationException;;
- public void deleteQaQueUsr(QaQueUsr qaQueUsr);
+ public void deleteQaQueUsr(QaQueUsr qaQueUsr) throws QaApplicationException;;
- public void removeUserResponse(QaUsrResp resp);
+ public void removeUserResponse(QaUsrResp resp) throws QaApplicationException;;
public List getAllQuestionEntries(final Long uid) throws QaApplicationException;
- public User getCurrentUserData(String username);
+ public User getCurrentUserData(String username) throws QaApplicationException;;
- public List getUserBySessionOnly(final QaSession qaSession);
+ public List getUserBySessionOnly(final QaSession qaSession) throws QaApplicationException;;
/**
- *
* copyToolContent(Long fromContentId, Long toContentId)
- * should ideally should not be part this interface as it is
- * already part of the interface ToolSessionManager. It is here for development purposes.
* return void
* @param fromContentId
* @param toContentId
@@ -159,51 +156,39 @@
public void setAsDefineLater(Long toolContentId) throws DataMissingException, ToolException;
- public void unsetAsDefineLater(Long toolContentId);
+ public void unsetAsDefineLater(Long toolContentId) throws QaApplicationException;;
public void setAsRunOffline(Long toolContentId) throws DataMissingException, ToolException;
- /**
- * TO BE DEFINED AS PART OF MAIN TOOL API
- * updates user's tool session status from INCOMPLETE to COMPLETED
- * @param userId
- */
- public void setAsForceComplete(Long userId);
+ public void setAsForceComplete(Long userId) throws QaApplicationException;;
- /**
- * TO BE DEFINED AS PART OF MAIN TOOL API
- * @param toolSessionId
- */
- public void setAsForceCompleteSession(Long toolSessionId);
+ public void setAsForceCompleteSession(Long toolSessionId) throws QaApplicationException;;
- public boolean studentActivityOccurred(QaContent qa);
+ public boolean studentActivityOccurred(QaContent qa) throws QaApplicationException;;
- public boolean studentActivityOccurredGlobal(QaContent qaContent);
+ public boolean studentActivityOccurredGlobal(QaContent qaContent) throws QaApplicationException;;
/**
- * removeToolContent(Long toolContentId) should ideally should not be part this interface as it is
- * already part of the interface ToolSessionManager. It is here for development purposes.
+ * removeToolContent(Long toolContentId)
* return void
* @param toolContentId
*/
- public void removeToolContent(Long toolContentId);
+ public void removeToolContent(Long toolContentId) throws QaApplicationException;;
/**
- * createToolSession(Long toolSessionId,String toolSessionName, Long toolContentId) should ideally should not be part this interface as it is
- * already part of the interface ToolSessionManager. It is here for development purposes.
+ * createToolSession(Long toolSessionId,String toolSessionName, Long toolContentId)
*
- * It is also defined here since in development we want to be able call it directly from our web-layer
+ * It is also defined here since in development we want to be able call it directly from the web-layer
* instead of it being called by the container.
* @param toolSessionId
* @param toolContentId
*/
public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException;
/**
- * leaveToolSession(Long toolSessionId, Long learnerId) should ideally should not be part this interface as it is
- * already part of the interface ToolSessionManager. It is here for development purposes.
+ * leaveToolSession(Long toolSessionId, Long learnerId)
*
* It is also defined here since in development we want to be able call it directly from our web-layer
* instead of it being called by the container.
@@ -212,15 +197,15 @@
*/
public String leaveToolSession(Long toolSessionId,Long learnerId) throws DataMissingException, ToolException;
- public BasicToolVO getToolBySignature(String toolSignature);
+ public BasicToolVO getToolBySignature(String toolSignature) throws QaApplicationException;;
- public long getToolDefaultContentIdBySignature(String toolSignature);
+ public long getToolDefaultContentIdBySignature(String toolSignature) throws QaApplicationException;;
- public int countSessionUser(QaSession qaSession);
+ public int countSessionUser(QaSession qaSession) throws QaApplicationException;;
- public List getToolSessionsForContent(QaContent qa);
+ public List getToolSessionsForContent(QaContent qa) throws QaApplicationException;;
- public QaQueContent getToolDefaultQuestionContent(long contentId);
+ public QaQueContent getToolDefaultQuestionContent(long contentId) throws QaApplicationException;;
public void configureContentRepository() throws QaApplicationException;
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java,v
diff -u -r1.37 -r1.38
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java 3 Mar 2006 16:51:29 -0000 1.37
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java 6 Mar 2006 21:25:24 -0000 1.38
@@ -42,7 +42,6 @@
import org.lamsfoundation.lams.contentrepository.service.RepositoryProxy;
import org.lamsfoundation.lams.contentrepository.service.SimpleCredentials;
import org.lamsfoundation.lams.learning.service.ILearnerService;
-import org.lamsfoundation.lams.lesson.Lesson;
import org.lamsfoundation.lams.tool.BasicToolVO;
import org.lamsfoundation.lams.tool.ToolContentManager;
import org.lamsfoundation.lams.tool.ToolSessionExportOutputData;
@@ -96,7 +95,6 @@
{
static Logger logger = Logger.getLogger(QaServicePOJO.class.getName());
- /*repository access related constants */
private final String repositoryUser = "laqa11";
private final char[] repositoryId = {'l','a','q','a','_','1', '1'};
private final String repositoryWorkspace = "laqa11";
@@ -184,7 +182,7 @@
}
/**
- * same as retrieveQa(long toolContentId) except that returns null if not found
+ * returns null if not found
*/
public QaContent loadQa(long toolContentId) throws QaApplicationException
{
@@ -206,7 +204,6 @@
{
try
{
-
logger.debug("attempt service createQaQue: " + qaQueContent);
qaQueContentDAO.createQueContent(qaQueContent);
logger.debug("after servicecreateQaQue: " + qaQueContent);
@@ -234,7 +231,7 @@
}
- public List getSessionNamesFromContent(QaContent qaContent)
+ public List getSessionNamesFromContent(QaContent qaContent) throws QaApplicationException
{
try
{
@@ -249,7 +246,7 @@
}
- public String getSessionNameById(long qaSessionId)
+ public String getSessionNameById(long qaSessionId) throws QaApplicationException
{
try
{
@@ -471,7 +468,9 @@
}
}
- public List retrieveQaQueContentsByToolContentId(long qaContentId){
+
+ public List retrieveQaQueContentsByToolContentId(long qaContentId) throws QaApplicationException
+ {
try
{
return qaQueContentDAO.getQaQueContentsByContentId(qaContentId);
@@ -682,33 +681,7 @@
}
}
- /**
- *
- * Unused method
- * @param lessonId
- * @return
- * @throws QaApplicationException
- */
- public Lesson getCurrentLesson(long lessonId) throws QaApplicationException
- {
- try
- {
- /**this is a mock implementation to make the project compile and
- work. When the Lesson service is ready, we need to switch to
- real service implmenation.
- */
- return new Lesson();
- /**return lsDAO.find(lsessionId); */
- }
- catch (DataAccessException e)
- {
- throw new QaApplicationException("Exception occured when lams is loading"
- + " learning session:"
- + e.getMessage(),
- e);
- }
- }
-
+
public void saveQaContent(QaContent qa) throws QaApplicationException
{
try
@@ -773,9 +746,6 @@
while (responsesIterator.hasNext())
{
logger.debug("there is at least one response");
- /*
- * proved the fact that there is at least one response for this content.
- */
return true;
}
}
@@ -824,7 +794,6 @@
/**
- * TESTED
* gets called ONLY when a lesson is being created in monitoring mode.
* Should create the new content(toContent) based on what the author has created her content with. In q/a tool's case
* that is content + question's content but not user responses. The deep copy should go only as far as
@@ -913,11 +882,8 @@
/**
- * TO BE DEFINED-FUTURE API
* setAsForceCompleteSession(Long toolSessionId) throws QaApplicationException
- *
* update the tool session status to COMPLETE for this tool session
- * IMPLEMENT THIS!!!! Is this from ToolContentManager???
*
* @param Long toolSessionId
*/
@@ -935,12 +901,8 @@
/**
- * TO BE DEFINED
* setAsForceComplete(Long userId) throws QaApplicationException
- *
- * TESTED
* update the tool session status to COMPLETE for this user
- * IMPLEMENT THIS!!!! Is this from ToolContentManager???
* @param userId
*/
public void setAsForceComplete(Long userId) throws QaApplicationException
@@ -968,10 +930,6 @@
logger.debug("qaSession uses qaContent : " + qaContent);
logger.debug("qaSession uses qaContentId : " + qaContent.getQaContentId());
- /*
- * if all the sessions of this content is COMPLETED, unlock the content
- *
- */
int countIncompleteSession=countIncompleteSession(qaContent);
logger.debug("qaSession countIncompleteSession : " + countIncompleteSession);
@@ -1019,10 +977,9 @@
logger.debug("qaContent has been updated for unsetAsDefineLater: " + qaContent);
}
+
/**
* setAsDefineLater(Long toolContentId) throws DataMissingException, ToolException
- * TESTED
- * set the defineLater to true on this content
*
* @param toolContentId
* return void
@@ -1048,7 +1005,6 @@
/**
* setAsRunOffline(Long toolContentId) throws DataMissingException, ToolException
- * TESTED
* set the runOffline to true on this content
*
* @param toolContentId
@@ -1077,8 +1033,6 @@
/**
*
* removeToolContent(Long toolContentId)
- * ! UNUSED !
- * TESTED
* gets automatically called only in monitoring mode when the author chooses to delete a lesson.
*
* The idea is to remove content + its relevant sessions + in q/a tools's case the question's content from the db.
@@ -1124,11 +1078,11 @@
}
}
- public void removeQuestions(Long toolContentId){
+ public void removeQuestions(Long toolContentId) throws QaApplicationException
+ {
QaContent qaContent = qaDAO.loadQaById(toolContentId.longValue());
qaContent.setQaQueContents(new TreeSet());
-
if (qaContent != null)
{
Iterator sessionIterator=qaContent.getQaSessions().iterator();
@@ -1158,7 +1112,6 @@
/**
- * DOUBLE CHECK!
* removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException
* Will need an update on the core tool signature: reason : when qaContent is null throw an exception
*
@@ -1248,7 +1201,6 @@
/**
* createToolSession(Long toolSessionId,String toolSessionName, Long toolContentId) throws ToolException
- * TESTED
* ToolSessionManager CONTRACT : creates a tool session with the incoming toolSessionId in the tool session table
*
* gets called only in the Learner mode.
@@ -1310,7 +1262,6 @@
}
logger.debug("final - retrieved qaContent: " + qaContent);
-
/*
* create a new a new tool session if it does not already exist in the tool session table
*/
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServiceProxy.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServiceProxy.java,v
diff -u -r1.5 -r1.6
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServiceProxy.java 24 Feb 2006 15:06:00 -0000 1.5
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServiceProxy.java 6 Mar 2006 21:25:24 -0000 1.6
@@ -41,7 +41,7 @@
public class QaServiceProxy
{
/**
- * Return the survey domain service object. It will delegate to the Spring
+ * Return the q/a domain service object. It will delegate to the Spring
* helper method to retrieve the proper bean from Spring bean factory.
* @param servletContext the servletContext for current application
* @return qaService object.
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.19 -r1.20
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java 4 Mar 2006 05:42:42 -0000 1.19
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java 6 Mar 2006 21:25:45 -0000 1.20
@@ -190,7 +190,7 @@
request.getSession().setAttribute(USER_FEEDBACK, userFeedback);
}
- public void lockContent(long toolContentId, IQaService qaService)
+ public void setContentInUse(long toolContentId, IQaService qaService)
{
QaContent qaContent=qaService.loadQa(toolContentId);
logger.debug("retrieve qaContent: " + qaContent);
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.18 -r1.19
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java 5 Mar 2006 23:08:48 -0000 1.18
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java 6 Mar 2006 21:25:45 -0000 1.19
@@ -41,6 +41,7 @@
import org.lamsfoundation.lams.tool.qa.QaUsrResp;
import org.lamsfoundation.lams.tool.qa.QaUtils;
import org.lamsfoundation.lams.tool.qa.service.IQaService;
+import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy;
import org.lamsfoundation.lams.web.util.AttributeNames;
/**
@@ -79,14 +80,8 @@
}
-
-
-
-
-
-
/**
* updateResponse(HttpServletRequest request, String responseId, String updatedResponse)
* @param qaService
@@ -220,7 +215,7 @@
public static List buildGroupsQuestionData(HttpServletRequest request, QaContent qaContent)
{
IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE);
- logger.debug("qaService: " + qaService);
+ logger.debug("qaService: " + qaService);
logger.debug("will be building groups question data for content:..." + qaContent);
List listQuestions=qaService.getAllQuestionEntries(qaContent.getUid());
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/Attic/QAction.java,v
diff -u -r1.30 -r1.31
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QAction.java 6 Mar 2006 13:35:55 -0000 1.30
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QAction.java 6 Mar 2006 21:25:45 -0000 1.31
@@ -550,15 +550,31 @@
*/
if (qaLearningForm.getSubmitAnswersContent() != null)
{
+ request.getSession().setAttribute(TOOL_SERVICE, qaService);
+ logger.debug("qaService: " + qaService);
+
logger.debug(logger + " " + this.getClass().getName() + "submit the responses: " + mapAnswers);
/*recreate the users and responses*/
learningUtil.createUsersAndResponses(mapAnswers, request, qaService);
qaLearningForm.resetUserActions();
qaLearningForm.setSubmitAnswersContent(null);
Long toolContentId=(Long) request.getSession().getAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID);
- learningUtil.lockContent(toolContentId.longValue(), qaService);
- logger.debug("content has been locked");
- return (mapping.findForward(LEARNER_REPORT));
+ learningUtil.setContentInUse(toolContentId.longValue(), qaService);
+ logger.debug("content has been set in use");
+
+ logger.debug("start generating learning report...");
+ Long toolContentID=(Long) request.getSession().getAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID);
+ logger.debug("toolContentID: " + toolContentID);
+ QaContent qaContent=qaService.loadQa(toolContentID.longValue());
+ logger.debug("qaContent: " + qaContent);
+
+ QaMonitoringAction qaMonitoringAction= new QaMonitoringAction();
+ logger.debug("refreshing summary data...");
+ qaMonitoringAction.refreshSummaryData(request, qaContent, qaService);
+
+ request.getSession().setAttribute(REQUEST_LEARNING_REPORT, new Boolean(true).toString());
+ logger.debug("fwd'ing to." + LEARNER_REPORT);
+ return (mapping.findForward(LEARNER_REPORT));
}
/*
* Simulate learner leaving the current tool session. This will normally gets called by the container by
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningForm.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/Attic/QaLearningForm.java,v
diff -u -r1.6 -r1.7
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningForm.java 24 Feb 2006 15:05:59 -0000 1.6
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningForm.java 6 Mar 2006 21:25:45 -0000 1.7
@@ -42,7 +42,9 @@
protected String getPreviousQuestion;
protected String endLearning;
+ protected String responseId;
+
/**
* reset user actions in learning mode
* @param qaAuthoringForm
@@ -129,4 +131,16 @@
public void setEndLearning(String endLearning) {
this.endLearning = endLearning;
}
+ /**
+ * @return Returns the responseId.
+ */
+ public String getResponseId() {
+ return responseId;
}
+ /**
+ * @param responseId The responseId to set.
+ */
+ public void setResponseId(String responseId) {
+ this.responseId = responseId;
+ }
+}
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.22 -r1.23
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java 6 Mar 2006 13:35:55 -0000 1.22
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java 6 Mar 2006 21:25:45 -0000 1.23
@@ -433,10 +433,10 @@
UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
if ((user == null) || (user.getUserID() == null))
{
+ QaUtils.cleanUpSessionAbsolute(request);
logger.debug("error: The tool expects userId");
- request.setAttribute(USER_EXCEPTION_USER_DOESNOTEXIST, new Boolean(true).toString());
+ request.getSession().setAttribute(USER_EXCEPTION_USER_DOESNOTEXIST, new Boolean(true).toString());
persistError(request,"error.learningUser.notAvailable");
- QaUtils.cleanUpSessionAbsolute(request);
return (mapping.findForward(ERROR_LIST_LEARNER));
}else
userID = user.getUserID().toString();
@@ -452,9 +452,9 @@
long toolSessionId=0;
if ((strToolSessionId == null) || (strToolSessionId.length() == 0))
{
- request.setAttribute(USER_EXCEPTION_TOOLSESSIONID_REQUIRED, new Boolean(true).toString());
- persistError(request, "error.toolSessionId.required");
QaUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_TOOLSESSIONID_REQUIRED, new Boolean(true).toString());
+ persistError(request, "error.toolSessionId.required");
return (mapping.findForward(ERROR_LIST_LEARNER));
}
else
@@ -467,10 +467,10 @@
}
catch(NumberFormatException e)
{
- request.setAttribute(USER_EXCEPTION_NUMBERFORMAT, new Boolean(true).toString());
+ QaUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_NUMBERFORMAT, new Boolean(true).toString());
persistError(request, "error.sessionId.numberFormatException");
logger.debug("add error.sessionId.numberFormatException to ActionMessages.");
- QaUtils.cleanUpSessionAbsolute(request);
return (mapping.findForward(ERROR_LIST_LEARNER));
}
}
@@ -481,17 +481,17 @@
if ((mode == null) || (mode.length() == 0))
{
- request.setAttribute(USER_EXCEPTION_MODE_REQUIRED, new Boolean(true).toString());
- persistError(request, "error.mode.required");
QaUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_MODE_REQUIRED, new Boolean(true).toString());
+ persistError(request, "error.mode.required");
return (mapping.findForward(ERROR_LIST_LEARNER));
}
if ((!mode.equals("learner")) && (!mode.equals("teacher")) && (!mode.equals("author")))
{
- request.setAttribute(USER_EXCEPTION_MODE_INVALID, new Boolean(true).toString());
- persistError(request, "error.mode.invalid");
QaUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_MODE_INVALID, new Boolean(true).toString());
+ persistError(request, "error.mode.invalid");
return (mapping.findForward(ERROR_LIST_LEARNER));
}
logger.debug("session LEARNING_MODE set to:" + mode);
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.19 -r1.20
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java 6 Mar 2006 11:13:28 -0000 1.19
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java 6 Mar 2006 21:25:45 -0000 1.20
@@ -458,6 +458,41 @@
}
+ public void refreshSummaryData(HttpServletRequest request, QaContent qaContent, IQaService qaService)
+ {
+ /* this section is related to summary tab. Starts here. */
+ Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService);
+ logger.debug("summaryToolSessions: " + summaryToolSessions);
+ if (summaryToolSessions.isEmpty())
+ {
+ QaUtils.cleanUpSessionAbsolute(request);
+ /* inform in the Summary tab that the tool has no active sessions */
+ 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);
+ request.getSession().setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId);
+
+
+ /* SELECTION_CASE == 2 indicates start up */
+ request.getSession().setAttribute(SELECTION_CASE, new Long(2));
+ logger.debug("SELECTION_CASE: " + request.getSession().getAttribute(SELECTION_CASE));
+
+ /* Default to All for tool Sessions so that all tool sessions' summary information gets displayed when the module starts up */
+ request.getSession().setAttribute(CURRENT_MONITORED_TOOL_SESSION, "All");
+ logger.debug("CURRENT_MONITORED_TOOL_SESSION: " + request.getSession().getAttribute(CURRENT_MONITORED_TOOL_SESSION));
+
+ List listMonitoredAnswersContainerDTO=MonitoringUtil.buildGroupsQuestionData(request, qaContent);
+ request.getSession().setAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO, listMonitoredAnswersContainerDTO);
+ logger.debug("LIST_MONITORED_ANSWERS_CONTAINER_DTO: " + request.getSession().getAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO));
+ /* ends here. */
+ }
+
+
public void refreshStatsData(HttpServletRequest request)
{
/* it is possible that no users has ever logged in for the activity yet*/
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/Attic/QaMonitoringForm.java,v
diff -u -r1.11 -r1.12
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java 5 Mar 2006 19:09:03 -0000 1.11
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java 6 Mar 2006 21:25:45 -0000 1.12
@@ -35,8 +35,6 @@
// controls which method is called by the Lookup map */
protected String method;
- protected String responseId;
-
protected String selectedToolSessionId;
protected String isToolSessionChanged;
@@ -78,17 +76,4 @@
public void setMethod(String method) {
this.method = method;
}
-
- /**
- * @return Returns the responseId.
- */
- public String getResponseId() {
- return responseId;
- }
- /**
- * @param responseId The responseId to set.
- */
- public void setResponseId(String responseId) {
- this.responseId = responseId;
- }
}
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.23 -r1.24
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java 6 Mar 2006 13:35:55 -0000 1.23
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java 6 Mar 2006 21:25:45 -0000 1.24
@@ -106,41 +106,13 @@
request.getSession().setAttribute(USER_EXCEPTION_CONTENT_IN_USE, new Boolean(true).toString());
}
-
- /* this section is related to summary tab. Starts here. */
- Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService);
- logger.debug("summaryToolSessions: " + summaryToolSessions);
- if (summaryToolSessions.isEmpty())
- {
- QaUtils.cleanUpSessionAbsolute(request);
- /* inform in the Summary tab that the tool has no active sessions */
- 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);
- request.getSession().setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId);
-
-
- /* SELECTION_CASE == 2 indicates start up */
- request.getSession().setAttribute(SELECTION_CASE, new Long(2));
- logger.debug("SELECTION_CASE: " + request.getSession().getAttribute(SELECTION_CASE));
-
- /* Default to All for tool Sessions so that all tool sessions' summary information gets displayed when the module starts up */
- request.getSession().setAttribute(CURRENT_MONITORED_TOOL_SESSION, "All");
- logger.debug("CURRENT_MONITORED_TOOL_SESSION: " + request.getSession().getAttribute(CURRENT_MONITORED_TOOL_SESSION));
-
- List listMonitoredAnswersContainerDTO=MonitoringUtil.buildGroupsQuestionData(request, qaContent);
- request.getSession().setAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO, listMonitoredAnswersContainerDTO);
- logger.debug("LIST_MONITORED_ANSWERS_CONTAINER_DTO: " + request.getSession().getAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO));
- /* ends here. */
-
QaMonitoringAction qaMonitoringAction= new QaMonitoringAction();
+ logger.debug("refreshing summary data...");
+ qaMonitoringAction.refreshSummaryData(request, qaContent, qaService);
+
logger.debug("refreshing stats data...");
qaMonitoringAction.refreshStatsData(request);
+
logger.debug("refreshing instructions data...");
qaMonitoringAction.refreshInstructionsData(request, qaContent);
@@ -149,7 +121,6 @@
return true;
}
-
/**
* validates request paramaters based on tool contract
Index: lams_tool_laqa/web/WEB-INF/struts-config.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/WEB-INF/struts-config.xml,v
diff -u -r1.18 -r1.19
--- lams_tool_laqa/web/WEB-INF/struts-config.xml 5 Mar 2006 23:08:48 -0000 1.18
+++ lams_tool_laqa/web/WEB-INF/struts-config.xml 6 Mar 2006 21:25:24 -0000 1.19
@@ -124,11 +124,18 @@
/>
+
+
+
+
+
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_laqa/web/learning/learnerReport.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_laqa/web/monitoring/LearnerRep.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/monitoring/Attic/LearnerRep.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_laqa/web/monitoring/LearnerRep.jsp 6 Mar 2006 21:25:24 -0000 1.1
@@ -0,0 +1,107 @@
+<%--
+Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+http://www.gnu.org/licenses/gpl.txt
+--%>
+
+<%@ taglib uri="tags-bean" prefix="bean"%>
+<%@ taglib uri="tags-html" prefix="html"%>
+<%@ taglib uri="tags-logic" prefix="logic" %>
+<%@ taglib uri="tags-core" prefix="c"%>
+<%@ taglib uri="tags-fmt" prefix="fmt" %>
+<%@ taglib uri="fck-editor" prefix="FCK" %>
+<%@ taglib uri="tags-lams" prefix="lams" %>
+
+
+
+
+
+
+
+
+
+
+
+ includes/javascript/tabcontroller.js">
+ includes/javascript/common.js">
+
+
+ css/tool_custom.css" rel="stylesheet" type="text/css">
+
+
+
+
+
+
+
+
+
+
+
+
+