Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/LearningAction.java =================================================================== diff -u -r2f725f8ef2aa09a2663b2335bf67213074426d11 -r3d7ad32687edeec93585fe3ef54b554d891dbe98 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/LearningAction.java (.../LearningAction.java) (revision 2f725f8ef2aa09a2663b2335bf67213074426d11) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/LearningAction.java (.../LearningAction.java) (revision 3d7ad32687edeec93585fe3ef54b554d891dbe98) @@ -83,8 +83,6 @@ /** * * @author Steve.Ni - * - * @version $Revision$ */ public class LearningAction extends Action { @@ -144,7 +142,7 @@ HttpServletResponse response) { // initial Session Map - SessionMap sessionMap = new SessionMap(); + SessionMap sessionMap = new SessionMap(); request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); // save toolContentID into HTTPSession @@ -378,7 +376,7 @@ HttpServletResponse response) { String mode = request.getParameter(AttributeNames.ATTR_MODE); String sessionMapID = request.getParameter(TaskListConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); Long sessionId = (Long) sessionMap.get(TaskListConstants.ATTR_TOOL_SESSION_ID); doComplete(request); @@ -403,7 +401,7 @@ // get back SessionMap String sessionMapID = request.getParameter(TaskListConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); @@ -470,7 +468,7 @@ HttpServletResponse response) { // get back SessionMap String sessionMapID = request.getParameter(TaskListConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); TaskListItemForm itemForm = (TaskListItemForm) form; ActionErrors errors = validateTaskListItem(itemForm); @@ -527,7 +525,7 @@ HttpServletResponse response) { TaskListItemForm taskListItemForm = (TaskListItemForm) form; String mode = request.getParameter(AttributeNames.ATTR_MODE); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(taskListItemForm.getSessionMapID()); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(taskListItemForm.getSessionMapID()); request.setAttribute(TaskListConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID()); Long sessionId = (Long) sessionMap.get(TaskListConstants.ATTR_TOOL_SESSION_ID); @@ -579,7 +577,7 @@ TaskListItemForm taskListItemForm = (TaskListItemForm) form; String mode = request.getParameter(AttributeNames.ATTR_MODE); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(taskListItemForm.getSessionMapID()); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(taskListItemForm.getSessionMapID()); request.setAttribute(TaskListConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID()); Long sessionId = (Long) sessionMap.get(TaskListConstants.ATTR_TOOL_SESSION_ID); @@ -591,8 +589,9 @@ // validate file size ActionMessages errors = new ActionMessages(); - FileValidatorUtil.validateFileSize(file, true, errors); + FileValidatorUtil.validateFileSize(file, false, errors); if (!errors.isEmpty()) { + this.addErrors(request, errors); this.saveErrors(request, errors); return mapping.findForward("refresh"); } @@ -650,7 +649,7 @@ // get the existing reflection entry ITaskListService submitFilesService = getTaskListService(); - SessionMap map = (SessionMap) request.getSession().getAttribute(sessionMapID); + SessionMap map = (SessionMap) request.getSession().getAttribute(sessionMapID); Long toolSessionID = (Long) map.get(AttributeNames.PARAM_TOOL_SESSION_ID); NotebookEntry entry = submitFilesService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, TaskListConstants.TOOL_SIGNATURE, user.getUserID()); @@ -677,7 +676,7 @@ Integer userId = refForm.getUserID(); String sessionMapID = WebUtil.readStrParam(request, TaskListConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); ITaskListService service = getTaskListService(); @@ -747,7 +746,7 @@ } private boolean validateBeforeFinish(HttpServletRequest request, String sessionMapID) { - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); HttpSession ss = SessionManager.getSession(); Index: lams_tool_task/web/pages/learning/learning.jsp =================================================================== diff -u -re11fef2ebb0ae3b3d8261d8d01de83107037c5a8 -r3d7ad32687edeec93585fe3ef54b554d891dbe98 --- lams_tool_task/web/pages/learning/learning.jsp (.../learning.jsp) (revision e11fef2ebb0ae3b3d8261d8d01de83107037c5a8) +++ lams_tool_task/web/pages/learning/learning.jsp (.../learning.jsp) (revision 3d7ad32687edeec93585fe3ef54b554d891dbe98) @@ -1,26 +1,20 @@ - - <%@ include file="/common/taglibs.jsp"%> + + + + + + + + + <fmt:message key="label.learning.title" /> <%@ include file="/common/header.jsp"%> - <%-- param has higher level for request attribute --%> - - - - - - - - - - -