Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McGeneralLearnerFlowDTO.java
===================================================================
diff -u -r0c60cb489cc847e68d85b76322e0790130ae1dc2 -rd7ee01a444dbd7fc671f945b5fb4f7c5d22ba01c
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McGeneralLearnerFlowDTO.java (.../McGeneralLearnerFlowDTO.java) (revision 0c60cb489cc847e68d85b76322e0790130ae1dc2)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McGeneralLearnerFlowDTO.java (.../McGeneralLearnerFlowDTO.java) (revision d7ee01a444dbd7fc671f945b5fb4f7c5d22ba01c)
@@ -77,8 +77,6 @@
protected Integer lowestMark;
protected Integer averageMark;
-
- protected String reportViewOnly;
protected String learnerProgress;
@@ -360,7 +358,6 @@
.append("questionListingMode: ", questionListingMode)
.append("learnerProgress: ", learnerProgress)
.append("displayAnswers: ", displayAnswers)
- .append("reportViewOnly: ", reportViewOnly)
.append("reflection: ", reflection)
.append("reflectionSubject: ", reflectionSubject)
.append("notebookEntry: ", notebookEntry)
@@ -490,20 +487,7 @@
public void setMapQuestionsContent(Map mapQuestionsContent) {
this.mapQuestionsContent = mapQuestionsContent;
}
-
/**
- * @return Returns the reportViewOnly.
- */
- public String getReportViewOnly() {
- return reportViewOnly;
- }
- /**
- * @param reportViewOnly The reportViewOnly to set.
- */
- public void setReportViewOnly(String reportViewOnly) {
- this.reportViewOnly = reportViewOnly;
- }
- /**
* @return Returns the reflection.
*/
public String getReflection() {
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java
===================================================================
diff -u -r31bfed6e9de7f7e92b1976ca98dbacd13d9cee0c -rd7ee01a444dbd7fc671f945b5fb4f7c5d22ba01c
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java (.../McLearningAction.java) (revision 31bfed6e9de7f7e92b1976ca98dbacd13d9cee0c)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java (.../McLearningAction.java) (revision d7ee01a444dbd7fc671f945b5fb4f7c5d22ba01c)
@@ -1098,7 +1098,6 @@
*/
public void prepareViewAnswersData(ActionMapping mapping, McLearningForm mcLearningForm,
HttpServletRequest request, HttpServletResponse response) {
- McLearningAction.logger.debug("running prepareViewAnswersData..." + mcLearningForm);
// may have to get service from the form - if class has been created by starter action, rather than by struts
IMcService mcService = null;
@@ -1114,11 +1113,6 @@
String toolContentId = mcSession.getMcContent().getMcContentId().toString();
McContent mcContent = mcService.retrieveMc(new Long(toolContentId));
- if (McLearningAction.logger.isDebugEnabled()) {
- McLearningAction.logger.debug("retrieving mcSession: " + mcSession);
- McLearningAction.logger.debug("mcContent: " + mcContent);
- }
-
McGeneralLearnerFlowDTO mcGeneralLearnerFlowDTO = LearningUtil.buildMcGeneralLearnerFlowDTO(mcContent);
Map mapQuestionsUidContent = AuthoringUtil.rebuildQuestionUidMapfromDB(request, new Long(toolContentId),
@@ -1143,21 +1137,14 @@
mcGeneralLearnerFlowDTO.setLearnerProgress(learnerProgress);
Boolean learnerProgressOn = Boolean.parseBoolean(learnerProgress);
- McLearningAction.logger.debug("learnerProgressOn:" + learnerProgressOn);
McQueUsr mcQueUsr = null;
if (learnerProgressOn.equals(Boolean.FALSE)) {
- McLearningAction.logger.debug("learnerProgress off, using user from session");
mcQueUsr = LearningUtil.getUser(request, mcService, toolSessionID);
} else {
- McLearningAction.logger.debug("using learnerProgressUserId: " + learnerProgressUserId);
mcQueUsr = mcService.getMcUserBySession(new Long(learnerProgressUserId), mcSession.getUid());
}
- if (McLearningAction.logger.isDebugEnabled()) {
- McLearningAction.logger.debug("final mcQueUsr: " + mcQueUsr);
- }
-
Long toolContentUID = mcContent.getUid();
Map[] attemptMaps = LearningUtil.getAttemptMapsForUser(mcContent.getMcQueContents().size(), toolContentUID,
@@ -1180,7 +1167,6 @@
mcGeneralLearnerFlowDTO.setNotebookEntry(notebookEntryPresentable);
}
- mcGeneralLearnerFlowDTO.setReportViewOnly(mcLearningForm.getReportViewOnly());
mcGeneralLearnerFlowDTO.setRetries(new Boolean(mcContent.isRetries()).toString());
mcGeneralLearnerFlowDTO.setPassMarkApplicable(new Boolean(mcContent.isPassMarkApplicable()).toString());
mcGeneralLearnerFlowDTO.setUserOverPassMark(new Boolean(mcQueUsr.isLastAttemptMarkPassed()).toString());
@@ -1199,12 +1185,7 @@
mcGeneralLearnerFlowDTO.setAverageMark(zero);
}
- McLearningAction.logger.debug("mcGeneralLearnerFlowDTO for jsp: " + mcGeneralLearnerFlowDTO);
-
request.setAttribute(McAppConstants.MC_GENERAL_LEARNER_FLOW_DTO, mcGeneralLearnerFlowDTO);
- McLearningAction.logger.debug("MC_GENERAL_LEARNER_FLOW_DTO: "
- + request.getAttribute(McAppConstants.MC_GENERAL_LEARNER_FLOW_DTO));
- McLearningAction.logger.debug("end of prepareViewAnswersData.");
}
/**
@@ -1220,11 +1201,8 @@
*/
public ActionForward viewAnswers(ActionMapping mapping, McLearningForm mcLearningForm, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- McLearningAction.logger.debug("dispatching viewLearnerProgress..." + mcLearningForm);
- McLearningAction.logger.debug("mcLearningForm :" + mcLearningForm);
prepareViewAnswersData(mapping, mcLearningForm, request, response);
- McLearningAction.logger.debug("post prepareViewAnswersData");
return mapping.findForward(McAppConstants.VIEW_ANSWERS);
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningForm.java
===================================================================
diff -u -r8522cd628329e0031e21b48f2750b1fd9b1842a6 -rd7ee01a444dbd7fc671f945b5fb4f7c5d22ba01c
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningForm.java (.../McLearningForm.java) (revision 8522cd628329e0031e21b48f2750b1fd9b1842a6)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningForm.java (.../McLearningForm.java) (revision d7ee01a444dbd7fc671f945b5fb4f7c5d22ba01c)
@@ -31,490 +31,551 @@
/**
* @author Ozgur Demirtas
- *
- * ActionForm for the Learning environment
+ *
+ * ActionForm for the Learning environment
*/
public class McLearningForm extends ActionForm implements McAppConstants {
- protected String continueOptions;
- protected String nextOptions;
- protected String continueOptionsCombined;
- protected String redoQuestions;
- protected String viewSummary;
- protected String viewAnswers;
- protected String learnerFinished;
- protected String redoQuestionsOk;
- protected String donePreview;
- protected String doneLearnerProgress;
- protected String submitReflection;
- protected String forwardtoReflection;
-
- protected String[] checkedCa;
- protected String[] sequentialCheckedCa;
+ protected String continueOptions;
+ protected String nextOptions;
+ protected String continueOptionsCombined;
+ protected String redoQuestions;
+ protected String viewSummary;
+ protected String viewAnswers;
+ protected String learnerFinished;
+ protected String redoQuestionsOk;
+ protected String donePreview;
+ protected String doneLearnerProgress;
+ protected String submitReflection;
+ protected String forwardtoReflection;
- protected String userID;
+ protected String[] checkedCa;
+ protected String[] sequentialCheckedCa;
+
+ protected String userID;
protected String toolContentID;
- protected String toolContentUID;
- protected String toolSessionID;
-
- protected String learningMode;
- protected String currentQuestionIndex;
-
- /**put tghese under SessionMap*/
- protected String userOverPassMark;
- protected String passMarkApplicable;
+ protected String toolContentUID;
+ protected String toolSessionID;
+
+ protected String learningMode;
+ protected String currentQuestionIndex;
+
+ /** put tghese under SessionMap */
+ protected String userOverPassMark;
+ protected String passMarkApplicable;
protected String learnerProgress;
protected String learnerProgressUserId;
- protected String reportViewOnly;
-
+
protected String questionListingMode;
-
+
protected String entryText;
protected String questionIndex;
protected String nextQuestionSelected;
protected String httpSessionID;
-
+
protected String responseId;
protected String sessionId;
-
+
public IMcService mcService;
-
-
+
public void resetCa(ActionMapping mapping, HttpServletRequest request) {
- checkedCa = new String[0];
- }
+ checkedCa = new String[0];
+ }
-
- public void resetCommands()
- {
- this.setContinueOptions(null);
- this.setNextOptions(null);
- this.setContinueOptionsCombined(null);
- this.setRedoQuestions( null);
- this.setViewSummary(null);
- this.setViewAnswers(null);
- this.setRedoQuestionsOk(null);
- this.setLearnerFinished(null);
- this.setDonePreview(null);
- this.setDoneLearnerProgress(null);
- }
+ public void resetCommands() {
+ this.setContinueOptions(null);
+ this.setNextOptions(null);
+ this.setContinueOptionsCombined(null);
+ this.setRedoQuestions(null);
+ this.setViewSummary(null);
+ this.setViewAnswers(null);
+ this.setRedoQuestionsOk(null);
+ this.setLearnerFinished(null);
+ this.setDonePreview(null);
+ this.setDoneLearnerProgress(null);
+ }
- public void resetParameters()
- {
- this.setNextQuestionSelected(null);
- }
+ public void resetParameters() {
+ this.setNextQuestionSelected(null);
+ }
+ /**
+ * @return Returns the continueOptions.
+ */
+ public String getContinueOptions() {
+ return continueOptions;
+ }
- /**
- * @return Returns the continueOptions.
- */
- public String getContinueOptions() {
- return continueOptions;
- }
- /**
- * @param continueOptions The continueOptions to set.
- */
- public void setContinueOptions(String continueOptions) {
- this.continueOptions = continueOptions;
- }
+ /**
+ * @param continueOptions
+ * The continueOptions to set.
+ */
+ public void setContinueOptions(String continueOptions) {
+ this.continueOptions = continueOptions;
+ }
-
- /**
- * @return Returns the viewSummary.
- */
- public String getViewSummary() {
- return viewSummary;
- }
- /**
- * @param viewSummary The viewSummary to set.
- */
- public void setViewSummary(String viewSummary) {
- this.viewSummary = viewSummary;
- }
- /**
- * @return Returns the continueOptionsCombined.
- */
- public String getContinueOptionsCombined() {
- return continueOptionsCombined;
- }
- /**
- * @param continueOptionsCombined The continueOptionsCombined to set.
- */
- public void setContinueOptionsCombined(String continueOptionsCombined) {
- this.continueOptionsCombined = continueOptionsCombined;
- }
- /**
- * @return Returns the redoQuestions.
- */
- public String getRedoQuestions() {
- return redoQuestions;
- }
- /**
- * @param redoQuestions The redoQuestions to set.
- */
- public void setRedoQuestions(String redoQuestions) {
- this.redoQuestions = redoQuestions;
- }
- /**
- * @return Returns the viewAnswers.
- */
- public String getViewAnswers() {
- return viewAnswers;
- }
- /**
- * @param viewAnswers The viewAnswers to set.
- */
- public void setViewAnswers(String viewAnswers) {
- this.viewAnswers = viewAnswers;
- }
- /**
- * @return Returns the redoQuestionsOk.
- */
- public String getRedoQuestionsOk() {
- return redoQuestionsOk;
- }
- /**
- * @param redoQuestionsOk The redoQuestionsOk to set.
- */
- public void setRedoQuestionsOk(String redoQuestionsOk) {
- this.redoQuestionsOk = redoQuestionsOk;
- }
- /**
- * @return Returns the nextOptions.
- */
- public String getNextOptions() {
- return nextOptions;
- }
- /**
- * @param nextOptions The nextOptions to set.
- */
- public void setNextOptions(String nextOptions) {
- this.nextOptions = nextOptions;
- }
- /**
- * @return Returns the learnerFinished.
- */
- public String getLearnerFinished() {
- return learnerFinished;
- }
- /**
- * @param learnerFinished The learnerFinished to set.
- */
- public void setLearnerFinished(String learnerFinished) {
- this.learnerFinished = learnerFinished;
- }
- /**
- * @return Returns the donePreview.
- */
- public String getDonePreview() {
- return donePreview;
- }
- /**
- * @param donePreview The donePreview to set.
- */
- public void setDonePreview(String donePreview) {
- this.donePreview = donePreview;
- }
- /**
- * @return Returns the doneLearnerProgress.
- */
- public String getDoneLearnerProgress() {
- return doneLearnerProgress;
- }
- /**
- * @param doneLearnerProgress The doneLearnerProgress to set.
- */
- public void setDoneLearnerProgress(String doneLearnerProgress) {
- this.doneLearnerProgress = doneLearnerProgress;
- }
/**
+ * @return Returns the viewSummary.
+ */
+ public String getViewSummary() {
+ return viewSummary;
+ }
+
+ /**
+ * @param viewSummary
+ * The viewSummary to set.
+ */
+ public void setViewSummary(String viewSummary) {
+ this.viewSummary = viewSummary;
+ }
+
+ /**
+ * @return Returns the continueOptionsCombined.
+ */
+ public String getContinueOptionsCombined() {
+ return continueOptionsCombined;
+ }
+
+ /**
+ * @param continueOptionsCombined
+ * The continueOptionsCombined to set.
+ */
+ public void setContinueOptionsCombined(String continueOptionsCombined) {
+ this.continueOptionsCombined = continueOptionsCombined;
+ }
+
+ /**
+ * @return Returns the redoQuestions.
+ */
+ public String getRedoQuestions() {
+ return redoQuestions;
+ }
+
+ /**
+ * @param redoQuestions
+ * The redoQuestions to set.
+ */
+ public void setRedoQuestions(String redoQuestions) {
+ this.redoQuestions = redoQuestions;
+ }
+
+ /**
+ * @return Returns the viewAnswers.
+ */
+ public String getViewAnswers() {
+ return viewAnswers;
+ }
+
+ /**
+ * @param viewAnswers
+ * The viewAnswers to set.
+ */
+ public void setViewAnswers(String viewAnswers) {
+ this.viewAnswers = viewAnswers;
+ }
+
+ /**
+ * @return Returns the redoQuestionsOk.
+ */
+ public String getRedoQuestionsOk() {
+ return redoQuestionsOk;
+ }
+
+ /**
+ * @param redoQuestionsOk
+ * The redoQuestionsOk to set.
+ */
+ public void setRedoQuestionsOk(String redoQuestionsOk) {
+ this.redoQuestionsOk = redoQuestionsOk;
+ }
+
+ /**
+ * @return Returns the nextOptions.
+ */
+ public String getNextOptions() {
+ return nextOptions;
+ }
+
+ /**
+ * @param nextOptions
+ * The nextOptions to set.
+ */
+ public void setNextOptions(String nextOptions) {
+ this.nextOptions = nextOptions;
+ }
+
+ /**
+ * @return Returns the learnerFinished.
+ */
+ public String getLearnerFinished() {
+ return learnerFinished;
+ }
+
+ /**
+ * @param learnerFinished
+ * The learnerFinished to set.
+ */
+ public void setLearnerFinished(String learnerFinished) {
+ this.learnerFinished = learnerFinished;
+ }
+
+ /**
+ * @return Returns the donePreview.
+ */
+ public String getDonePreview() {
+ return donePreview;
+ }
+
+ /**
+ * @param donePreview
+ * The donePreview to set.
+ */
+ public void setDonePreview(String donePreview) {
+ this.donePreview = donePreview;
+ }
+
+ /**
+ * @return Returns the doneLearnerProgress.
+ */
+ public String getDoneLearnerProgress() {
+ return doneLearnerProgress;
+ }
+
+ /**
+ * @param doneLearnerProgress
+ * The doneLearnerProgress to set.
+ */
+ public void setDoneLearnerProgress(String doneLearnerProgress) {
+ this.doneLearnerProgress = doneLearnerProgress;
+ }
+
+ /**
* @return Returns the userOverPassMark.
*/
public String getUserOverPassMark() {
- return userOverPassMark;
+ return userOverPassMark;
}
+
/**
- * @param userOverPassMark The userOverPassMark to set.
+ * @param userOverPassMark
+ * The userOverPassMark to set.
*/
public void setUserOverPassMark(String userOverPassMark) {
- this.userOverPassMark = userOverPassMark;
+ this.userOverPassMark = userOverPassMark;
}
+
/**
* @return Returns the passMarkApplicable.
*/
public String getPassMarkApplicable() {
- return passMarkApplicable;
+ return passMarkApplicable;
}
+
/**
- * @param passMarkApplicable The passMarkApplicable to set.
+ * @param passMarkApplicable
+ * The passMarkApplicable to set.
*/
public void setPassMarkApplicable(String passMarkApplicable) {
- this.passMarkApplicable = passMarkApplicable;
+ this.passMarkApplicable = passMarkApplicable;
}
+
/**
* @return Returns the checkedCa.
*/
public String[] getCheckedCa() {
- return checkedCa;
+ return checkedCa;
}
+
/**
- * @param checkedCa The checkedCa to set.
+ * @param checkedCa
+ * The checkedCa to set.
*/
public void setCheckedCa(String[] checkedCa) {
- this.checkedCa = checkedCa;
+ this.checkedCa = checkedCa;
}
/**
* @return Returns the learningMode.
*/
public String getLearningMode() {
- return learningMode;
+ return learningMode;
}
+
/**
- * @param learningMode The learningMode to set.
+ * @param learningMode
+ * The learningMode to set.
*/
public void setLearningMode(String learningMode) {
- this.learningMode = learningMode;
+ this.learningMode = learningMode;
}
-
+
/**
* @return Returns the toolContentUID.
*/
public String getToolContentUID() {
- return toolContentUID;
+ return toolContentUID;
}
+
/**
- * @param toolContentUID The toolContentUID to set.
+ * @param toolContentUID
+ * The toolContentUID to set.
*/
public void setToolContentUID(String toolContentUID) {
- this.toolContentUID = toolContentUID;
+ this.toolContentUID = toolContentUID;
}
/**
* @return Returns the currentQuestionIndex.
*/
public String getCurrentQuestionIndex() {
- return currentQuestionIndex;
+ return currentQuestionIndex;
}
+
/**
- * @param currentQuestionIndex The currentQuestionIndex to set.
+ * @param currentQuestionIndex
+ * The currentQuestionIndex to set.
*/
public void setCurrentQuestionIndex(String currentQuestionIndex) {
- this.currentQuestionIndex = currentQuestionIndex;
+ this.currentQuestionIndex = currentQuestionIndex;
}
-
+
/**
* @return Returns the learnerProgress.
*/
public String getLearnerProgress() {
- return learnerProgress;
+ return learnerProgress;
}
+
/**
- * @param learnerProgress The learnerProgress to set.
+ * @param learnerProgress
+ * The learnerProgress to set.
*/
public void setLearnerProgress(String learnerProgress) {
- this.learnerProgress = learnerProgress;
+ this.learnerProgress = learnerProgress;
}
+
/**
* @return Returns the learnerProgressUserId.
*/
public String getLearnerProgressUserId() {
- return learnerProgressUserId;
+ return learnerProgressUserId;
}
+
/**
- * @param learnerProgressUserId The learnerProgressUserId to set.
+ * @param learnerProgressUserId
+ * The learnerProgressUserId to set.
*/
public void setLearnerProgressUserId(String learnerProgressUserId) {
- this.learnerProgressUserId = learnerProgressUserId;
+ this.learnerProgressUserId = learnerProgressUserId;
}
-
+
/**
* @return Returns the nextQuestionSelected.
*/
public String getNextQuestionSelected() {
- return nextQuestionSelected;
+ return nextQuestionSelected;
}
+
/**
- * @param nextQuestionSelected The nextQuestionSelected to set.
+ * @param nextQuestionSelected
+ * The nextQuestionSelected to set.
*/
public void setNextQuestionSelected(String nextQuestionSelected) {
- this.nextQuestionSelected = nextQuestionSelected;
+ this.nextQuestionSelected = nextQuestionSelected;
}
-
+
/**
* @return Returns the questionIndex.
*/
public String getQuestionIndex() {
- return questionIndex;
+ return questionIndex;
}
+
/**
- * @param questionIndex The questionIndex to set.
+ * @param questionIndex
+ * The questionIndex to set.
*/
public void setQuestionIndex(String questionIndex) {
- this.questionIndex = questionIndex;
+ this.questionIndex = questionIndex;
}
-
+
/**
* @return Returns the questionListingMode.
*/
public String getQuestionListingMode() {
- return questionListingMode;
+ return questionListingMode;
}
+
/**
- * @param questionListingMode The questionListingMode to set.
+ * @param questionListingMode
+ * The questionListingMode to set.
*/
public void setQuestionListingMode(String questionListingMode) {
- this.questionListingMode = questionListingMode;
+ this.questionListingMode = questionListingMode;
}
-
/**
* @return Returns the toolContentID.
*/
public String getToolContentID() {
- return toolContentID;
+ return toolContentID;
}
+
/**
- * @param toolContentID The toolContentID to set.
+ * @param toolContentID
+ * The toolContentID to set.
*/
public void setToolContentID(String toolContentID) {
- this.toolContentID = toolContentID;
+ this.toolContentID = toolContentID;
}
+
/**
* @return Returns the toolSessionID.
*/
public String getToolSessionID() {
- return toolSessionID;
+ return toolSessionID;
}
+
/**
- * @param toolSessionID The toolSessionID to set.
+ * @param toolSessionID
+ * The toolSessionID to set.
*/
public void setToolSessionID(String toolSessionID) {
- this.toolSessionID = toolSessionID;
+ this.toolSessionID = toolSessionID;
}
+
/**
* @return Returns the httpSessionID.
*/
public String getHttpSessionID() {
- return httpSessionID;
+ return httpSessionID;
}
+
/**
- * @param httpSessionID The httpSessionID to set.
+ * @param httpSessionID
+ * The httpSessionID to set.
*/
public void setHttpSessionID(String httpSessionID) {
- this.httpSessionID = httpSessionID;
+ this.httpSessionID = httpSessionID;
}
/**
* @return Returns the sequentialCheckedCa.
*/
public String[] getSequentialCheckedCa() {
- return sequentialCheckedCa;
+ return sequentialCheckedCa;
}
+
/**
- * @param sequentialCheckedCa The sequentialCheckedCa to set.
+ * @param sequentialCheckedCa
+ * The sequentialCheckedCa to set.
*/
public void setSequentialCheckedCa(String[] sequentialCheckedCa) {
- this.sequentialCheckedCa = sequentialCheckedCa;
+ this.sequentialCheckedCa = sequentialCheckedCa;
}
-
+
/**
* @return Returns the mcService.
*/
public IMcService getMcService() {
- return mcService;
+ return mcService;
}
+
/**
- * @param mcService The mcService to set.
+ * @param mcService
+ * The mcService to set.
*/
public void setMcService(IMcService mcService) {
- this.mcService = mcService;
+ this.mcService = mcService;
}
/**
- * @return Returns the reportViewOnly.
- */
- public String getReportViewOnly() {
- return reportViewOnly;
- }
- /**
- * @param reportViewOnly The reportViewOnly to set.
- */
- public void setReportViewOnly(String reportViewOnly) {
- this.reportViewOnly = reportViewOnly;
- }
- /**
* @return Returns the userID.
*/
public String getUserID() {
- return userID;
+ return userID;
}
+
/**
- * @param userID The userID to set.
+ * @param userID
+ * The userID to set.
*/
public void setUserID(String userID) {
- this.userID = userID;
+ this.userID = userID;
}
-
+
/**
* @return Returns the submitReflection.
*/
public String getSubmitReflection() {
- return submitReflection;
+ return submitReflection;
}
+
/**
- * @param submitReflection The submitReflection to set.
+ * @param submitReflection
+ * The submitReflection to set.
*/
public void setSubmitReflection(String submitReflection) {
- this.submitReflection = submitReflection;
+ this.submitReflection = submitReflection;
}
-
+
/**
* @return Returns the forwardtoReflection.
*/
public String getForwardtoReflection() {
- return forwardtoReflection;
+ return forwardtoReflection;
}
+
/**
- * @param forwardtoReflection The forwardtoReflection to set.
+ * @param forwardtoReflection
+ * The forwardtoReflection to set.
*/
public void setForwardtoReflection(String forwardtoReflection) {
- this.forwardtoReflection = forwardtoReflection;
+ this.forwardtoReflection = forwardtoReflection;
}
+
/**
* @return Returns the entryText.
*/
public String getEntryText() {
- return entryText;
+ return entryText;
}
+
/**
- * @param entryText The entryText to set.
+ * @param entryText
+ * The entryText to set.
*/
public void setEntryText(String entryText) {
- this.entryText = entryText;
+ this.entryText = entryText;
}
+
/**
* @return Returns the responseId.
*/
public String getResponseId() {
- return responseId;
+ return responseId;
}
+
/**
- * @param responseId The responseId to set.
+ * @param responseId
+ * The responseId to set.
*/
public void setResponseId(String responseId) {
- this.responseId = responseId;
+ this.responseId = responseId;
}
+
/**
* @return Returns the sessionId.
*/
public String getSessionId() {
- return sessionId;
+ return sessionId;
}
+
/**
- * @param sessionId The sessionId to set.
+ * @param sessionId
+ * The sessionId to set.
*/
public void setSessionId(String sessionId) {
- this.sessionId = sessionId;
+ this.sessionId = sessionId;
}
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java
===================================================================
diff -u -r3e5b36454b17cee648f9d02e0656e8e99c46e00e -rd7ee01a444dbd7fc671f945b5fb4f7c5d22ba01c
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java (.../McLearningStarterAction.java) (revision 3e5b36454b17cee648f9d02e0656e8e99c46e00e)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java (.../McLearningStarterAction.java) (revision d7ee01a444dbd7fc671f945b5fb4f7c5d22ba01c)
@@ -185,7 +185,6 @@
Map mapAnswers= new TreeMap(new McComparator());
IMcService mcService = McServiceProxy.getMcService(getServlet().getServletContext());
- logger.debug("retrieving mcService from proxy: " + mcService);
McLearningForm mcLearningForm = (McLearningForm) form;
mcLearningForm.setMcService(mcService);
@@ -194,7 +193,6 @@
ActionForward validateParameters=validateParameters(request, mcLearningForm, mapping);
- logger.debug("validateParameters: " + validateParameters);
if (validateParameters != null)
{
return validateParameters;
@@ -207,7 +205,6 @@
mcLearningForm.setHttpSessionID(sessionMap.getSessionID());
String toolSessionID=request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID);
- logger.debug("retrieved toolSessionID: " + toolSessionID);
mcLearningForm.setToolSessionID(new Long(toolSessionID).toString());
@@ -217,12 +214,10 @@
*/
McSession mcSession=mcService.retrieveMcSession(new Long(toolSessionID));
- logger.debug("retrieving mcSession: " + mcSession);
if (mcSession == null)
{
McUtils.cleanUpSessionAbsolute(request);
- logger.debug("error: The tool expects mcSession.");
return (mapping.findForward(ERROR_LIST));
}
@@ -232,12 +227,10 @@
* Each passed tool session id points to a particular content. Many to one mapping.
*/
McContent mcContent=mcSession.getMcContent();
- logger.debug("using mcContent: " + mcContent);
if (mcContent == null)
{
McUtils.cleanUpSessionAbsolute(request);
- logger.debug("error: The tool expects mcContent.");
persistError(request,"error.content.doesNotExist");
return (mapping.findForward(ERROR_LIST));
}
@@ -249,7 +242,6 @@
*/
McLearnerStarterDTO mcLearnerStarterDTO= new McLearnerStarterDTO();
- logger.debug("IS_QUESTIONS_SEQUENCED: " + mcContent.isQuestionsSequenced());
if (mcContent.isQuestionsSequenced())
{
mcLearnerStarterDTO.setQuestionListingMode(QUESTION_LISTING_MODE_SEQUENTIAL);
@@ -286,7 +278,6 @@
/*
* Is the tool activity been checked as Run Offline in the property inspector?
*/
- logger.debug("IS_TOOL_ACTIVITY_OFFLINE: " + mcContent.isRunOffline());
mcLearnerStarterDTO.setToolActivityOffline(new Boolean(mcContent.isRunOffline()).toString());
mcLearnerStarterDTO.setActivityTitle(mcContent.getTitle());
request.setAttribute(MC_LEARNER_STARTER_DTO, mcLearnerStarterDTO);
@@ -296,22 +287,15 @@
/* find out if the content is set to run offline or online. If it is set to run offline , the learners are informed about that. */
boolean isRunOffline=McUtils.isRunOffline(mcContent);
- logger.debug("isRunOffline: " + isRunOffline);
if (isRunOffline == true)
{
- logger.debug("the activity is offline.");
- logger.debug("MC_GENERAL_LEARNER_FLOW_DTO: " + request.getAttribute(MC_GENERAL_LEARNER_FLOW_DTO));
-
- logger.debug("fwding to :" + RUN_OFFLINE);
return (mapping.findForward(RUN_OFFLINE));
}
/* find out if the content is being modified at the moment. */
boolean isDefineLater=McUtils.isDefineLater(mcContent);
- logger.debug("isDefineLater: " + isDefineLater);
if (isDefineLater == true)
{
- logger.debug("fwding to :" + DEFINE_LATER);
return (mapping.findForward(DEFINE_LATER));
}
@@ -328,22 +312,14 @@
/*handle PREVIEW mode*/
//String mode=mcLearningForm.getLearningMode();
String mode=request.getParameter(MODE);
- logger.debug("mode: " + mode);
- if ((mode != null) && (mode.equals("author")))
- {
- logger.debug("Author requests for a preview of the content.");
- }
-
/* by now, we know that the mode is either teacher or learner
* check if the mode is teacher and request is for Learner Progress
*/
String userId=request.getParameter(USER_ID);
- logger.debug("userId: " + userId);
if ((userId != null) && (mode.equals("teacher")))
{
- logger.debug("request is for learner progress");
/* LEARNER_PROGRESS for jsp*/
mcLearningForm.setLearnerProgress(new Boolean(true).toString());
@@ -354,7 +330,6 @@
* It is differerent than USER_ID kept in the session of the current system user*/
McQueUsr mcQueUsr=mcService.getMcUserBySession(new Long(userId), mcSession.getUid());
- logger.debug("mcQueUsr: " + mcQueUsr);
if (mcQueUsr == null)
{
logger.error("error.learner.required");
@@ -365,20 +340,16 @@
/* check whether the user's session really referrs to the session id passed to the url*/
Long sessionUid=mcQueUsr.getMcSessionId();
- logger.debug("sessionUid: " + sessionUid);
McSession mcSessionLocal=mcService.getMcSessionByUID(sessionUid);
- logger.debug("checking mcSessionLocal" + mcSessionLocal);
toolSessionID=(String)mcLearningForm.getToolSessionID();
- logger.debug("toolSessionID: " + toolSessionID + " versus" + mcSessionLocal);
if ((mcSessionLocal == null) ||
(mcSessionLocal.getMcSessionId().longValue() != new Long(toolSessionID).longValue()))
{
logger.error("error.learner.sessionId.inconsistent");
}
LearningUtil.saveFormRequestData(request, mcLearningForm, true);
- logger.debug("learnerProgress before presenting learner Progress screen: " + mcLearningForm.getLearnerProgress());
request.setAttribute(REQUEST_BY_STARTER, new Boolean (true).toString());
@@ -393,54 +364,39 @@
*
*/
- Integer userID = null;
- HttpSession ss = SessionManager.getSession();
- if (ss != null)
- {
- UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
- if (user != null)
- {
- userID = user.getUserID();
- }
+ Integer userID = null;
+ HttpSession ss = SessionManager.getSession();
+ if (ss != null) {
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ if (user != null) {
+ userID = user.getUserID();
}
+ }
- McQueUsr mcQueUsr=mcService.getMcUserBySession(new Long(userID.longValue()), mcSession.getUid());
- if ( logger.isDebugEnabled())
- logger.debug("mcQueUsr:" + mcQueUsr);
+ McQueUsr mcQueUsr = mcService.getMcUserBySession(new Long(userID.longValue()), mcSession.getUid());
- request.setAttribute(MC_LEARNER_STARTER_DTO, mcLearnerStarterDTO);
+ request.setAttribute(MC_LEARNER_STARTER_DTO, mcLearnerStarterDTO);
- boolean viewSummaryRequested=false;
- /*if the user's session id AND user id exists in the tool tables go to redo questions.*/
- if (mcQueUsr != null)
- {
- Long sessionUid=mcQueUsr.getMcSessionId();
- McSession mcUserSession= mcService.getMcSessionByUID(sessionUid);
- String userSessionId=mcUserSession.getMcSessionId().toString();
-
- if (toolSessionID.equals(userSessionId))
- {
- McLearningAction mcLearningAction= new McLearningAction();
+ /* if the user's session id AND user id exists in the tool tables go to redo questions. */
+ if (mcQueUsr != null) {
+ Long sessionUid = mcQueUsr.getMcSessionId();
+ McSession mcUserSession = mcService.getMcSessionByUID(sessionUid);
+ String userSessionId = mcUserSession.getMcSessionId().toString();
- /*one limitation by design here is that once a user finishes the activity, subsequent users in the same group are also assumed finished
- * since they belong to the same ungrouped activity and these users have the same tool session id*/
- mcLearningForm.setReportViewOnly(new Boolean(mcQueUsr.isResponseFinalised()).toString());
- request.setAttribute(REQUEST_BY_STARTER, (Boolean.TRUE).toString());
- return mcLearningAction.viewAnswers(mapping, mcLearningForm, request, response);
- }
+ if (toolSessionID.equals(userSessionId)) {
+ McLearningAction mcLearningAction = new McLearningAction();
+ request.setAttribute(REQUEST_BY_STARTER, (Boolean.TRUE).toString());
+ return mcLearningAction.viewAnswers(mapping, mcLearningForm, request, response);
}
- else if (mode.equals("teacher"))
- {
- McLearningAction mcLearningAction= new McLearningAction();
- logger.debug("present to teacher learners progress...");
- mcLearningForm.setLearnerProgress(new Boolean(true).toString());
- mcLearningForm.setLearnerProgressUserId(userId);
- return mcLearningAction.viewAnswers(mapping, mcLearningForm, request, response);
- }
- logger.debug("just presenting standard learner screen");
- request.setAttribute(MC_LEARNER_STARTER_DTO, mcLearnerStarterDTO);
- return (mapping.findForward(LOAD_LEARNER));
+ } else if (mode.equals("teacher")) {
+ McLearningAction mcLearningAction = new McLearningAction();
+ mcLearningForm.setLearnerProgress(new Boolean(true).toString());
+ mcLearningForm.setLearnerProgressUserId(userId);
+ return mcLearningAction.viewAnswers(mapping, mcLearningForm, request, response);
}
+ request.setAttribute(MC_LEARNER_STARTER_DTO, mcLearnerStarterDTO);
+ return (mapping.findForward(LOAD_LEARNER));
+ }
/**
Index: lams_tool_lamc/web/learning/ViewAnswers.jsp
===================================================================
diff -u -re8c846051c7b148ec4e80b1c50e41fa90ff60be5 -rd7ee01a444dbd7fc671f945b5fb4f7c5d22ba01c
--- lams_tool_lamc/web/learning/ViewAnswers.jsp (.../ViewAnswers.jsp) (revision e8c846051c7b148ec4e80b1c50e41fa90ff60be5)
+++ lams_tool_lamc/web/learning/ViewAnswers.jsp (.../ViewAnswers.jsp) (revision d7ee01a444dbd7fc671f945b5fb4f7c5d22ba01c)
@@ -177,19 +177,15 @@
-
@@ -206,49 +202,25 @@
-
@@ -260,14 +232,3 @@