Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java =================================================================== diff -u -rb14d8f14824edb6b95b83f7f81d3f649b026545c -r775fda5c64507cac7df36436b3b12f799fb3ef6f --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java (.../MonitoringAction.java) (revision b14d8f14824edb6b95b83f7f81d3f649b026545c) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java (.../MonitoringAction.java) (revision 775fda5c64507cac7df36436b3b12f799fb3ef6f) @@ -33,7 +33,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; @@ -309,7 +308,7 @@ * @param response * @return */ - public ActionForward viewUserMark(ActionMapping mapping, ActionForm form, + private ActionForward viewUserMark(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { Long userUid = new Long(WebUtil.readLongParam(request, ForumConstants.USER_UID)); @@ -445,97 +444,6 @@ } /** - * Show edit page for a content activity. - * - * @param mapping - * @param form - * @param request - * @param response - * @return - */ - private ActionForward editActivity(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) { - MonitorForm monitorForm = (MonitorForm) form; - - Long toolContentId = (Long) request.getSession().getAttribute( - AttributeNames.PARAM_TOOL_CONTENT_ID); - forumService = getForumService(); - Forum forum = forumService.getForumByContentId(toolContentId); - - // if can not find out forum, echo back error message - if (forum == null) { - ActionErrors errors = new ActionErrors(); - errors.add("activity.globel", new ActionMessage( - "error.fail.get.forum")); - this.addErrors(request, errors); - log.error("Forum is null"); - return mapping.getInputForward(); - } - String title = forum.getTitle(); - String instruction = forum.getInstructions(); - request.setAttribute("title", title); - request.setAttribute("instruction", instruction); - - if (ForumWebUtils.isForumEditable(forum)) { - request.setAttribute(ForumConstants.PAGE_EDITABLE, "true"); - log.debug("Forum is editable"); - - // set up the request parameters to append to the URL - Map map = new HashMap(); - map.put(AttributeNames.PARAM_TOOL_CONTENT_ID, toolContentId); - monitorForm.setParametersToAppend(map); - } else { - request.setAttribute(ForumConstants.PAGE_EDITABLE, "false"); - log.debug("Forum is not editable"); - } - return mapping.findForward("success"); - } - - /** - * Update activity for a content. - * - * @param mapping - * @param form - * @param request - * @param response - * @return - */ - private ActionForward updateActivity(ActionMapping mapping, - ActionForm form, HttpServletRequest request, - HttpServletResponse response) { - Long contentId = (Long) request.getSession().getAttribute( - AttributeNames.PARAM_TOOL_CONTENT_ID); - String title = request.getParameter("title"); - String instruction = request.getParameter("instruction"); - - forumService = getForumService(); - Forum forum = forumService.getForumByContentId(contentId); - // if can not find out forum, echo back error message - ActionErrors errors = new ActionErrors(); - if (forum == null) { - errors.add("activity.globel", new ActionMessage( - "error.fail.get.forum")); - } - if (StringUtils.isEmpty(title)) { - errors - .add("activity.title", new ActionMessage( - "error.title.empty")); - } - // echo back to screen - request.setAttribute("title", title); - request.setAttribute("instruction", instruction); - if (!errors.isEmpty()) { - this.addErrors(request, errors); - return mapping.getInputForward(); - } - forum.setTitle(title); - forum.setInstructions(instruction); - forumService.updateForum(forum); - - return mapping.findForward("success"); - } - - /** * View instruction inforamtion for a content. * * @param mapping