Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java,v
diff -u -r1.69 -r1.70
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java 25 Feb 2006 19:27:26 -0000 1.69
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java 13 Mar 2006 23:17:27 -0000 1.70
@@ -249,18 +249,18 @@
* exception constants
*/
public static final String USER_EXCEPTION_WRONG_FORMAT ="userExceptionWrongFormat";
- public static final String USER_EXCEPTION_UNCOMPATIBLE_IDS ="userExceptionUncompatibleIds";
+ public static final String USER_EXCEPTION_INCOMPATIBLE_IDS ="userExceptionIncompatibleIds";
public static final String USER_EXCEPTION_NUMBERFORMAT ="userExceptionNumberFormat";
public static final String USER_EXCEPTION_CONTENT_DOESNOTEXIST ="userExceptionContentDoesNotExist";
public static final String USER_EXCEPTION_TOOLSESSION_DOESNOTEXIST ="userExceptionToolSessionDoesNotExist";
public static final String USER_EXCEPTION_TOOLCONTENT_DOESNOTEXIST ="userExceptionToolContentDoesNotExist";
public static final String USER_EXCEPTION_LEARNER_REQUIRED ="userExceptionLearnerRequired";
public static final String USER_EXCEPTION_CONTENTID_REQUIRED ="userExceptionContentIdRequired";
public static final String USER_EXCEPTION_TOOLSESSIONID_REQUIRED ="userExceptionToolSessionIdRequired";
+ public static final String USER_EXCEPTION_TOOLSESSIONID_INCONSISTENT ="userExceptionToolSessionIdInconsistent";
public static final String USER_EXCEPTION_DEFAULTCONTENT_NOT_AVAILABLE ="userExceptionDefaultContentNotAvailable";
public static final String USER_EXCEPTION_DEFAULTQUESTIONCONTENT_NOT_AVAILABLE ="userExceptionDefaultQuestionContentNotAvailable";
public static final String USER_EXCEPTION_DEFAULTOPTIONSCONTENT_NOT_AVAILABLE ="userExceptionDefaultOptionsContentNotAvailable";
-
public static final String USER_EXCEPTION_USERID_NOTAVAILABLE ="userExceptionUserIdNotAvailable";
public static final String USER_EXCEPTION_USERID_NOTNUMERIC ="userExceptionUserIdNotNumeric";
public static final String USER_EXCEPTION_ONLYCONTENT_ANDNOSESSIONS ="userExceptionOnlyContentAndNoSessions";
@@ -271,4 +271,24 @@
public static final String USER_EXCEPTION_NO_TOOL_SESSIONS ="userExceptionNoToolSessions";
public static final String USER_EXCEPTION_NO_STUDENT_ACTIVITY ="userExceptionNoStudentActivity";
public static final String USER_EXCEPTION_MODE_REQUIRED ="userExceptionModeRequired";
+ public static final String USER_EXCEPTION_CONTENT_IN_USE ="userExceptionContentInUse";
+ public static final String USER_EXCEPTION_CONTENT_BEING_MODIFIED ="userExceptionContentBeingModified";
+ public static final String USER_EXCEPTION_CONTENT_RUNOFFLINE ="userExceptionContentRunOffline";
+ public static final String USER_EXCEPTION_CONTENT_DEFINE_LATER ="userExceptionContentDefineLater";
+ public static final String USER_EXCEPTION_MODE_INVALID ="userExceptionModeInvalid";
+ public static final String USER_EXCEPTION_QUESTION_EMPTY ="userExceptionQuestionEmpty";
+ public static final String USER_EXCEPTION_ANSWER_EMPTY ="userExceptionAnswerEmpty";
+ public static final String USER_EXCEPTION_WEIGHT_TOTAL ="userExceptionWeightTotal";
+ public static final String USER_EXCEPTION_WEIGHT_EMPTY ="userExceptionWeightEmpty";
+ public static final String USER_EXCEPTION_WEIGHT_NOTINTEGER ="userExceptionWeightNotInteger";
+ public static final String USER_EXCEPTION_WEIGHT_ZERO ="userExceptionWeightZero";
+ public static final String USER_EXCEPTION_ANSWERS_DUPLICATE ="userExceptionAnswersDuplicate";
+ public static final String USER_EXCEPTION_OPTIONS_COUNT_ZERO ="userExceptionOptionsCountZero";
+ public static final String USER_EXCEPTION_CHKBOXES_EMPTY ="userExceptionChkboxesEmpty";
+ public static final String USER_EXCEPTION_SUBMIT_NONE ="userExceptionSubmitNone";
+ public static final String USER_EXCEPTION_PASSMARK_NOTINTEGER ="userExceptionPassmarkNotInteger";
+ public static final String USER_EXCEPTION_PASSMARK_EMPTY ="userExceptionPassmarkEmpty";
+ public static final String USER_EXCEPTION_PASSMARK_GREATER100 ="userExceptionPassmarkGreater100";
+ public static final String USER_EXCEPTION_FILENAME_EMPTY ="userExceptionFilenameEmpty";
+ public static final String USER_EXCEPTION_WEIGHT_MUST_EQUAL100 ="userExceptionWeightMustEqual100";
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/Attic/McResources.properties,v
diff -u -r1.65 -r1.66
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McResources.properties 10 Mar 2006 01:12:16 -0000 1.65
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McResources.properties 13 Mar 2006 23:17:27 -0000 1.66
@@ -142,8 +142,8 @@
options.count.zero =Please correct this: There must be at least one candidate answer.
error.passmark.notInteger =Please correct this: Pass Mark can only be an integer.
error.weights.total.invalid =Please correct this: The total weight must equal 100. Please also note that the questions with no candidate answers are being automatically removed.
-error.learner.userId.required ==Tool Activity Error! Can't continue. Tool Activity expects learner's user id.
-error.learner.user.doesNoExist ==Tool Activity Error! Learner is not ready in the tool's database yet.
+error.learner.userId.required =Tool Activity Error! Can't continue. Tool Activity expects learner's user id.
+error.learner.user.doesNoExist =Tool Activity Error! Learner is not ready in the tool's database yet.
error.file.notPersisted =An error occurred: The file is not viewable yet. Please save all the content first and check back.
error.learningUser.notAvailable =Tool Activity Error! Can't continue. Tool Activity expects a user id.
error.toolSession.notAvailable =Tool Activity Error! Can't continue. Tool session is not ready in the tool's database yet.
Please verify the API method: public void createToolSession(Long toolSessionId, Long toolContentId) has already been executed.
@@ -158,7 +158,7 @@
error.question.removeNotAllowed.thisScreen = The question can not be removed since one or more of the question texts has been modified. Please try again without any text modifications.
error.selectedIndex.empty =Can not continue. Please select the correct answer and click "Done".
error.content.locked =The content has been locked since it is being used by one mor more learners.
The modification of the content is not allowed.
-error.content.doesNotExist ==Tool Activity Error! Can't continue. Tool content is not ready in the tool's database yet.
+error.content.doesNotExist =Tool Activity Error! Can't continue. Tool content is not ready in the tool's database yet.
error.content.inUse =The modification of the content is not allowed since one or more students has attempted the activity.
error.content.beingModified =The content can not be presented since it is being modified. Please check back later.
error.content.unstableState =The content is in an unstable state since it has been left editable while monitored.
Please use this screen to redefine the content.
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUtils.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUtils.java,v
diff -u -r1.31 -r1.32
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUtils.java 25 Feb 2006 19:27:26 -0000 1.31
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUtils.java 13 Mar 2006 23:17:27 -0000 1.32
@@ -718,29 +718,57 @@
request.getSession().removeAttribute(TIMEZONE);
request.getSession().removeAttribute(MODE);
request.getSession().removeAttribute(LEARNING_MODE);
+ request.getSession().removeAttribute(EXPORT_USER_ID);
+ cleanUpUserExceptions(request);
+ logger.debug("completely cleaned the session.");
+ }
+
+
+ public static void cleanUpUserExceptions(HttpServletRequest request)
+ {
request.getSession().removeAttribute(USER_EXCEPTION_WRONG_FORMAT);
- request.getSession().removeAttribute(USER_EXCEPTION_UNCOMPATIBLE_IDS);
+ request.getSession().removeAttribute(USER_EXCEPTION_INCOMPATIBLE_IDS);
request.getSession().removeAttribute(USER_EXCEPTION_NUMBERFORMAT);
request.getSession().removeAttribute(USER_EXCEPTION_CONTENT_DOESNOTEXIST);
request.getSession().removeAttribute(USER_EXCEPTION_TOOLSESSION_DOESNOTEXIST);
request.getSession().removeAttribute(USER_EXCEPTION_TOOLCONTENT_DOESNOTEXIST);
- request.getSession().removeAttribute(USER_EXCEPTION_LEARNER_REQUIRED);
+ request.getSession().removeAttribute(USER_EXCEPTION_LEARNER_REQUIRED);
request.getSession().removeAttribute(USER_EXCEPTION_CONTENTID_REQUIRED);
request.getSession().removeAttribute(USER_EXCEPTION_TOOLSESSIONID_REQUIRED);
+ request.getSession().removeAttribute(USER_EXCEPTION_TOOLSESSIONID_INCONSISTENT);
request.getSession().removeAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOT_AVAILABLE);
request.getSession().removeAttribute(USER_EXCEPTION_DEFAULTQUESTIONCONTENT_NOT_AVAILABLE);
request.getSession().removeAttribute(USER_EXCEPTION_DEFAULTOPTIONSCONTENT_NOT_AVAILABLE);
- request.getSession().removeAttribute(USER_EXCEPTION_USERID_NOTAVAILABLE);
+ request.getSession().removeAttribute(USER_EXCEPTION_USERID_NOTAVAILABLE);
request.getSession().removeAttribute(USER_EXCEPTION_USERID_NOTNUMERIC);
request.getSession().removeAttribute(USER_EXCEPTION_ONLYCONTENT_ANDNOSESSIONS);
request.getSession().removeAttribute(USER_EXCEPTION_USERID_EXISTING);
request.getSession().removeAttribute(USER_EXCEPTION_USER_DOESNOTEXIST);
request.getSession().removeAttribute(USER_EXCEPTION_MONITORINGTAB_CONTENTID_REQUIRED);
request.getSession().removeAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP);
- request.getSession().removeAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS);
+ request.getSession().removeAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS);
request.getSession().removeAttribute(USER_EXCEPTION_NO_STUDENT_ACTIVITY);
request.getSession().removeAttribute(USER_EXCEPTION_MODE_REQUIRED);
- request.getSession().removeAttribute(EXPORT_USER_ID);
- logger.debug("completely cleaned the session.");
+ request.getSession().removeAttribute(USER_EXCEPTION_CONTENT_IN_USE);
+ request.getSession().removeAttribute(USER_EXCEPTION_CONTENT_BEING_MODIFIED);
+ request.getSession().removeAttribute(USER_EXCEPTION_CONTENT_RUNOFFLINE);
+ request.getSession().removeAttribute(USER_EXCEPTION_CONTENT_DEFINE_LATER);
+ request.getSession().removeAttribute(USER_EXCEPTION_MODE_INVALID);
+ request.getSession().removeAttribute(USER_EXCEPTION_QUESTION_EMPTY);
+ request.getSession().removeAttribute(USER_EXCEPTION_ANSWER_EMPTY);
+ request.getSession().removeAttribute(USER_EXCEPTION_WEIGHT_TOTAL);
+ request.getSession().removeAttribute(USER_EXCEPTION_WEIGHT_EMPTY);
+ request.getSession().removeAttribute(USER_EXCEPTION_WEIGHT_NOTINTEGER);
+ request.getSession().removeAttribute(USER_EXCEPTION_WEIGHT_ZERO);
+ request.getSession().removeAttribute(USER_EXCEPTION_ANSWERS_DUPLICATE);
+ request.getSession().removeAttribute(USER_EXCEPTION_OPTIONS_COUNT_ZERO);
+ request.getSession().removeAttribute(USER_EXCEPTION_CHKBOXES_EMPTY);
+ request.getSession().removeAttribute(USER_EXCEPTION_SUBMIT_NONE);
+ request.getSession().removeAttribute(USER_EXCEPTION_PASSMARK_NOTINTEGER);
+ request.getSession().removeAttribute(USER_EXCEPTION_NUMBERFORMAT);
+ request.getSession().removeAttribute(USER_EXCEPTION_PASSMARK_EMPTY);
+ request.getSession().removeAttribute(USER_EXCEPTION_PASSMARK_GREATER100);
+ request.getSession().removeAttribute(USER_EXCEPTION_FILENAME_EMPTY);
+ request.getSession().removeAttribute(USER_EXCEPTION_WEIGHT_MUST_EQUAL100);
}
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java,v
diff -u -r1.43 -r1.44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java 8 Feb 2006 11:26:24 -0000 1.43
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java 13 Mar 2006 23:17:26 -0000 1.44
@@ -26,6 +26,7 @@
import java.util.List;
import org.lamsfoundation.lams.contentrepository.ITicket;
+import org.lamsfoundation.lams.contentrepository.ItemNotFoundException;
import org.lamsfoundation.lams.contentrepository.NodeKey;
import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
import org.lamsfoundation.lams.lesson.Lesson;
@@ -159,7 +160,7 @@
public boolean studentActivityOccurred(McContent mc) throws McApplicationException;
- public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException;
+ public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException;
public void setAsForceCompleteSession(Long toolSessionId) throws McApplicationException;
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java,v
diff -u -r1.99 -r1.100
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java 25 Feb 2006 19:27:26 -0000 1.99
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java 13 Mar 2006 23:17:26 -0000 1.100
@@ -180,11 +180,13 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
McAuthoringForm mcAuthoringForm = (McAuthoringForm) form;
IMcService mcService =McUtils.getToolService(request);
AuthoringUtil.readData(request, mcAuthoringForm);
mcAuthoringForm.resetUserAction();
+
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
return null;
}
@@ -208,6 +210,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching addNewQuestion...");
McUtils.debugMaps(request);
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
@@ -236,6 +239,7 @@
ActionMessages errors= new ActionMessages();
errors= new ActionMessages();
errors.add(Globals.ERROR_KEY,new ActionMessage("error.question.empty"));
+ request.getSession().setAttribute(USER_EXCEPTION_QUESTION_EMPTY, new Boolean(true).toString());
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
persistError(request,"error.question.empty");
@@ -275,6 +279,7 @@
ActionMessages errors= new ActionMessages();
errors= new ActionMessages();
errors.add(Globals.ERROR_KEY,new ActionMessage("error.question.weight.total"));
+ request.getSession().setAttribute(USER_EXCEPTION_WEIGHT_TOTAL, new Boolean(true).toString());
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
persistError(request,"error.question.weight.total");
@@ -341,6 +346,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching removeQuestion...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
@@ -461,6 +467,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching editOptions...");
McUtils.debugMaps(request);
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
@@ -503,6 +510,7 @@
{
ActionMessages errors= new ActionMessages();
errors.add(Globals.ERROR_KEY,new ActionMessage("error.emptyQuestion"));
+ request.getSession().setAttribute(USER_EXCEPTION_QUESTION_EMPTY, new Boolean(true).toString());
logger.debug("add error.emptyQuestion to ActionMessages");
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
@@ -522,6 +530,7 @@
{
ActionMessages errors= new ActionMessages();
errors.add(Globals.ERROR_KEY,new ActionMessage("error.emptyWeight"));
+ request.getSession().setAttribute(USER_EXCEPTION_WEIGHT_EMPTY, new Boolean(true).toString());
logger.debug("add error.emptyWeight to ActionMessages");
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
@@ -820,6 +829,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching addOption...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -848,6 +858,7 @@
{
ActionMessages errors= new ActionMessages();
errors.add(Globals.ERROR_KEY,new ActionMessage("error.answers.duplicate"));
+ request.getSession().setAttribute(USER_EXCEPTION_ANSWERS_DUPLICATE, new Boolean(true).toString());
logger.debug("add error.answers.duplicate to ActionMessages");
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
@@ -866,6 +877,7 @@
{
ActionMessages errors= new ActionMessages();
errors.add(Globals.ERROR_KEY,new ActionMessage("error.answers.empty"));
+ request.getSession().setAttribute(USER_EXCEPTION_ANSWER_EMPTY, new Boolean(true).toString());
logger.debug("add error.answers.empty to ActionMessages");
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
@@ -972,6 +984,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching removeOption...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -1001,6 +1014,7 @@
{
ActionMessages errors= new ActionMessages();
errors= new ActionMessages();
+ request.getSession().setAttribute(USER_EXCEPTION_OPTIONS_COUNT_ZERO, new Boolean(true).toString());
errors.add(Globals.ERROR_KEY,new ActionMessage("options.count.zero"));
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
@@ -1114,6 +1128,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching moveQuestionDown...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -1224,6 +1239,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching moveQuestionUp...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -1333,6 +1349,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching doneOptions...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -1357,6 +1374,7 @@
if (validateOptions == false)
{
ActionMessages errors= new ActionMessages();
+ request.getSession().setAttribute(USER_EXCEPTION_CHKBOXES_EMPTY, new Boolean(true).toString());
errors.add(Globals.ERROR_KEY,new ActionMessage("error.checkBoxes.empty"));
logger.debug("add error.checkBoxes.empty to ActionMessages");
saveErrors(request,errors);
@@ -1483,6 +1501,7 @@
ServletException,
ToolException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching editActivityQuestions...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -1525,6 +1544,7 @@
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching submitQuestions...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -1598,6 +1618,7 @@
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
+ request.getSession().setAttribute(USER_EXCEPTION_SUBMIT_NONE, new Boolean(true).toString());
persistError(request,"error.questions.submitted.none");
McUtils.debugMaps(request);
@@ -1631,6 +1652,7 @@
if (isTotalWeightsValid == false)
{
errors= new ActionMessages();
+ request.getSession().setAttribute(USER_EXCEPTION_WEIGHT_MUST_EQUAL100, new Boolean(true).toString());
errors.add(Globals.ERROR_KEY,new ActionMessage("error.weights.total.invalid"));
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
@@ -1684,6 +1706,9 @@
if (mcAuthoringForm.getPassmark() != null)
{
+ if (mcAuthoringForm.getPassmark().equals(""))
+ mcAuthoringForm.setPassmark("0");
+
try
{
passmark= new Integer(mcAuthoringForm.getPassmark()).intValue();
@@ -1692,6 +1717,7 @@
catch(Exception e)
{
errors= new ActionMessages();
+ request.getSession().setAttribute(USER_EXCEPTION_PASSMARK_NOTINTEGER, new Boolean(true).toString());
errors.add(Globals.ERROR_KEY,new ActionMessage("error.passmark.notInteger"));
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
@@ -1717,6 +1743,7 @@
else
{
errors= new ActionMessages();
+ request.getSession().setAttribute(USER_EXCEPTION_PASSMARK_EMPTY, new Boolean(true).toString());
errors.add(Globals.ERROR_KEY,new ActionMessage("error.passMark.empty"));
logger.debug("add error.passMark.empty to ActionMessages");
saveErrors(request,errors);
@@ -1739,6 +1766,7 @@
if (passmark > 100)
{
errors= new ActionMessages();
+ request.getSession().setAttribute(USER_EXCEPTION_PASSMARK_GREATER100, new Boolean(true).toString());
errors.add(Globals.ERROR_KEY,new ActionMessage("error.passMark.greater100"));
logger.debug("add error.passMark.greater100to ActionMessages");
saveErrors(request,errors);
@@ -1968,6 +1996,7 @@
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching deleteOfflineFile...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -2019,6 +2048,7 @@
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching deleteOnlineFile...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -2069,6 +2099,7 @@
ServletException,
RepositoryCheckedException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching submitOfflineFile...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -2092,6 +2123,7 @@
{
ActionMessages errors= new ActionMessages();
errors= new ActionMessages();
+ request.getSession().setAttribute(USER_EXCEPTION_FILENAME_EMPTY, new Boolean(true).toString());
errors.add(Globals.ERROR_KEY,new ActionMessage("error.fileName.empty"));
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
@@ -2139,6 +2171,7 @@
ServletException,
RepositoryCheckedException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching submitOnlineFiles...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -2162,6 +2195,7 @@
{
ActionMessages errors= new ActionMessages();
errors= new ActionMessages();
+ request.getSession().setAttribute(USER_EXCEPTION_FILENAME_EMPTY, new Boolean(true).toString());
errors.add(Globals.ERROR_KEY,new ActionMessage("error.fileName.empty"));
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
@@ -2206,6 +2240,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching doneAdvancedTab...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -2246,6 +2281,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching doneInstructionsTab...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -2292,6 +2328,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching cancelAuthoring...");
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -2324,6 +2361,7 @@
*/
protected boolean validateQuestionWeights(HttpServletRequest request, Map mapWeights, McAuthoringForm mcAuthoringForm)
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("mapWeights: " + mapWeights);
request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
McUtils.debugMaps(request);
@@ -2337,6 +2375,7 @@
{
ActionMessages errors= new ActionMessages();
errors= new ActionMessages();
+ request.getSession().setAttribute(USER_EXCEPTION_WEIGHT_EMPTY, new Boolean(true).toString());
errors.add(Globals.ERROR_KEY,new ActionMessage("error.weights.empty"));
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
@@ -2355,6 +2394,7 @@
ActionMessages errors= new ActionMessages();
errors= new ActionMessages();
errors.add(Globals.ERROR_KEY,new ActionMessage("error.weights.notInteger"));
+ request.getSession().setAttribute(USER_EXCEPTION_WEIGHT_NOTINTEGER, new Boolean(true).toString());
saveErrors(request,errors);
mcAuthoringForm.resetUserAction();
persistError(request,"error.weights.notInteger");
@@ -2367,9 +2407,9 @@
{
ActionMessages errors= new ActionMessages();
errors= new ActionMessages();
- errors.add(Globals.ERROR_KEY,new ActionMessage("error.weights.zero"));
+ errors.add(Globals.ERROR_KEY,new ActionMessage("error.weights.zero"));
saveErrors(request,errors);
- mcAuthoringForm.resetUserAction();
+ request.getSession().setAttribute(USER_EXCEPTION_WEIGHT_ZERO, new Boolean(true).toString());
persistError(request,"error.weights.zero");
return false;
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McExportAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/Attic/McExportAction.java,v
diff -u -r1.3 -r1.4
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McExportAction.java 25 Feb 2006 19:27:26 -0000 1.3
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McExportAction.java 13 Mar 2006 23:17:26 -0000 1.4
@@ -86,6 +86,7 @@
HttpServletRequest request,
HttpServletResponse response)
{
+ McUtils.cleanUpUserExceptions(request);
return mapping.findForward(EXPORT_PORTFOLIO);
}
@@ -102,6 +103,7 @@
*/
public ActionForward learner(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching export portfolio for learner...");
McUtils.cleanUpSessionAbsolute(request);
@@ -132,8 +134,9 @@
logger.debug("mcSession: " + mcSession);
if (mcSession == null)
{
+ McUtils.cleanUpSessionAbsolute(request);
persistError(request, "error.toolSession.doesNoExist");
- McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString());
return (mapping.findForward(ERROR_LIST));
}
@@ -147,8 +150,9 @@
logger.debug("existing tool user mcQueUsr : " + mcQueUsr);
if (mcQueUsr == null)
{
+ McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_LEARNER_REQUIRED, new Boolean(true).toString());
persistError(request, "error.learner.user.doesNoExist");
- McUtils.cleanUpSessionAbsolute(request);
return (mapping.findForward(ERROR_LIST));
}
@@ -157,8 +161,9 @@
logger.debug("mcContent : " + mcContent);
if (mcContent == null)
{
- persistError(request, "error.content.doesNotExist");
McUtils.cleanUpSessionAbsolute(request);
+ persistError(request, "error.content.doesNotExist");
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENT_DOESNOTEXIST, new Boolean(true).toString());
return (mapping.findForward(ERROR_LIST));
}
@@ -179,6 +184,7 @@
*/
public ActionForward teacher(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
{
+ McUtils.cleanUpUserExceptions(request);
//given the toolcontentId as a parameter
logger.debug("dispatching export portfolio for teacher...");
McUtils.cleanUpSessionAbsolute(request);
@@ -210,8 +216,9 @@
if (mcContent == null)
{
+ McUtils.cleanUpSessionAbsolute(request);
persistError(request, "error.content.doesNotExist");
- McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENT_DOESNOTEXIST, new Boolean(true).toString());
return (mapping.findForward(ERROR_LIST));
}
@@ -232,12 +239,14 @@
*/
protected boolean validateLearnerExportParameters(ActionForm form, HttpServletRequest request)
{
+ McUtils.cleanUpUserExceptions(request);
String strToolSessionId=request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID);
if ((strToolSessionId == null) || (strToolSessionId.length() == 0))
{
- persistError(request, "error.toolSessionId.required");
McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_TOOLSESSIONID_REQUIRED, new Boolean(true).toString());
+ persistError(request, "error.toolSessionId.required");
return false;
}
else
@@ -249,10 +258,11 @@
}
catch(NumberFormatException e)
{
+ McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_NUMBERFORMAT, new Boolean(true).toString());
persistError(request, "error.sessionId.numberFormatException");
logger.debug("add error.sessionId.numberFormatException to ActionMessages.");
- McUtils.cleanUpSessionAbsolute(request);
- return false;
+ return false;
}
}
@@ -261,8 +271,9 @@
logger.debug("userId: " + userId);
if ((userId == null) || (userId.length() == 0))
{
- persistError(request, "error.learner.userId.required");
McUtils.cleanUpSessionAbsolute(request);
+ persistError(request, "error.learner.userId.required");
+ request.getSession().setAttribute(USER_EXCEPTION_USER_DOESNOTEXIST, new Boolean(true).toString());
return false;
}
request.getSession().setAttribute(EXPORT_USER_ID,new Long(userId));
@@ -281,13 +292,15 @@
*/
protected boolean validateTeacherExportParameters(ActionForm form, HttpServletRequest request)
{
+ McUtils.cleanUpUserExceptions(request);
String strToolContentId=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
logger.debug("strToolContentId: " + strToolContentId);
if ((strToolContentId == null) || (strToolContentId.length() == 0))
{
- persistError(request, "error.contentId.required");
McUtils.cleanUpSessionAbsolute(request);
+ persistError(request, "error.contentId.required");
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENTID_REQUIRED, new Boolean(true).toString());
return false;
}
else
@@ -300,9 +313,10 @@
}
catch(NumberFormatException e)
{
- persistError(request, "error.contentId.numberFormatException");
- logger.debug("add error.contentId.numberFormatException to ActionMessages.");
McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_NUMBERFORMAT, new Boolean(true).toString());
+ persistError(request, "error.numberFormatException");
+ logger.debug("add error.contentId.numberFormatException to ActionMessages.");
return false;
}
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java,v
diff -u -r1.13 -r1.14
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java 25 Feb 2006 19:27:26 -0000 1.13
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java 13 Mar 2006 23:17:26 -0000 1.14
@@ -190,6 +190,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
McAuthoringForm mcAuthoringForm = (McAuthoringForm) form;
IMcService mcService =McUtils.getToolService(request);
AuthoringUtil.readData(request, mcAuthoringForm);
@@ -239,8 +240,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
- logger.debug("displayMc starting..");
-
+ McUtils.cleanUpUserExceptions(request);
McLearningForm mcLearningForm = (McLearningForm) form;
IMcService mcService =McUtils.getToolService(request);
@@ -369,7 +369,8 @@
HttpServletRequest request,
HttpServletResponse response) throws IOException,
ServletException
- {
+ {
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching continueOptionsCombined...");
McLearningForm mcLearningForm = (McLearningForm) form;
IMcService mcService =McUtils.getToolService(request);
@@ -467,6 +468,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching getNextOptions...");
McLearningForm mcLearningForm = (McLearningForm) form;
IMcService mcService =McUtils.getToolService(request);
@@ -513,6 +515,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching redoQuestions...");
McLearningForm mcLearningForm = (McLearningForm) form;
IMcService mcService =McUtils.getToolService(request);
@@ -551,6 +554,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching viewAnswers...");
McLearningForm mcLearningForm = (McLearningForm) form;
IMcService mcService =McUtils.getToolService(request);
@@ -730,6 +734,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching viewSummary...");
McLearningForm mcLearningForm = (McLearningForm) form;
IMcService mcService =McUtils.getToolService(request);
@@ -785,6 +790,7 @@
*/
public ActionForward redoQuestions(HttpServletRequest request, McLearningForm mcLearningForm, ActionMapping mapping)
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("requested redoQuestions...");
/* reset the checked options MAP */
Map mapGeneralCheckedOptionsContent= new TreeMap(new McComparator());
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java,v
diff -u -r1.38 -r1.39
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java 25 Feb 2006 19:27:26 -0000 1.38
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java 13 Mar 2006 23:17:26 -0000 1.39
@@ -265,9 +265,10 @@
if (mcSession == null)
{
+ McUtils.cleanUpSessionAbsolute(request);
logger.debug("error: The tool expects mcSession.");
+ request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString());
persistError(request,"error.toolSession.notAvailable");
- McUtils.cleanUpSessionAbsolute(request);
return (mapping.findForward(ERROR_LIST));
}
@@ -281,10 +282,11 @@
if (mcContent == null)
{
- logger.debug("error: The tool expects mcContent.");
- persistError(request,"error.toolContent.notAvailable");
McUtils.cleanUpSessionAbsolute(request);
- return (mapping.findForward(ERROR_LIST));
+ logger.debug("error: The tool expects mcContent.");
+ persistError(request,"error.content.doesNotExist");
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENT_DOESNOTEXIST, new Boolean(true).toString());
+ return (mapping.findForward(ERROR_LIST));
}
@@ -350,8 +352,9 @@
logger.debug("mcQueUsr:" + mcQueUsr);
if (mcQueUsr == null)
{
- persistError(request, "error.learner.required");
McUtils.cleanUpSessionAbsolute(request);
+ persistError(request, "error.learner.required");
+ request.getSession().setAttribute(USER_EXCEPTION_LEARNER_REQUIRED, new Boolean(true).toString());
return (mapping.findForward(ERROR_LIST));
}
@@ -365,8 +368,9 @@
if ((mcSessionLocal == null) ||
(mcSessionLocal.getMcSessionId().longValue() != toolSessionId.longValue()))
{
- persistError(request, "error.learner.sessionId.inconsistent");
McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_TOOLSESSIONID_INCONSISTENT, new Boolean(true).toString());
+ persistError(request, "error.learner.sessionId.inconsistent");
return (mapping.findForward(ERROR_LIST));
}
return mcLearningAction.viewAnswers(mapping, form, request, response);
@@ -379,9 +383,10 @@
logger.debug("isRunOffline: " + isRunOffline);
if (isRunOffline == true)
{
+ McUtils.cleanUpSessionAbsolute(request);
logger.debug("warning to learner: the activity is offline.");
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENT_RUNOFFLINE, new Boolean(true).toString());
persistError(request,"label.learning.runOffline");
- McUtils.cleanUpSessionAbsolute(request);
return (mapping.findForward(ERROR_LIST));
}
@@ -390,10 +395,11 @@
logger.debug("isDefineLater: " + isDefineLater);
if (isDefineLater == true)
{
+ McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENT_DEFINE_LATER, new Boolean(true).toString());
logger.debug("warning to learner: the activity is defineLater, we interpret that the content is being modified.");
persistError(request,"error.defineLater");
- McUtils.cleanUpSessionAbsolute(request);
- return (mapping.findForward(ERROR_LIST));
+ return (mapping.findForward(ERROR_LIST));
}
/*
@@ -613,9 +619,10 @@
UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
if ((user == null) || (user.getUserID() == null))
{
+ McUtils.cleanUpSessionAbsolute(request);
logger.debug("error: The tool expects userId");
persistError(request,"error.learningUser.notAvailable");
- McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_USER_DOESNOTEXIST, new Boolean(true).toString());
return (mapping.findForward(ERROR_LIST));
}else
userID = user.getUserID().toString();
@@ -631,9 +638,10 @@
long toolSessionId=0;
if ((strToolSessionId == null) || (strToolSessionId.length() == 0))
{
- persistError(request, "error.toolSessionId.required");
McUtils.cleanUpSessionAbsolute(request);
- return (mapping.findForward(ERROR_LIST));
+ request.getSession().setAttribute(USER_EXCEPTION_TOOLSESSIONID_REQUIRED, new Boolean(true).toString());
+ persistError(request, "error.toolSessionId.required");
+ return (mapping.findForward(ERROR_LIST));
}
else
{
@@ -645,10 +653,11 @@
}
catch(NumberFormatException e)
{
+ McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_NUMBERFORMAT, new Boolean(true).toString());
persistError(request, "error.sessionId.numberFormatException");
logger.debug("add error.sessionId.numberFormatException to ActionMessages.");
- McUtils.cleanUpSessionAbsolute(request);
- return (mapping.findForward(ERROR_LIST));
+ return (mapping.findForward(ERROR_LIST));
}
}
@@ -658,15 +667,17 @@
if ((mode == null) || (mode.length() == 0))
{
- persistError(request, "error.mode.required");
McUtils.cleanUpSessionAbsolute(request);
- return (mapping.findForward(ERROR_LIST));
+ request.getSession().setAttribute(USER_EXCEPTION_MODE_REQUIRED, new Boolean(true).toString());
+ persistError(request, "error.mode.required");
+ return (mapping.findForward(ERROR_LIST));
}
if ((!mode.equals("learner")) && (!mode.equals("teacher")) && (!mode.equals("author")))
{
- persistError(request, "error.mode.invalid");
McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_MODE_INVALID, new Boolean(true).toString());
+ persistError(request, "error.mode.invalid");
return (mapping.findForward(ERROR_LIST));
}
logger.debug("session LEARNING_MODE set to:" + mode);
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java,v
diff -u -r1.16 -r1.17
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java 25 Feb 2006 19:27:26 -0000 1.16
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java 13 Mar 2006 23:17:26 -0000 1.17
@@ -150,6 +150,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching unspecified...");
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
McMonitoringForm mcMonitoringForm = (McMonitoringForm) form;
@@ -179,6 +180,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching submitSession...");
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
McMonitoringForm mcMonitoringForm = (McMonitoringForm) form;
@@ -235,6 +237,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching editActivity...");
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
McMonitoringForm mcMonitoringForm = (McMonitoringForm) form;
@@ -268,9 +271,9 @@
if (isContentInUse == true)
{
+ McUtils.cleanUpSessionAbsolute(request);
logger.debug("monitoring url does not allow editActivity since the content is in use.");
persistError(request,"error.content.inUse");
- McUtils.cleanUpSessionAbsolute(request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(true).toString());
logger.debug("forwarding to: " + LOAD_MONITORING_CONTENT);
return (mapping.findForward(LOAD_MONITORING_CONTENT));
@@ -304,6 +307,7 @@
ServletException,
ToolException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching editActivityQuestions..");
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
IMcService mcService =McUtils.getToolService(request);
@@ -327,6 +331,7 @@
return (mapping.findForward(LOAD_MONITORING_CONTENT));
}
+
/**
* switches to summary tab of the monitoring url
* getSummary(ActionMapping mapping,
@@ -349,6 +354,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
McMonitoringStarterAction mcMonitoringStarter= new McMonitoringStarterAction();
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
logger.debug("init monitoring data");
@@ -393,6 +399,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching getInstructions..." + request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
McMonitoringStarterAction mcMonitoringStarter= new McMonitoringStarterAction();
@@ -440,6 +447,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
McMonitoringStarterAction mcMonitoringStarter= new McMonitoringStarterAction();
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
logger.debug("init monitoring data");
@@ -484,6 +492,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy addNewQuestion...");
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -518,6 +527,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy removeQuestion...");
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -552,6 +562,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy editOptions..." + request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -586,6 +597,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy addOption..."+ request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -619,6 +631,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy removeOption..." + request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -654,6 +667,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy moveQuestionDown..." + request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -688,6 +702,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy moveQuestionUp..." + request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -721,6 +736,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy doneOptions...");
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -756,6 +772,7 @@
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy submitQuestions..." + request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -795,6 +812,7 @@
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy deleteOfflineFile..." + request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -829,6 +847,7 @@
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy deleteOnlineFile...");
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -866,6 +885,7 @@
ServletException,
RepositoryCheckedException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy deleteOnlineFile..." + request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -902,6 +922,7 @@
ServletException,
RepositoryCheckedException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy submitOnlineFiles..." + request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -935,6 +956,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy doneAdvancedTab...");
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -969,6 +991,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ McUtils.cleanUpUserExceptions(request);
logger.debug("dispatching proxy doneInstructionsTab...");
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
request.setAttribute(SOURCE_MC_STARTER, "monitoring");
@@ -1005,8 +1028,7 @@
{
McUtils.cleanUpSessionAbsolute(request);
request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString());
- /*forward outside of the app. Currently it is index.jsp */
- return (mapping.findForward(LOAD_STARTER));
+ return (mapping.findForward(LOAD_MONITORING_CONTENT));
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java,v
diff -u -r1.18 -r1.19
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java 7 Mar 2006 15:01:04 -0000 1.18
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java 13 Mar 2006 23:17:26 -0000 1.19
@@ -97,7 +97,6 @@
redirect="true"
/>
-
*
*/
@@ -164,8 +163,9 @@
if (mcContent == null)
{
- persistError(request, "error.content.doesNotExist");
McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENT_DOESNOTEXIST, new Boolean(true).toString());
+ persistError(request, "error.content.doesNotExist");
return false;
}
@@ -284,9 +284,10 @@
if ((strToolContentId == null) || (strToolContentId.length() == 0))
{
- persistError(request, "error.contentId.required");
McUtils.cleanUpSessionAbsolute(request);
- return (mapping.findForward(ERROR_LIST));
+ persistError(request, "error.contentId.required");
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENTID_REQUIRED, new Boolean(true).toString());
+ return (mapping.findForward(ERROR_LIST));
}
else
{
@@ -298,9 +299,10 @@
}
catch(NumberFormatException e)
{
- persistError(request, "error.contentId.numberFormatException");
- logger.debug("add error.contentId.numberFormatException to ActionMessages.");
McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_NUMBERFORMAT, new Boolean(true).toString());
+ persistError(request, "error.numberFormatException");
+ logger.debug("add error.numberFormatException to ActionMessages.");
return (mapping.findForward(ERROR_LIST));
}
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McStarterAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McStarterAction.java,v
diff -u -r1.65 -r1.66
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McStarterAction.java 25 Feb 2006 19:27:26 -0000 1.65
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McStarterAction.java 13 Mar 2006 23:17:26 -0000 1.66
@@ -257,6 +257,8 @@
if ((strToolContentId == null) || (strToolContentId.equals("")))
{
+ McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENTID_REQUIRED, new Boolean(true).toString());
persistError(request,"error.contentId.required");
McUtils.cleanUpSessionAbsolute(request);
logger.debug("forwarding to: " + ERROR_LIST);
@@ -274,8 +276,9 @@
}
catch(NumberFormatException e)
{
- persistError(request,"error.ids.numberFormatException");
McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_NUMBERFORMAT, new Boolean(true).toString());
+ persistError(request,"error.numberFormatException");
logger.debug("forwarding to: " + ERROR_LIST);
return (mapping.findForward(ERROR_LIST));
}
@@ -400,8 +403,9 @@
if (isContentInUse == true)
{
+ McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENT_IN_USE, new Boolean(true).toString());
persistError(request,"error.content.inUse");
- McUtils.cleanUpSessionAbsolute(request);
logger.debug("forwarding to: " + ERROR_LIST);
return (mapping.findForward(ERROR_LIST));
}
@@ -424,8 +428,9 @@
logger.debug("the url mode is :" + defineLater);
if (isDefineLater == true)
{
- persistError(request,"error.content.beingModified");
McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_CONTENT_BEING_MODIFIED, new Boolean(true).toString());
+ persistError(request,"error.content.beingModified");
logger.debug("forwarding to: " + ERROR_LIST);
return (mapping.findForward(ERROR_LIST));
}
@@ -465,17 +470,19 @@
logger.debug("retrieved tool default contentId: " + contentId);
if (contentId == 0)
{
- logger.debug("default content id has not been setup");
- persistError(request,"error.defaultContent.notSetup");
McUtils.cleanUpSessionAbsolute(request);
- return (mapping.findForward(ERROR_LIST));
+ logger.debug("Exception occured: No default options content");
+ request.getSession().setAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP, new Boolean(true).toString());
+ persistError(request,"error.defaultContent.notSetup");
+ return (mapping.findForward(ERROR_LIST));
}
}
catch(Exception e)
{
- logger.debug("error getting the default content id: " + e.getMessage());
- persistError(request,"error.defaultContent.notSetup");
McUtils.cleanUpSessionAbsolute(request);
+ logger.debug("Exception occured: No default options content");
+ request.getSession().setAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP, new Boolean(true).toString());
+ persistError(request,"error.defaultContent.notSetup");
return (mapping.findForward(ERROR_LIST));
}
@@ -487,9 +494,10 @@
McContent mcContent=mcService.retrieveMc(new Long(contentId));
if (mcContent == null)
{
- logger.debug("Exception occured: No default content");
+ McUtils.cleanUpSessionAbsolute(request);
+ logger.debug("Exception occured: No default options content");
+ request.getSession().setAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP, new Boolean(true).toString());
persistError(request,"error.defaultContent.notSetup");
- McUtils.cleanUpSessionAbsolute(request);
return (mapping.findForward(ERROR_LIST));
}
logger.debug("using mcContent: " + mcContent);
@@ -498,9 +506,10 @@
}
catch(Exception e)
{
- logger.debug("Exception occured: No default question content");
- persistError(request,"error.defaultContent.notSetup");
McUtils.cleanUpSessionAbsolute(request);
+ logger.debug("Exception occured: No default options content");
+ request.getSession().setAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP, new Boolean(true).toString());
+ persistError(request,"error.defaultContent.notSetup");
return (mapping.findForward(ERROR_LIST));
}
@@ -514,9 +523,10 @@
logger.debug("using mcQueContent: " + mcQueContent);
if (mcQueContent == null)
{
- logger.debug("Exception occured: No default question content");
- persistError(request,"error.defaultQuestionContent.notAvailable");
- McUtils.cleanUpSessionAbsolute(request);
+ McUtils.cleanUpSessionAbsolute(request);
+ logger.debug("Exception occured: No default options content");
+ request.getSession().setAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP, new Boolean(true).toString());
+ persistError(request,"error.defaultContent.notSetup");
return (mapping.findForward(ERROR_LIST));
}
logger.debug("using mcQueContent uid: " + mcQueContent.getUid());
@@ -526,9 +536,10 @@
}
catch(Exception e)
{
- logger.debug("Exception occured: No default question content");
- persistError(request,"error.defaultQuestionContent.notAvailable");
- McUtils.cleanUpSessionAbsolute(request);
+ McUtils.cleanUpSessionAbsolute(request);
+ logger.debug("Exception occured: No default options content");
+ request.getSession().setAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP, new Boolean(true).toString());
+ persistError(request,"error.defaultContent.notSetup");
return (mapping.findForward(ERROR_LIST));
}
@@ -541,18 +552,20 @@
logger.debug("using options list: " + list);
if (list == null)
{
+ McUtils.cleanUpSessionAbsolute(request);
logger.debug("Exception occured: No default options content");
- persistError(request,"error.defaultOptionsContent.notAvailable");
- McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP, new Boolean(true).toString());
+ persistError(request,"error.defaultContent.notSetup");
return (mapping.findForward(ERROR_LIST));
}
}
catch(Exception e)
{
+ McUtils.cleanUpSessionAbsolute(request);
logger.debug("Exception occured: No default options content");
- persistError(request,"error.defaultOptionsContent.notAvailable");
- McUtils.cleanUpSessionAbsolute(request);
+ request.getSession().setAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP, new Boolean(true).toString());
+ persistError(request,"error.defaultContent.notSetup");
return (mapping.findForward(ERROR_LIST));
}
Fisheye: Tag 1.6 refers to a dead (removed) revision in file `lams_tool_lamc/web/Errorbox.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_lamc/web/McErrorBox.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/Attic/McErrorBox.jsp,v
diff -u -r1.4 -r1.5
--- lams_tool_lamc/web/McErrorBox.jsp 24 Feb 2006 20:25:27 -0000 1.4
+++ lams_tool_lamc/web/McErrorBox.jsp 13 Mar 2006 23:17:26 -0000 1.5
@@ -32,7 +32,170 @@
-
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
Index: lams_tool_lamc/web/SystemErrorContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/Attic/SystemErrorContent.jsp,v
diff -u -r1.3 -r1.4
--- lams_tool_lamc/web/SystemErrorContent.jsp 24 Feb 2006 20:25:27 -0000 1.3
+++ lams_tool_lamc/web/SystemErrorContent.jsp 13 Mar 2006 23:17:26 -0000 1.4
@@ -1,4 +1,4 @@
-<%--
+
+
<%@ taglib uri="tags-bean" prefix="bean"%>
<%@ taglib uri="tags-html" prefix="html"%>
<%@ taglib uri="tags-logic" prefix="logic" %>
-<%@ taglib uri="tags-logic-el" prefix="logic-el" %>
<%@ taglib uri="tags-core" prefix="c"%>
<%@ taglib uri="tags-fmt" prefix="fmt" %>
<%@ taglib uri="fck-editor" prefix="FCK" %>
<%@ taglib uri="tags-lams" prefix="lams" %>
-
-
-
-
-
-
-
- <%@ include file="/Errorbox.jsp" %>
-
+ |
+
|
Index: lams_tool_lamc/web/authoring/AuthoringMaincontent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/authoring/Attic/AuthoringMaincontent.jsp,v
diff -u -r1.14 -r1.15
--- lams_tool_lamc/web/authoring/AuthoringMaincontent.jsp 24 Feb 2006 20:25:27 -0000 1.14
+++ lams_tool_lamc/web/authoring/AuthoringMaincontent.jsp 13 Mar 2006 23:17:27 -0000 1.15
@@ -110,30 +110,20 @@
-
-
-
-
+
+
+
-
-
- images/success.gif" align="left" width=20 height=20>
-
-
+ images/success.gif" align="left" width=20 height=20>
+
+
-
-
-
-
-
- images/error.jpg" align="left" width=20 height=20>
-
-
-
-
- |
-
-
+ |
+
+
+
+ |
+
|
-
-
-
-
- |
-
-
- |
-
+