Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaCondition.java =================================================================== diff -u -r501ddb69e1c739b90388262f41b4927356cb0449 -r046d789cf4472c7f0a8b38702ebef2e243efb157 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaCondition.java (.../QaCondition.java) (revision 501ddb69e1c739b90388262f41b4927356cb0449) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaCondition.java (.../QaCondition.java) (revision 046d789cf4472c7f0a8b38702ebef2e243efb157) @@ -54,7 +54,6 @@ * the words that make the condition's parameters. */ private Set questions = new TreeSet(new QaQueContentComparator()); - private static Logger log = Logger.getLogger(QaCondition.class); public SortedSet temporaryQuestionDTOSet = new TreeSet( new QaQuestionContentDTOComparator()); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUploadedFile.java =================================================================== diff -u -r501ddb69e1c739b90388262f41b4927356cb0449 -r046d789cf4472c7f0a8b38702ebef2e243efb157 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUploadedFile.java (.../QaUploadedFile.java) (revision 501ddb69e1c739b90388262f41b4927356cb0449) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUploadedFile.java (.../QaUploadedFile.java) (revision 046d789cf4472c7f0a8b38702ebef2e243efb157) @@ -51,7 +51,6 @@ */ public class QaUploadedFile implements Serializable, Comparable { - static Logger logger = Logger.getLogger(QaUploadedFile.class.getName()); /** identifier field */ private Long submissionId; @@ -92,7 +91,6 @@ } public QaUploadedFile(String uuid, boolean fileOnline, String fileName, QaContent qaContent) { - logger.debug("constructor gets called."); this.uuid = uuid; this.fileOnline = fileOnline; this.fileName = fileName; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java =================================================================== diff -u -r91f0740e75daa643981b757e49d1ed2ed7f0a528 -r046d789cf4472c7f0a8b38702ebef2e243efb157 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 91f0740e75daa643981b757e49d1ed2ed7f0a528) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 046d789cf4472c7f0a8b38702ebef2e243efb157) @@ -111,6 +111,8 @@ protected String allowRichEditor; + protected String useSelectLeaderToolOuput; + protected String allowRateAnswers; /** @@ -704,6 +706,14 @@ this.allowRichEditor = allowRichEditor; } + public String getUseSelectLeaderToolOuput() { + return useSelectLeaderToolOuput; + } + + public void setUseSelectLeaderToolOuput(String useSelectLeaderToolOuput) { + this.useSelectLeaderToolOuput = useSelectLeaderToolOuput; + } + public String getAllowRateAnswers() { return allowRateAnswers; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/QaGeneralAuthoringDTO.java =================================================================== diff -u -r91f0740e75daa643981b757e49d1ed2ed7f0a528 -r046d789cf4472c7f0a8b38702ebef2e243efb157 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/QaGeneralAuthoringDTO.java (.../QaGeneralAuthoringDTO.java) (revision 91f0740e75daa643981b757e49d1ed2ed7f0a528) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/QaGeneralAuthoringDTO.java (.../QaGeneralAuthoringDTO.java) (revision 046d789cf4472c7f0a8b38702ebef2e243efb157) @@ -60,6 +60,7 @@ protected String editActivityEditMode; protected String reflectionSubject; protected Boolean allowRichEditor; + protected Boolean useSelectLeaderToolOuput; protected String monitoredContentInUse; @@ -611,5 +612,13 @@ this.allowRichEditor = allowRichEditor; } + public Boolean getUseSelectLeaderToolOuput() { + return useSelectLeaderToolOuput; + } + + public void setUseSelectLeaderToolOuput(Boolean useSelectLeaderToolOuput) { + this.useSelectLeaderToolOuput = useSelectLeaderToolOuput; + } + } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java =================================================================== diff -u -r6578a27494e05e43b274023060899ede28b17e59 -r046d789cf4472c7f0a8b38702ebef2e243efb157 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision 6578a27494e05e43b274023060899ede28b17e59) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision 046d789cf4472c7f0a8b38702ebef2e243efb157) @@ -58,10 +58,8 @@ public String doExport(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) { - logger.debug("dispathcing doExport"); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); - logger.debug("basePath:" + basePath); if (StringUtils.equals(mode, ToolAccessMode.LEARNER.toString())) { learner(request, response, directoryName, cookies); @@ -127,9 +125,7 @@ throw new QaApplicationException(error); } - logger.debug("calling learning mode toolSessionID:" + toolSessionID + " userID: " + userID); QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - logger.debug("start refreshSummaryData for learner mode."); GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(content); generalLearnerFlowDTO.setUserUid(learner != null ? learner.getQueUsrId().toString() : null); @@ -139,18 +135,16 @@ qaMonitoringAction .refreshSummaryData(request, content, qaService, content.isUsernameVisible(), true, toolSessionID .toString(), userID.toString(), generalLearnerFlowDTO, false, toolSessionID.toString()); - logger.debug("end refreshSummaryData for learner mode."); qaMonitoringAction.prepareReflectionData(request, content, qaService, userID.toString(), true, toolSessionID.toString()); } generalLearnerFlowDTO = (GeneralLearnerFlowDTO) request.getAttribute(GENERAL_LEARNER_FLOW_DTO); - logger.debug("for the special case of export portfolio we place generalLearnerFlowDTO into session scope"); + //for the special case of export portfolio we place generalLearnerFlowDTO into session scope request.getSession().setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); request.getSession().setAttribute(PORTFOLIO_EXPORT_MODE, "learner"); - logger.debug("ending learner mode: "); } public void teacher(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) { Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java =================================================================== diff -u -rcd0b7b82232971e95d54348b03049beb1dfe0ecb -r046d789cf4472c7f0a8b38702ebef2e243efb157 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision cd0b7b82232971e95d54348b03049beb1dfe0ecb) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 046d789cf4472c7f0a8b38702ebef2e243efb157) @@ -66,7 +66,6 @@ * */ public class MonitoringUtil implements QaAppConstants { - static Logger logger = Logger.getLogger(MonitoringUtil.class.getName()); /** * populates all the tool sessions in a map Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java =================================================================== diff -u -r501ddb69e1c739b90388262f41b4927356cb0449 -r046d789cf4472c7f0a8b38702ebef2e243efb157 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 501ddb69e1c739b90388262f41b4927356cb0449) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 046d789cf4472c7f0a8b38702ebef2e243efb157) @@ -74,26 +74,7 @@ import org.springframework.web.context.support.WebApplicationContextUtils; /** - * setAsForceComplete(Long userId) throws QaApplicationException ? - */ - -/** - *

- * Action class that controls the logic of tool behavior. - *

* - *

- * Note that Struts action class only has the responsibility to navigate page - * flow. All database operation should go to service layer and data - * transformation from domain model to struts form bean should go to form bean - * class. This ensure clean and maintainable code. - *

- * - * SystemException is thrown whenever an known error condition is - * identified. No system exception error handling code should appear in the - * Struts action class as all of them are handled in - * CustomStrutsExceptionHandler. - * * @author Ozgur Demirtas * - - * */ public class QaAction extends LamsDispatchAction implements QaAppConstants { static Logger logger = Logger.getLogger(QaAction.class.getName()); @@ -196,9 +175,6 @@ /** * submits content into the tool database ActionForward - * submitAllContent(ActionMapping mapping, ActionForm form, - * HttpServletRequest request, HttpServletResponse response) throws - * IOException, ServletException * * @param mapping * @param form @@ -302,15 +278,12 @@ */ authoringUtil.removeRedundantQuestions(listQuestionContentDTO, qaService, qaAuthoringForm, request, strToolContentID); - QaAction.logger.debug("end of removing unused entries... "); qaContent = authoringUtil.saveOrUpdateQaContent(listQuestionContentDTO, qaService, qaAuthoringForm, request, qaContentTest, strToolContentID, conditionSet); long defaultContentID = 0; - QaAction.logger.debug("attempt retrieving tool with signatute : " + QaAppConstants.MY_SIGNATURE); defaultContentID = qaService.getToolDefaultContentIdBySignature(QaAppConstants.MY_SIGNATURE); - QaAction.logger.debug("retrieved tool default contentId: " + defaultContentID); if (qaContent != null) { qaGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString()); @@ -382,7 +355,6 @@ qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); qaAuthoringForm.setCurrentTab("1"); - QaAction.logger.debug("forwarding to :" + QaAppConstants.LOAD_QUESTIONS); return mapping.findForward(QaAppConstants.LOAD_QUESTIONS); } @@ -400,7 +372,6 @@ public ActionForward saveSingleQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaAction.logger.debug("dispathcing saveSingleQuestion"); QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); @@ -446,9 +417,8 @@ if (newQuestion != null && newQuestion.length() > 0) { if (editQuestionBoxRequest != null && editQuestionBoxRequest.equals("false")) { - QaAction.logger.debug("request for add and save"); + //request for add and save boolean duplicates = AuthoringUtil.checkDuplicateQuestions(listQuestionContentDTO, newQuestion); - QaAction.logger.debug("duplicates: " + duplicates); if (!duplicates) { QaQuestionDTO qaQuestionDTO = null; @@ -476,10 +446,10 @@ listQuestionContentDTO = AuthoringUtil.reorderUpdateListQuestionContentDTO(listQuestionContentDTO, qaQuestionDTO, editableQuestionIndex); } else { - QaAction.logger.debug("duplicate question entry, not adding"); + //duplicate question entry, not adding } } else { - QaAction.logger.debug("request for edit and save."); + //request for edit and save QaQuestionDTO qaQuestionDTO = null; Iterator listIterator = listQuestionContentDTO.iterator(); while (listIterator.hasNext()) { @@ -505,7 +475,7 @@ qaQuestionDTO, editableQuestionIndex); } } else { - QaAction.logger.debug("entry blank, not adding"); + //entry blank, not adding } request.setAttribute(QaAppConstants.LIST_QUESTION_CONTENT_DTO, listQuestionContentDTO); @@ -630,11 +600,10 @@ feedback, requiredBoolean); listQuestionContentDTO.add(qaQuestionDTO); } else { - QaAction.logger.debug("entry duplicate, not adding"); - + //entry duplicate, not adding } } else { - QaAction.logger.debug("entry blank, not adding"); + //entry blank, not adding } request.setAttribute(QaAppConstants.LIST_QUESTION_CONTENT_DTO, listQuestionContentDTO); @@ -709,7 +678,6 @@ */ public ActionForward newQuestionBox(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaAction.logger.debug("dispathcing newQuestionBox"); QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); @@ -782,7 +750,6 @@ */ public ActionForward newEditableQuestionBox(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaAction.logger.debug("dispathcing newEditableQuestionBox"); QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); @@ -928,9 +895,7 @@ listQuestionContentDTO = AuthoringUtil.reorderListQuestionContentDTO(listQuestionContentDTO, questionIndex); - QaAction.logger.debug("listQuestionContentDTO reordered:" + listQuestionContentDTO); - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); qaAuthoringForm.setContentFolderID(contentFolderID); @@ -951,7 +916,6 @@ QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); if (qaContent == null) { - QaAction.logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent = qaService.getQa(new Long(defaultContentIdStr).longValue()); } @@ -963,7 +927,6 @@ qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - QaAction.logger.debug("activeModule: " + activeModule); if (activeModule.equals(QaAppConstants.AUTHORING)) { String onlineInstructions = (String) sessionMap.get(QaAppConstants.ONLINE_INSTRUCTIONS_KEY); qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); @@ -1025,7 +988,6 @@ */ public ActionForward moveQuestionDown(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaAction.logger.debug("dispatching moveQuestionDown"); QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); @@ -1073,7 +1035,6 @@ qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - QaAction.logger.debug("activeModule: " + activeModule); if (activeModule.equals(QaAppConstants.AUTHORING)) { String onlineInstructions = (String) sessionMap.get(QaAppConstants.ONLINE_INSTRUCTIONS_KEY); qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); @@ -1231,10 +1192,7 @@ } /** - * adds a new file to content repository ActionForward - * addNewFile(ActionMapping mapping, ActionForm form, HttpServletRequest - * request, HttpServletResponse response) throws IOException, - * ServletException + * adds a new file to content repository * * @param mapping * @param form @@ -1246,7 +1204,6 @@ */ public ActionForward addNewFile(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaAction.logger.debug("dispathching addNewFile"); QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); @@ -1338,10 +1295,7 @@ } /** - * deletes a file from the content repository ActionForward - * deleteFile(ActionMapping mapping, ActionForm form, HttpServletRequest - * request, HttpServletResponse response) throws IOException, - * ServletException + * deletes a file from the content repository * * @param mapping * @param form @@ -1353,7 +1307,6 @@ */ public ActionForward deleteFile(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaAction.logger.debug("dispatching deleteFile"); QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); @@ -1452,7 +1405,6 @@ /** * persists error messages to request scope * - * persistError(HttpServletRequest request, String message) * * @param request * @param message @@ -1464,16 +1416,13 @@ } /** - * addFileToContentRepository(HttpServletRequest request, QaAuthoringForm - * qaAuthoringForm) * * @param request * @param qaAuthoringForm */ public void addFileToContentRepository(HttpServletRequest request, QaAuthoringForm qaAuthoringForm, List attachmentList, List deletedAttachmentList, SessionMap sessionMap, QaGeneralAuthoringDTO qaGeneralAuthoringDTO) { - QaAction.logger.debug("attempt addFileToContentRepository"); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); if (attachmentList == null) { @@ -1488,11 +1437,11 @@ boolean isOnlineFile = false; String fileType = null; if (qaAuthoringForm.getTheOfflineFile() != null && qaAuthoringForm.getTheOfflineFile().getFileSize() > 0) { - QaAction.logger.debug("theOfflineFile is available: "); + //theOfflineFile is available uploadedFile = qaAuthoringForm.getTheOfflineFile(); fileType = IToolContentHandler.TYPE_OFFLINE; } else if (qaAuthoringForm.getTheOnlineFile() != null && qaAuthoringForm.getTheOnlineFile().getFileSize() > 0) { - QaAction.logger.debug("theOnlineFile is available: "); + //theOnlineFile is available uploadedFile = qaAuthoringForm.getTheOnlineFile(); isOnlineFile = true; fileType = IToolContentHandler.TYPE_ONLINE; @@ -1509,8 +1458,6 @@ return; } - QaAction.logger.debug("uploadedFile.getFileName(): " + uploadedFile.getFileName()); - /* * if a file with the same name already exists then move the old one to deleted */ @@ -1526,12 +1473,9 @@ uploadedFile.getFileName(), uploadedFile.getContentType(), fileType); QaUploadedFile file = new QaUploadedFile(); String fileName = uploadedFile.getFileName(); - QaAction.logger.debug("fileName: " + fileName); - QaAction.logger.debug("fileName length: " + fileName.length()); if (fileName != null && fileName.length() > 30) { fileName = fileName.substring(0, 31); - QaAction.logger.debug("shortened fileName: " + fileName); } file.setFileName(fileName); @@ -1590,16 +1534,13 @@ private List saveAttachments(QaContent qaContent, List attachmentList, List deletedAttachmentList, ActionMapping mapping, HttpServletRequest request) { - QaAction.logger.debug("start saveAttachments"); - if (attachmentList == null || deletedAttachmentList == null) { return null; } IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); if (deletedAttachmentList != null) { - QaAction.logger.debug("deletedAttachmentList is iterated..."); Iterator iter = deletedAttachmentList.iterator(); while (iter.hasNext()) { QaUploadedFile attachment = (QaUploadedFile) iter.next(); @@ -1611,15 +1552,12 @@ } } deletedAttachmentList.clear(); - QaAction.logger.error("cleared attachment list."); } if (attachmentList != null) { - QaAction.logger.debug("attachmentList is iterated..."); Iterator iter = attachmentList.iterator(); while (iter.hasNext()) { QaUploadedFile attachment = (QaUploadedFile) iter.next(); - QaAction.logger.debug("attachment submission id: " + attachment.getSubmissionId()); if (attachment.getSubmissionId() == null) { /* @@ -1635,7 +1573,6 @@ public ActionForward editActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaAction.logger.debug("dispatching proxy editActivity..."); return null; } @@ -1703,10 +1640,7 @@ } /** - * generates Edit Activity screen ActionForward - * editActivityQuestions(ActionMapping mapping, ActionForm form, - * HttpServletRequest request, HttpServletResponse response) throws - * IOException, ServletException, ToolException + * generates Edit Activity screen * * @param mapping * @param form @@ -1719,7 +1653,6 @@ */ public ActionForward editActivityQuestions(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ToolException { - QaAction.logger.debug("dispatching editActivityQuestions..."); QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; @@ -1762,13 +1695,12 @@ qaGeneralAuthoringDTO.setMonitoredContentInUse(new Boolean(false).toString()); if (isContentInUse == true) { - QaAction.logger.debug("monitoring url does not allow editActivity since the content is in use."); + //monitoring url does not allow editActivity since the content is in use persistError(request, "error.content.inUse"); qaGeneralAuthoringDTO.setMonitoredContentInUse(new Boolean(true).toString()); } EditActivityDTO editActivityDTO = new EditActivityDTO(); - QaAction.logger.debug("isContentInUse:" + isContentInUse); if (isContentInUse == true) { editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); } @@ -1807,7 +1739,6 @@ request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - QaAction.logger.debug("forwarding to : " + QaAppConstants.LOAD_QUESTIONS); return mapping.findForward(QaAppConstants.LOAD_QUESTIONS); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaDLStarterAction.java =================================================================== diff -u -r91f0740e75daa643981b757e49d1ed2ed7f0a528 -r046d789cf4472c7f0a8b38702ebef2e243efb157 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaDLStarterAction.java (.../QaDLStarterAction.java) (revision 91f0740e75daa643981b757e49d1ed2ed7f0a528) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaDLStarterAction.java (.../QaDLStarterAction.java) (revision 046d789cf4472c7f0a8b38702ebef2e243efb157) @@ -75,12 +75,10 @@ import org.lamsfoundation.lams.tool.qa.web.form.QaAuthoringForm; public class QaDLStarterAction extends Action implements QaAppConstants { - static Logger logger = Logger.getLogger(QaDLStarterAction.class.getName()); public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, QaApplicationException { QaUtils.cleanUpSessionAbsolute(request); - logger.debug("init defineLater mode. removed attributes..."); QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java =================================================================== diff -u -rcd0b7b82232971e95d54348b03049beb1dfe0ecb -r046d789cf4472c7f0a8b38702ebef2e243efb157 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision cd0b7b82232971e95d54348b03049beb1dfe0ecb) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 046d789cf4472c7f0a8b38702ebef2e243efb157) @@ -154,14 +154,12 @@ @Override public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ToolException { - QaMonitoringAction.logger.debug("dispatching unspecified..."); return null; } public void initStatsContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, GeneralMonitoringDTO generalMonitoringDTO) throws IOException, ServletException { - QaMonitoringAction.logger.debug("starting initStatsContent..."); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; @@ -192,15 +190,12 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); } else { generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); } refreshStatsData(request, qaMonitoringForm, qaService, generalMonitoringDTO); @@ -240,17 +235,12 @@ request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - QaMonitoringAction.logger.debug("ending initStatsContent..."); - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); } /** * switches to instructions tab of the monitoring url. - * getInstructions(ActionMapping mapping, ActionForm form, - * HttpServletRequest request, HttpServletResponse response) throws - * IOException, ServletException * * @param mapping * @param form @@ -262,15 +252,13 @@ */ public ActionForward getInstructions(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispatching getInstructions..." + request); initInstructionsContent(mapping, form, request, response); return mapping.findForward(QaAppConstants.LOAD_MONITORING); } public void initInstructionsContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("starting initInstructionsContent..."); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; @@ -307,14 +295,11 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -361,9 +346,7 @@ } /** - * activates editActivity screen ActionForward editActivity(ActionMapping - * mapping, ActionForm form, HttpServletRequest request, HttpServletResponse - * response) throws IOException, ServletException + * activates editActivity screen * * @param mapping * @param form @@ -375,7 +358,6 @@ */ public ActionForward editActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispatching editActivity..."); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; @@ -419,9 +401,7 @@ GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("student activity occurred on this content:" + qaContent); generalMonitoringDTO.setUserExceptionContentInUse(new Boolean(true).toString()); - QaMonitoringAction.logger.debug("forwarding to: " + QaAppConstants.LOAD_MONITORING); return mapping.findForward(QaAppConstants.LOAD_MONITORING); } @@ -462,7 +442,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -474,18 +453,12 @@ MonitoringUtil.setUpMonitoring(request, qaService, qaContent); /* note that we are casting monitoring form subclass into Authoring form */ - QaMonitoringAction.logger - .debug("watch here: note that we are casting monitoring form subclass into Authoring form"); return qaStarterAction.executeDefineLater(mapping, qaMonitoringForm, request, response, qaService); } /** * switches to summary tab of the monitoring url * - * getSummary(ActionMapping mapping, ActionForm form, HttpServletRequest - * request, HttpServletResponse response) throws IOException, - * ServletException - * * @param mapping * @param form * @param request @@ -496,16 +469,13 @@ */ public ActionForward getSummary(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("start getSummary..."); initSummaryContent(mapping, form, request, response); return mapping.findForward(QaAppConstants.LOAD_MONITORING); } public void initSummaryContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("initSummaryContent..."); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); @@ -519,15 +489,12 @@ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); qaMonitoringForm.setToolContentID(strToolContentID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - qaMonitoringForm.setEditResponse(editResponse); QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); @@ -541,15 +508,12 @@ Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); /* true means there is at least 1 response */ if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -592,8 +556,6 @@ public ActionForward editActivityQuestions(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ToolException { - QaMonitoringAction.logger.debug("dispatching editActivityQuestions..."); - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; @@ -614,7 +576,6 @@ request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); qaMonitoringForm.setToolContentID(strToolContentID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); @@ -637,10 +598,8 @@ prepareReflectionData(request, qaContent, qaService, null, false, "All"); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -683,16 +642,14 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); String userExceptionNoToolSessions = generalMonitoringDTO.getUserExceptionNoToolSessions(); - QaMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions); if (userExceptionNoToolSessions.equals("true")) { - QaMonitoringAction.logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } } else { @@ -719,15 +676,13 @@ */ public ActionForward submitSession(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispatching submitSession..."); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - QaMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("All")) { request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); @@ -736,23 +691,18 @@ QaSession qaSession = qaService.getSessionById(new Long(currentMonitoredToolSession) .longValue()); - QaMonitoringAction.logger.debug("retrieving qaSession name: " + qaSession.getSession_name()); request.setAttribute(QaAppConstants.CURRENT_SESSION_NAME, qaSession.getSession_name()); } - QaMonitoringAction.logger.debug("SELECTION_CASE: " + request.getAttribute(QaAppConstants.SELECTION_CASE)); request.setAttribute(QaAppConstants.CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); qaMonitoringForm.setToolContentID(strToolContentID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - QaMonitoringAction.logger.debug("editResponse: " + editResponse); qaMonitoringForm.setEditResponse(editResponse); QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); @@ -763,7 +713,6 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); @@ -785,7 +734,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -800,10 +748,7 @@ } /** - * enables the user to edit responses ActionForward - * editResponse(ActionMapping mapping, ActionForm form, HttpServletRequest - * request, HttpServletResponse response) throws IOException, - * ServletException + * enables the user to edit responses * * @param mapping * @param form @@ -815,23 +760,18 @@ */ public ActionForward editResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispatching editResponse..."); - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - QaMonitoringAction.logger.debug("editResponse: " + editResponse); qaMonitoringForm.setEditResponse(editResponse); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); String responseId = qaMonitoringForm.getResponseId(); - QaMonitoringAction.logger.debug("responseId: " + responseId); request.getSession().setAttribute(QaAppConstants.EDITABLE_RESPONSE_ID, responseId); QaUsrResp qaUsrResp = qaService.getResponseById(new Long(responseId).longValue()); @@ -856,19 +796,16 @@ QaSession qaSession = qaService.getSessionById(new Long(currentMonitoredToolSession) .longValue()); - QaMonitoringAction.logger.debug("retrieving qaSession name: " + qaSession.getSession_name()); request.setAttribute(QaAppConstants.CURRENT_SESSION_NAME, qaSession.getSession_name()); } - QaMonitoringAction.logger.debug("SELECTION_CASE: " + request.getAttribute(QaAppConstants.SELECTION_CASE)); request.setAttribute(QaAppConstants.CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); @@ -890,7 +827,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -906,7 +842,6 @@ public ActionForward editGroupResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispatching editGroupResponse..."); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); @@ -918,15 +853,12 @@ qaMonitoringForm.setEditResponse(editResponse); String editableSessionId = request.getParameter("sessionId"); - QaMonitoringAction.logger.debug("editableSessionId: " + editableSessionId); request.setAttribute("editableSessionId", editableSessionId); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); String responseId = qaMonitoringForm.getResponseId(); - QaMonitoringAction.logger.debug("responseId: " + responseId); request.getSession().setAttribute(QaAppConstants.EDITABLE_RESPONSE_ID, responseId); QaUsrResp qaUsrResp = qaService.getResponseById(new Long(responseId).longValue()); @@ -938,7 +870,6 @@ String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - QaMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("")) { currentMonitoredToolSession = "All"; @@ -957,7 +888,6 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); @@ -979,7 +909,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -995,10 +924,7 @@ } /** - * enables the user to update responses ActionForward - * updateResponse(ActionMapping mapping, ActionForm form, HttpServletRequest - * request, HttpServletResponse response) throws IOException, - * ServletException + * enables the user to update responses * * @param mapping * @param form @@ -1010,23 +936,20 @@ */ public ActionForward updateResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispatching updateResponse..."); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); qaMonitoringForm.setEditResponse(editResponse); String responseId = qaMonitoringForm.getResponseId(); - QaMonitoringAction.logger.debug("responseId: " + responseId); String updatedResponse = request.getParameter("updatedResponse"); @@ -1042,12 +965,10 @@ qaUsrResp.setAnswer(updatedResponse); qaService.updateUserResponse(qaUsrResp); - QaMonitoringAction.logger.debug("response updated."); refreshUserInput(request, qaMonitoringForm); String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - QaMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("")) { currentMonitoredToolSession = "All"; @@ -1058,7 +979,6 @@ QaSession qaSession = qaService.getSessionById(new Long(currentMonitoredToolSession) .longValue()); - QaMonitoringAction.logger.debug("retrieving qaSession name: " + qaSession.getSession_name()); request.setAttribute(QaAppConstants.CURRENT_SESSION_NAME, qaSession.getSession_name()); } else { request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); @@ -1074,7 +994,6 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); @@ -1096,7 +1015,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -1112,23 +1030,20 @@ public ActionForward updateGroupResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispatching updateGroupResponse..."); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); qaMonitoringForm.setEditResponse(editResponse); String responseId = qaMonitoringForm.getResponseId(); - QaMonitoringAction.logger.debug("responseId: " + responseId); String updatedResponse = request.getParameter("updatedResponse"); @@ -1144,12 +1059,10 @@ qaUsrResp.setAnswer(updatedResponse); qaService.updateUserResponse(qaUsrResp); - QaMonitoringAction.logger.debug("response updated."); refreshUserInput(request, qaMonitoringForm); String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - QaMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("")) { currentMonitoredToolSession = "All"; @@ -1166,11 +1079,9 @@ Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessions: " + summaryToolSessions); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); @@ -1192,7 +1103,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -1208,10 +1118,7 @@ } /** - * enables the user to delete responses ActionForward - * deleteResponse(ActionMapping mapping, ActionForm form, HttpServletRequest - * request, HttpServletResponse response) throws IOException, - * ServletException + * enables the user to delete responses * * @param mapping * @param form @@ -1223,23 +1130,20 @@ */ public ActionForward deleteResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispatching deleteResponse..."); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); qaMonitoringForm.setEditResponse(editResponse); String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - QaMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("")) { currentMonitoredToolSession = "All"; @@ -1263,11 +1167,9 @@ Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessions: " + summaryToolSessions); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); @@ -1289,7 +1191,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -1304,12 +1205,10 @@ } /** - * refreshUserInput(HttpServletRequest request) * * @param request */ public void refreshUserInput(HttpServletRequest request, QaMonitoringForm qaMonitoringForm) { - QaMonitoringAction.logger.debug("starting refreshUserInput: " + qaMonitoringForm); IQaService qaService = null; if (getServlet() != null) { @@ -1320,22 +1219,18 @@ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); qaMonitoringForm.setToolContentID(strToolContentID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessions: " + summaryToolSessions); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); // prepareReflectionData(request, qaContent, qaService,null, false); @@ -1350,7 +1245,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -1412,10 +1306,8 @@ } if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -1499,8 +1391,7 @@ } /** - * populates data for stats screen refreshStatsData(HttpServletRequest - * request) + * populates data for stats screen * * @param request */ @@ -1511,7 +1402,6 @@ /* it is possible that no users has ever logged in for the activity yet */ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); qaMonitoringForm.setToolContentID(strToolContentID); QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); @@ -1522,21 +1412,18 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); int countAllUsers = qaService.getTotalNumberOfUsers(qaContent); - QaMonitoringAction.logger.debug("countAllUsers: " + countAllUsers); if (countAllUsers == 0) { - QaMonitoringAction.logger.debug("error: countAllUsers is 0"); + //error: countAllUsers is 0 generalMonitoringDTO.setUserExceptionNoStudentActivity(new Boolean(true).toString()); } generalMonitoringDTO.setCountAllUsers(new Integer(countAllUsers).toString()); int countSessionComplete = qaService.countSessionComplete(qaContent); - QaMonitoringAction.logger.debug("countSessionComplete: " + countSessionComplete); generalMonitoringDTO.setCountSessionComplete(new Integer(countSessionComplete).toString()); @@ -1556,12 +1443,10 @@ request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - QaMonitoringAction.logger.debug("ending refreshStatsData"); request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -1575,7 +1460,6 @@ public ActionForward showResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ToolException { - QaMonitoringAction.logger.debug("dispatching showResponse..."); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); @@ -1591,11 +1475,9 @@ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); qaMonitoringForm.setToolContentID(strToolContentID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); @@ -1610,11 +1492,9 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - QaMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("")) { currentMonitoredToolSession = "All"; @@ -1634,7 +1514,6 @@ QaSession qaSession = qaService.getSessionById(new Long(currentMonitoredToolSession) .longValue()); - QaMonitoringAction.logger.debug("retrieving qaSession name: " + qaSession.getSession_name()); request.setAttribute(QaAppConstants.CURRENT_SESSION_NAME, qaSession.getSession_name()); } @@ -1654,7 +1533,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -1665,7 +1543,7 @@ MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - QaMonitoringAction.logger.debug("submitting session to refresh the data from the database: "); + //submitting session to refresh the data from the database return mapping.findForward(QaAppConstants.LOAD_MONITORING); } @@ -1684,11 +1562,9 @@ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); qaMonitoringForm.setToolContentID(strToolContentID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); @@ -1703,11 +1579,9 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - QaMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("")) { currentMonitoredToolSession = "All"; @@ -1741,7 +1615,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -1753,7 +1626,7 @@ MonitoringUtil.setUpMonitoring(request, qaService, qaContent); request.setAttribute("currentMonitoredToolSession", "All"); - QaMonitoringAction.logger.debug("submitting session to refresh the data from the database: "); + //submitting session to refresh the data from the database return mapping.findForward(QaAppConstants.LOAD_MONITORING); } @@ -1788,11 +1661,9 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - QaMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("")) { currentMonitoredToolSession = "All"; @@ -1803,12 +1674,10 @@ QaSession qaSession = qaService.getSessionById(new Long(currentMonitoredToolSession) .longValue()); - QaMonitoringAction.logger.debug("retrieving qaSession name: " + qaSession.getSession_name()); request.setAttribute(QaAppConstants.CURRENT_SESSION_NAME, qaSession.getSession_name()); } else { request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); } - request.setAttribute(QaAppConstants.CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); @@ -1831,7 +1700,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -1841,7 +1709,7 @@ MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - QaMonitoringAction.logger.debug("submitting session to refresh the data from the database: "); + //submitting session to refresh the data from the database return mapping.findForward(QaAppConstants.LOAD_MONITORING); } @@ -1864,7 +1732,6 @@ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); qaMonitoringForm.setToolContentID(strToolContentID); String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); @@ -1879,11 +1746,9 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - QaMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - QaMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("")) { currentMonitoredToolSession = "All"; @@ -1895,8 +1760,6 @@ request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); } - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); @@ -1916,7 +1779,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -1927,39 +1789,27 @@ MonitoringUtil.setUpMonitoring(request, qaService, qaContent); request.setAttribute("currentMonitoredToolSession", "All"); - QaMonitoringAction.logger.debug("submitting session to refresh the data from the database: "); + //submitting session to refresh the data from the database return mapping.findForward(QaAppConstants.LOAD_MONITORING); } public ActionForward openNotebook(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ToolException { - QaMonitoringAction.logger.debug("dispatching openNotebook..."); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); String uid = request.getParameter("uid"); - QaMonitoringAction.logger.debug("uid: " + uid); - String userId = request.getParameter("userId"); - QaMonitoringAction.logger.debug("userId: " + userId); - String userName = request.getParameter("userName"); - QaMonitoringAction.logger.debug("userName: " + userName); - String sessionId = request.getParameter("sessionId"); - QaMonitoringAction.logger.debug("sessionId: " + sessionId); - NotebookEntry notebookEntry = qaService.getEntry(new Long(sessionId), CoreNotebookConstants.NOTEBOOK_TOOL, QaAppConstants.MY_SIGNATURE, new Integer(userId)); - - GeneralLearnerFlowDTO generalLearnerFlowDTO = new GeneralLearnerFlowDTO(); if (notebookEntry != null) { String notebookEntryPresentable = QaUtils.replaceNewLines(notebookEntry.getEntry()); @@ -1984,10 +1834,8 @@ generalMonitoringDTO.setAttachmentList(attachmentList); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -1996,16 +1844,14 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); - if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); String userExceptionNoToolSessions = generalMonitoringDTO.getUserExceptionNoToolSessions(); if (userExceptionNoToolSessions.equals("true")) { - QaMonitoringAction.logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } } else { @@ -2041,34 +1887,28 @@ String httpSessionID = request.getParameter("httpSessionID"); - QaMonitoringAction.logger.debug("httpSessionID: " + httpSessionID); SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaAuthoringForm.setContentFolderID(contentFolderID); String activeModule = request.getParameter(QaAppConstants.ACTIVE_MODULE); String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); String defaultContentIdStr = request.getParameter(QaAppConstants.DEFAULT_CONTENT_ID_STR); - QaMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr); List listQuestionContentDTO = (List) sessionMap.get(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY); ActionMessages errors = new ActionMessages(); - QaMonitoringAction.logger.debug("listQuestionContentDTO size: " + listQuestionContentDTO.size()); if (listQuestionContentDTO.size() == 0) { ActionMessage error = new ActionMessage("questions.none.submitted"); errors.add(ActionMessages.GLOBAL_MESSAGE, error); } - QaMonitoringAction.logger.debug("errors: " + errors); AuthoringUtil authoringUtil = new AuthoringUtil(); @@ -2085,15 +1925,10 @@ sessionMap.put(QaAppConstants.ACTIVITY_TITLE_KEY, richTextTitle); sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); - - QaMonitoringAction.logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); - - QaMonitoringAction.logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); QaContent qaContentTest = qaService.getQa(new Long(strToolContentID).longValue()); - QaMonitoringAction.logger.debug("errors: " + errors); if (!errors.isEmpty()) { saveErrors(request, errors); QaMonitoringAction.logger.debug("errors saved: " + errors); @@ -2116,41 +1951,32 @@ long defaultContentID = 0; - QaMonitoringAction.logger.debug("attempt retrieving tool with signatute : " + QaAppConstants.MY_SIGNATURE); defaultContentID = qaService.getToolDefaultContentIdBySignature(QaAppConstants.MY_SIGNATURE); - QaMonitoringAction.logger.debug("retrieved tool default contentId: " + defaultContentID); if (qaContent != null) { qaGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString()); } authoringUtil.reOrganizeDisplayOrder(qaService, qaAuthoringForm, qaContent); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); QaUtils.setDefineLater(request, false, strToolContentID, qaService); - QaMonitoringAction.logger.debug("define later set to false"); QaUtils.setFormProperties(request, qaService, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("errors is not empty: " + errors); + //errors is not empty if (qaContent != null) { long defaultContentID = 0; - QaMonitoringAction.logger.debug("attempt retrieving tool with signatute : " - + QaAppConstants.MY_SIGNATURE); defaultContentID = qaService.getToolDefaultContentIdBySignature(QaAppConstants.MY_SIGNATURE); - QaMonitoringAction.logger.debug("retrieved tool default contentId: " + defaultContentID); - if (qaContent != null) { qaGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString()); } QaUtils.setFormProperties(request, qaService, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); - } qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); } @@ -2179,12 +2005,9 @@ qaAuthoringForm.setCurrentTab("3"); /* start monitoring code */ - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -2212,7 +2035,7 @@ if (userExceptionNoToolSessions.equals("true")) { - QaMonitoringAction.logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } } else { @@ -2227,43 +2050,27 @@ public ActionForward saveSingleQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - - QaMonitoringAction.logger.debug("dispathcing proxy saveSingleQuestion"); - /* start authoring code */ QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; - QaMonitoringAction.logger.debug("dispathcing saveSingleQuestion"); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); String httpSessionID = request.getParameter("httpSessionID"); - QaMonitoringAction.logger.debug("httpSessionID: " + httpSessionID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaAuthoringForm.setContentFolderID(contentFolderID); String editQuestionBoxRequest = request.getParameter("editQuestionBoxRequest"); String activeModule = request.getParameter(QaAppConstants.ACTIVE_MODULE); - QaMonitoringAction.logger.debug("activeModule: " + activeModule); - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); - String defaultContentIdStr = request.getParameter(QaAppConstants.DEFAULT_CONTENT_ID_STR); - QaMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr); - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - if (qaContent == null) { - QaMonitoringAction.logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent = qaService.getQa(new Long(defaultContentIdStr).longValue()); } @@ -2289,13 +2096,10 @@ } String editableQuestionIndex = request.getParameter("editableQuestionIndex"); - QaMonitoringAction.logger.debug("editableQuestionIndex: " + editableQuestionIndex); if (newQuestion != null && newQuestion.length() > 0) { if (editQuestionBoxRequest != null && editQuestionBoxRequest.equals("false")) { - QaMonitoringAction.logger.debug("request for add and save"); boolean duplicates = AuthoringUtil.checkDuplicateQuestions(listQuestionContentDTO, newQuestion); - QaMonitoringAction.logger.debug("duplicates: " + duplicates); if (!duplicates) { QaQuestionDTO qaQuestionDTO = null; @@ -2323,10 +2127,10 @@ listQuestionContentDTO = AuthoringUtil.reorderUpdateListQuestionContentDTO(listQuestionContentDTO, qaQuestionDTO, editableQuestionIndex); } else { - QaMonitoringAction.logger.debug("duplicate question entry, not adding"); + //duplicate question entry, not adding } } else { - QaMonitoringAction.logger.debug("request for edit and save."); + //request for edit and save QaQuestionDTO qaQuestionDTO = null; Iterator listIterator = listQuestionContentDTO.iterator(); while (listIterator.hasNext()) { @@ -2354,7 +2158,7 @@ qaQuestionDTO, editableQuestionIndex); } } else { - QaMonitoringAction.logger.debug("entry blank, not adding"); + //entry blank, not adding } request.setAttribute(QaAppConstants.LIST_QUESTION_CONTENT_DTO, listQuestionContentDTO); @@ -2396,9 +2200,6 @@ request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - QaMonitoringAction.logger.debug("httpSessionID: " + httpSessionID); - - request.getSession().setAttribute(httpSessionID, sessionMap); request.setAttribute(QaAppConstants.TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); @@ -2408,10 +2209,8 @@ qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); @@ -2431,7 +2230,6 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); @@ -2440,7 +2238,7 @@ if (userExceptionNoToolSessions.equals("true")) { - QaMonitoringAction.logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } } else { @@ -2455,39 +2253,31 @@ public ActionForward addSingleQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispathcing proxy addSingleQuestion"); /* start authoring code */ QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; - QaMonitoringAction.logger.debug("dispathcing addSingleQuestion"); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); String httpSessionID = request.getParameter("httpSessionID"); - QaMonitoringAction.logger.debug("httpSessionID: " + httpSessionID); SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaAuthoringForm.setContentFolderID(contentFolderID); String activeModule = request.getParameter(QaAppConstants.ACTIVE_MODULE); - QaMonitoringAction.logger.debug("activeModule: " + activeModule); String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); String defaultContentIdStr = request.getParameter(QaAppConstants.DEFAULT_CONTENT_ID_STR); - QaMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr); QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); if (qaContent == null) { - QaMonitoringAction.logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent = qaService.getQa(new Long(defaultContentIdStr).longValue()); } @@ -2516,18 +2306,17 @@ if (newQuestion != null && newQuestion.length() > 0) { boolean duplicates = AuthoringUtil.checkDuplicateQuestions(listQuestionContentDTO, newQuestion); - QaMonitoringAction.logger.debug("duplicates: " + duplicates); if (!duplicates) { QaQuestionDTO qaQuestionDTO = new QaQuestionDTO(newQuestion, new Long(listSize + 1).toString(), feedback, requiredBoolean); listQuestionContentDTO.add(qaQuestionDTO); } else { - QaMonitoringAction.logger.debug("entry duplicate, not adding"); + //entry duplicate, not adding } } else { - QaMonitoringAction.logger.debug("entry blank, not adding"); + //entry blank, not adding } request.setAttribute(QaAppConstants.LIST_QUESTION_CONTENT_DTO, listQuestionContentDTO); @@ -2566,9 +2355,6 @@ request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - QaMonitoringAction.logger.debug("httpSessionID: " + httpSessionID); - - request.getSession().setAttribute(httpSessionID, sessionMap); request.setAttribute(QaAppConstants.TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); @@ -2578,10 +2364,8 @@ qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -2601,16 +2385,14 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - QaMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions); if (userExceptionNoToolSessions.equals("true")) { - QaMonitoringAction.logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } } else { @@ -2625,39 +2407,26 @@ public ActionForward newQuestionBox(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispathcing proxy newQuestionBox"); /* start authoring code */ QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; - QaMonitoringAction.logger.debug("dispathcing newQuestionBox"); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); String httpSessionID = request.getParameter("httpSessionID"); - QaMonitoringAction.logger.debug("httpSessionID: " + httpSessionID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaAuthoringForm.setContentFolderID(contentFolderID); String activeModule = request.getParameter(QaAppConstants.ACTIVE_MODULE); - QaMonitoringAction.logger.debug("activeModule: " + activeModule); - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); - String defaultContentIdStr = request.getParameter(QaAppConstants.DEFAULT_CONTENT_ID_STR); - QaMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr); - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - if (qaContent == null) { - QaMonitoringAction.logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent = qaService.getQa(new Long(defaultContentIdStr).longValue()); } @@ -2689,10 +2458,8 @@ qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -2712,16 +2479,12 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); - if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - QaMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions); - if (userExceptionNoToolSessions.equals("true")) { - QaMonitoringAction.logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } } else { @@ -2736,24 +2499,17 @@ public ActionForward newEditableQuestionBox(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispathcing proxy newEditableQuestionBox"); - /* start authoring code */ QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; - QaMonitoringAction.logger.debug("dispathcing newEditableQuestionBox"); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); String httpSessionID = request.getParameter("httpSessionID"); - QaMonitoringAction.logger.debug("httpSessionID: " + httpSessionID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); - QaMonitoringAction.logger.debug("questionIndex: " + questionIndex); - qaAuthoringForm.setEditableQuestionIndex(questionIndex); List listQuestionContentDTO = (List) sessionMap.get(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY); @@ -2783,23 +2539,13 @@ String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaAuthoringForm.setContentFolderID(contentFolderID); String activeModule = request.getParameter(QaAppConstants.ACTIVE_MODULE); - QaMonitoringAction.logger.debug("activeModule: " + activeModule); - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); - String defaultContentIdStr = request.getParameter(QaAppConstants.DEFAULT_CONTENT_ID_STR); - QaMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr); - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - if (qaContent == null) { - QaMonitoringAction.logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent = qaService.getQa(new Long(defaultContentIdStr).longValue()); } @@ -2835,10 +2581,8 @@ qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -2858,16 +2602,14 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - QaMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions); if (userExceptionNoToolSessions.equals("true")) { - QaMonitoringAction.logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } @@ -2883,24 +2625,17 @@ public ActionForward removeQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispathcing proxy removeQuestion"); /* start authoring code */ QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; - QaMonitoringAction.logger.debug("dispathcing removeQuestion"); - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); String httpSessionID = request.getParameter("httpSessionID"); - QaMonitoringAction.logger.debug("httpSessionID: " + httpSessionID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); - QaMonitoringAction.logger.debug("questionIndex: " + questionIndex); - List listQuestionContentDTO = (List) sessionMap.get(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY); @@ -2913,8 +2648,6 @@ String question = qaQuestionDTO.getQuestion(); String displayOrder = qaQuestionDTO.getDisplayOrder(); - QaMonitoringAction.logger.debug("displayOrder:" + displayOrder); - if (displayOrder != null && !displayOrder.equals("")) { if (displayOrder.equals(questionIndex)) { break; @@ -2933,11 +2666,9 @@ sessionMap.put(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaAuthoringForm.setContentFolderID(contentFolderID); String activeModule = request.getParameter(QaAppConstants.ACTIVE_MODULE); - QaMonitoringAction.logger.debug("activeModule: " + activeModule); String richTextTitle = request.getParameter(QaAppConstants.TITLE); @@ -2949,16 +2680,13 @@ sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); String defaultContentIdStr = request.getParameter(QaAppConstants.DEFAULT_CONTENT_ID_STR); - QaMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr); QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); if (qaContent == null) { - QaMonitoringAction.logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent = qaService.getQa(new Long(defaultContentIdStr).longValue()); } @@ -3027,16 +2755,14 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - QaMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions); if (userExceptionNoToolSessions.equals("true")) { - QaMonitoringAction.logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } @@ -3052,23 +2778,19 @@ public ActionForward moveQuestionDown(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispathcing proxy moveQuestionDown"); /* start authoring code */ QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; - QaMonitoringAction.logger.debug("dispathcing moveQuestionDown"); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); String httpSessionID = request.getParameter("httpSessionID"); - QaMonitoringAction.logger.debug("httpSessionID: " + httpSessionID); SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); - QaMonitoringAction.logger.debug("questionIndex: " + questionIndex); List listQuestionContentDTO = (List) sessionMap.get(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY); @@ -3082,11 +2804,9 @@ sessionMap.put(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaAuthoringForm.setContentFolderID(contentFolderID); String activeModule = request.getParameter(QaAppConstants.ACTIVE_MODULE); - QaMonitoringAction.logger.debug("activeModule: " + activeModule); String richTextTitle = request.getParameter(QaAppConstants.TITLE); @@ -3098,16 +2818,13 @@ sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); String defaultContentIdStr = request.getParameter(QaAppConstants.DEFAULT_CONTENT_ID_STR); - QaMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr); QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); if (qaContent == null) { - QaMonitoringAction.logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent = qaService.getQa(new Long(defaultContentIdStr).longValue()); } @@ -3151,10 +2868,8 @@ GeneralMonitoringDTO qaGeneralMonitoringDTO = new GeneralMonitoringDTO(); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -3174,16 +2889,14 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - QaMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions); if (userExceptionNoToolSessions.equals("true")) { - QaMonitoringAction.logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } @@ -3200,23 +2913,19 @@ public ActionForward moveQuestionUp(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction.logger.debug("dispathcing proxy moveQuestionUp"); /* start authoring code */ QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; - QaMonitoringAction.logger.debug("dispathcing moveQuestionDown"); IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); String httpSessionID = request.getParameter("httpSessionID"); - QaMonitoringAction.logger.debug("httpSessionID: " + httpSessionID); SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); - QaMonitoringAction.logger.debug("questionIndex: " + questionIndex); List listQuestionContentDTO = (List) sessionMap.get(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY); @@ -3230,11 +2939,9 @@ sessionMap.put(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - QaMonitoringAction.logger.debug("contentFolderID: " + contentFolderID); qaAuthoringForm.setContentFolderID(contentFolderID); String activeModule = request.getParameter(QaAppConstants.ACTIVE_MODULE); - QaMonitoringAction.logger.debug("activeModule: " + activeModule); String richTextTitle = request.getParameter(QaAppConstants.TITLE); @@ -3246,16 +2953,13 @@ sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaMonitoringAction.logger.debug("strToolContentID: " + strToolContentID); String defaultContentIdStr = request.getParameter(QaAppConstants.DEFAULT_CONTENT_ID_STR); - QaMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr); QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); if (qaContent == null) { - QaMonitoringAction.logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent = qaService.getQa(new Long(defaultContentIdStr).longValue()); } @@ -3300,10 +3004,8 @@ GeneralMonitoringDTO qaGeneralMonitoringDTO = new GeneralMonitoringDTO(); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - QaMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -3323,16 +3025,14 @@ /* find out if there are any reflection entries, from here */ boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - QaMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - QaMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions); if (userExceptionNoToolSessions.equals("true")) { - QaMonitoringAction.logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } } else { @@ -3379,10 +3079,6 @@ public void prepareReflectionData(HttpServletRequest request, QaContent qaContent, IQaService qaService, String userID, boolean exportMode, String currentSessionId) { - - QaMonitoringAction.logger.debug("currentSessionId: " + currentSessionId); - QaMonitoringAction.logger.debug("userID: " + userID); - QaMonitoringAction.logger.debug("exportMode: " + exportMode); List reflectionsContainerDTO = new LinkedList(); /* @@ -3412,18 +3108,14 @@ * @return */ public List getReflectionList(QaContent qaContent, String userID, IQaService qaService) { - QaMonitoringAction.logger.debug("getting reflections for all sessions"); List reflectionsContainerDTO = new LinkedList(); if (userID == null) { - QaMonitoringAction.logger.debug("all users mode"); + //all users mode for (Iterator sessionIter = qaContent.getQaSessions().iterator(); sessionIter.hasNext();) { QaSession qaSession = (QaSession) sessionIter.next(); - - QaMonitoringAction.logger.debug("qaSession sessionId: " + qaSession.getQaSessionId()); for (Iterator userIter = qaSession.getQaQueUsers().iterator(); userIter.hasNext();) { QaQueUsr user = (QaQueUsr) userIter.next(); - QaMonitoringAction.logger.debug("user: " + user.getUsername()); NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), CoreNotebookConstants.NOTEBOOK_TOOL, QaAppConstants.MY_SIGNATURE, new Integer(user @@ -3444,16 +3136,14 @@ } } } else { - QaMonitoringAction.logger.debug("single user mode"); + //single user mode for (Iterator sessionIter = qaContent.getQaSessions().iterator(); sessionIter.hasNext();) { QaSession qaSession = (QaSession) sessionIter.next(); for (Iterator userIter = qaSession.getQaQueUsers().iterator(); userIter.hasNext();) { QaQueUsr user = (QaQueUsr) userIter.next(); - QaMonitoringAction.logger.debug("user: " + user.getUsername()); if (user.getQueUsrId().toString().equals(userID)) { - QaMonitoringAction.logger.debug("getting reflection for user with userID: " + userID); NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), CoreNotebookConstants.NOTEBOOK_TOOL, QaAppConstants.MY_SIGNATURE, new Integer(user .getQueUsrId().toString())); @@ -3492,12 +3182,10 @@ */ public List getReflectionListForSession(QaContent qaContent, String userID, IQaService qaService, String currentSessionId) { - QaMonitoringAction.logger.debug("getting reflections for a specific session"); - QaMonitoringAction.logger.debug("currentSessionId: " + currentSessionId); List reflectionsContainerDTO = new LinkedList(); if (userID == null) { - QaMonitoringAction.logger.debug("all users mode"); + //all users mode for (Iterator sessionIter = qaContent.getQaSessions().iterator(); sessionIter.hasNext();) { QaSession qaSession = (QaSession) sessionIter.next(); @@ -3529,18 +3217,16 @@ } } } else { - QaMonitoringAction.logger.debug("single user mode"); + //single user mode for (Iterator sessionIter = qaContent.getQaSessions().iterator(); sessionIter.hasNext();) { QaSession qaSession = (QaSession) sessionIter.next(); if (currentSessionId.equals(qaSession.getQaSessionId())) { for (Iterator userIter = qaSession.getQaQueUsers().iterator(); userIter.hasNext();) { QaQueUsr user = (QaQueUsr) userIter.next(); - QaMonitoringAction.logger.debug("user: " + user.getUsername()); if (user.getQueUsrId().toString().equals(userID)) { - QaMonitoringAction.logger.debug("getting reflection for user with userID: " + userID); NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), CoreNotebookConstants.NOTEBOOK_TOOL, QaAppConstants.MY_SIGNATURE, new Integer(user .getQueUsrId().toString())); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java =================================================================== diff -u -r501ddb69e1c739b90388262f41b4927356cb0449 -r046d789cf4472c7f0a8b38702ebef2e243efb157 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 501ddb69e1c739b90388262f41b4927356cb0449) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 046d789cf4472c7f0a8b38702ebef2e243efb157) @@ -84,7 +84,6 @@ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, QaApplicationException { - logger.debug("init QaMonitoringStarterAction..."); QaUtils.cleanUpSessionAbsolute(request); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; @@ -95,7 +94,6 @@ qaMonitoringForm.setQaService(qaService); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - logger.debug("contentFolderID: " + contentFolderID); qaMonitoringForm.setContentFolderID(contentFolderID); ActionForward validateParameters = validateParameters(request, mapping, qaMonitoringForm); @@ -107,12 +105,10 @@ GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); boolean initData = initialiseMonitoringData(mapping, qaMonitoringForm, request, response, qaService, generalMonitoringDTO); - logger.debug("initData: " + initData); if (initData == false) return (mapping.findForward(ERROR_LIST)); qaMonitoringForm.setCurrentTab("1"); - logger.debug("setting current tab to 1: "); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); generalMonitoringDTO.setContentFolderID(contentFolderID); @@ -127,10 +123,8 @@ /*true means there is at least 1 response*/ if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } @@ -194,16 +188,14 @@ request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - logger.debug("notebookEntriesExist : " + notebookEntriesExist); if (notebookEntriesExist) { request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); String userExceptionNoToolSessions = (String) generalMonitoringDTO.getUserExceptionNoToolSessions(); - logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions); if (userExceptionNoToolSessions.equals("true")) { - logger.debug("there are no online student activity but there are reflections : "); + //there are no online student activity but there are reflections request.setAttribute(NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } @@ -260,18 +252,15 @@ */ protected ActionForward validateParameters(HttpServletRequest request, ActionMapping mapping, QaMonitoringForm qaMonitoringForm) { - logger.debug("start validating monitoring parameters..."); String strToolContentId = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - logger.debug("strToolContentId: " + strToolContentId); if ((strToolContentId == null) || (strToolContentId.length() == 0)) { QaUtils.cleanUpSessionAbsolute(request); return (mapping.findForward(ERROR_LIST)); } else { try { long toolContentId = new Long(strToolContentId).longValue(); - logger.debug("passed TOOL_CONTENT_ID : " + new Long(toolContentId)); qaMonitoringForm.setToolContentID(new Long(toolContentId).toString()); } catch (NumberFormatException e) { @@ -292,7 +281,6 @@ public void persistError(HttpServletRequest request, String message) { ActionMessages errors = new ActionMessages(); errors.add(Globals.ERROR_KEY, new ActionMessage(message)); - logger.debug("add " + message + " to ActionMessages:"); saveErrors(request, errors); } }