Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/Message.java =================================================================== diff -u -rc1bc94e82ed876ec01e06173c8e4edfdd024253c -rb1c0d52ecba9b00684a98dfb74dbf07ea927b489 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/Message.java (.../Message.java) (revision c1bc94e82ed876ec01e06173c8e4edfdd024253c) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/Message.java (.../Message.java) (revision b1c0d52ecba9b00684a98dfb74dbf07ea927b489) @@ -36,10 +36,6 @@ /** * @author conradb - * - * - * - * */ public class Message implements Cloneable { Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java =================================================================== diff -u -rbe48c7dd8438a3e7f038876851f7a3b740c8f4f4 -rb1c0d52ecba9b00684a98dfb74dbf07ea927b489 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java (.../LearningAction.java) (revision be48c7dd8438a3e7f038876851f7a3b740c8f4f4) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java (.../LearningAction.java) (revision b1c0d52ecba9b00684a98dfb74dbf07ea927b489) @@ -165,9 +165,6 @@ // ========================================================================================== /** * Display root topics of a forum. This page will be the initial page of Learner page. - * - * @throws Exception - * */ private ActionForward viewForum(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { @@ -177,7 +174,7 @@ SessionMap sessionMap; // refresh forum page, not initial enter if (sessionMapID != null) { - sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); } else { sessionMap = new SessionMap(); request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); @@ -352,17 +349,11 @@ /** * Learner click "finish" button in forum page, this method will turn on session status flag for this learner. - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ private ActionForward finish(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { String sessionMapID = WebUtil.readStrParam(request, ForumConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); ToolAccessMode mode = (ToolAccessMode) sessionMap.get(AttributeNames.ATTR_MODE); Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); @@ -406,20 +397,15 @@ /** * Submit reflection form input database. - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ private ActionForward submitReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { ReflectionForm refForm = (ReflectionForm) form; Integer userId = refForm.getUserID(); String sessionMapID = WebUtil.readStrParam(request, ForumConstants.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); // check for existing notebook entry @@ -442,12 +428,6 @@ /** * Display empty reflection form. - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ private ActionForward newReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { @@ -468,7 +448,7 @@ // get the existing reflection entry IForumService submitFilesService = getForumManager(); - 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, ForumConstants.TOOL_SIGNATURE, user.getUserID()); @@ -487,12 +467,6 @@ /** * Display the messages for a particular topic. The Topic will arranged by Tree structure and loaded thread by * thread (with paging). - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ private ActionForward viewTopic(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { @@ -502,7 +476,7 @@ Long rootTopicId = WebUtil.readLongParam(request, ForumConstants.ATTR_TOPIC_ID); String sessionMapID = WebUtil.readStrParam(request, ForumConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); sessionMap.put(ForumConstants.ATTR_ROOT_TOPIC_UID, rootTopicId); // get forum user and forum @@ -560,12 +534,6 @@ /** * Display the messages for a particular thread in a particular topic. Returns all messages for this thread - does * not need paging. - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ private ActionForward viewTopicThread(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { @@ -576,7 +544,7 @@ Long highlightMessageUid = WebUtil.readLongParam(request, ForumConstants.ATTR_MESS_ID, true); String sessionMapID = WebUtil.readStrParam(request, ForumConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); sessionMap.put(ForumConstants.ATTR_ROOT_TOPIC_UID, rootTopicId); // get forum user and forum @@ -607,12 +575,6 @@ /** * Display a single message. - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ private ActionForward viewMessage(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { @@ -623,7 +585,7 @@ Long messageUid = WebUtil.readLongParam(request, ForumConstants.ATTR_MESS_ID, true); String sessionMapID = WebUtil.readStrParam(request, ForumConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); sessionMap.put(ForumConstants.ATTR_ROOT_TOPIC_UID, rootTopicId); // get forum user and forum @@ -653,12 +615,6 @@ /** * Display empty page for a new topic in forum - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ private ActionForward newTopic(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { @@ -670,21 +626,12 @@ /** * Create a new root topic. - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws IOException - * @throws ServletException - * @throws PersistenceException */ public ActionForward createTopic(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, PersistenceException { MessageForm messageForm = (MessageForm) form; - SessionMap sessionMap = getSessionMap(request, messageForm); + SessionMap sessionMap = getSessionMap(request, messageForm); Long forumId = (Long) sessionMap.get(ForumConstants.ATTR_FORUM_ID); Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); List rootTopics = forumService.getRootTopics(sessionId); @@ -731,18 +678,12 @@ /** * Display replay topic page. Message form subject will include parent topics same subject. - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ private ActionForward newReplyTopic(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { MessageForm msgForm = (MessageForm) form; String sessionMapID = request.getParameter(ForumConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = getSessionMap(request, msgForm); + SessionMap sessionMap = getSessionMap(request, msgForm); msgForm.setSessionMapID(sessionMapID); Long parentId = WebUtil.readLongParam(request, ForumConstants.ATTR_PARENT_TOPIC_ID); @@ -783,7 +724,7 @@ HttpServletResponse response) throws InterruptedException { MessageForm messageForm = (MessageForm) form; - SessionMap sessionMap = getSessionMap(request, messageForm); + SessionMap sessionMap = getSessionMap(request, messageForm); Long parentId = (Long) sessionMap.get(ForumConstants.ATTR_PARENT_TOPIC_ID); Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); @@ -831,7 +772,7 @@ throws InterruptedException, JSONException, IOException { MessageForm messageForm = (MessageForm) form; - SessionMap sessionMap = getSessionMap(request, messageForm); + SessionMap sessionMap = getSessionMap(request, messageForm); Long parentId = (Long) sessionMap.get(ForumConstants.ATTR_PARENT_TOPIC_ID); Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); @@ -883,13 +824,6 @@ /** * Display a editable form for a special topic in order to update it. - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws PersistenceException */ public ActionForward editTopic(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws PersistenceException { @@ -922,12 +856,6 @@ /** * Delete attachment from topic. This method only reset attachment information in memory. The finally update will * happen in updateTopic method. So topic can keep this attachment if user choose "Cancel" edit topic. - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ private ActionForward deleteAttachment(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { @@ -936,29 +864,22 @@ dto.setHasAttachment(false); request.setAttribute(ForumConstants.AUTHORING_TOPIC, dto); String sessionMapId = WebUtil.readStrParam(request, ForumConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapId); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapId); request.setAttribute(ForumConstants.ATTR_ALLOW_UPLOAD, sessionMap.get(ForumConstants.ATTR_ALLOW_UPLOAD)); request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, sessionMapId); return mapping.findForward("success"); } /** * Update a topic. - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws PersistenceException */ public ActionForward updateTopic(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws PersistenceException { forumService = getForumManager(); MessageForm messageForm = (MessageForm) form; - SessionMap sessionMap = getSessionMap(request, messageForm); + SessionMap sessionMap = getSessionMap(request, messageForm); Long topicId = (Long) sessionMap.get(ForumConstants.ATTR_TOPIC_ID); Message message = messageForm.getMessage(); @@ -973,7 +894,7 @@ return mapping.findForward("success"); } - private void doUpdateTopic(HttpServletRequest request, MessageForm messageForm, SessionMap sessionMap, Long topicId, + private void doUpdateTopic(HttpServletRequest request, MessageForm messageForm, SessionMap sessionMap, Long topicId, Message message) { boolean makeAuditEntry = ToolAccessMode.TEACHER.equals(sessionMap.get(AttributeNames.ATTR_MODE)); String oldMessageString = null; @@ -1012,23 +933,14 @@ /** * Update a topic. - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws PersistenceException - * @throws JSONException - * @throws IOException */ public ActionForward updateTopicInline(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws PersistenceException, JSONException, IOException { forumService = getForumManager(); MessageForm messageForm = (MessageForm) form; - SessionMap sessionMap = getSessionMap(request, messageForm); + SessionMap sessionMap = getSessionMap(request, messageForm); Long topicId = (Long) sessionMap.get(ForumConstants.ATTR_TOPIC_ID); Message message = messageForm.getMessage(); @@ -1046,12 +958,6 @@ /** * Sets the visibility of a message by updating the hide flag for a message - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ public ActionForward updateMessageHideFlag(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { @@ -1092,12 +998,6 @@ /** * Rates postings submitted by other learners. - * - * @param mapping - * @param form - * @param request - * @param response - * @return */ public ActionForward rateMessage(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws JSONException, IOException { @@ -1146,7 +1046,7 @@ * Validation method to check whether user posts meet minimum number. */ 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); ForumToolSession session = forumService.getSessionBySessionId(sessionId); @@ -1283,8 +1183,9 @@ } } - private SessionMap getSessionMap(HttpServletRequest request, MessageForm messageForm) { - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(messageForm.getSessionMapID()); + private SessionMap getSessionMap(HttpServletRequest request, MessageForm messageForm) { + SessionMap sessionMap = (SessionMap) request.getSession() + .getAttribute(messageForm.getSessionMapID()); return sessionMap; } Index: lams_tool_forum/web/jsps/learning/message/msgviewwrapper.jsp =================================================================== diff -u -r5a77da874addd32a68f21987114f2fd9e096aaea -rb1c0d52ecba9b00684a98dfb74dbf07ea927b489 --- lams_tool_forum/web/jsps/learning/message/msgviewwrapper.jsp (.../msgviewwrapper.jsp) (revision 5a77da874addd32a68f21987114f2fd9e096aaea) +++ lams_tool_forum/web/jsps/learning/message/msgviewwrapper.jsp (.../msgviewwrapper.jsp) (revision b1c0d52ecba9b00684a98dfb74dbf07ea927b489) @@ -3,37 +3,32 @@ <%-- Wraps up msgview.jsp for returning a single message - called when an edit is performed. It needs to do all the setup that topicview.jsp normally does. --%> <%@ include file="/common/taglibs.jsp"%> - + + - - <%@ include file="msgview.jsp"%> - Index: lams_tool_forum/web/jsps/learning/message/topicview.jsp =================================================================== diff -u -r3613282e18e08aaaf4c5c09d556b8311e18f2e9d -rb1c0d52ecba9b00684a98dfb74dbf07ea927b489 --- lams_tool_forum/web/jsps/learning/message/topicview.jsp (.../topicview.jsp) (revision 3613282e18e08aaaf4c5c09d556b8311e18f2e9d) +++ lams_tool_forum/web/jsps/learning/message/topicview.jsp (.../topicview.jsp) (revision b1c0d52ecba9b00684a98dfb74dbf07ea927b489) @@ -137,5 +137,4 @@ " class="btn btn-xs btn-default"> - - + Index: lams_tool_forum/web/jsps/learning/viewtopic.jsp =================================================================== diff -u -r4583983b64efe1d91fbb47cdde6a759a6a30e859 -rb1c0d52ecba9b00684a98dfb74dbf07ea927b489 --- lams_tool_forum/web/jsps/learning/viewtopic.jsp (.../viewtopic.jsp) (revision 4583983b64efe1d91fbb47cdde6a759a6a30e859) +++ lams_tool_forum/web/jsps/learning/viewtopic.jsp (.../viewtopic.jsp) (revision b1c0d52ecba9b00684a98dfb74dbf07ea927b489) @@ -19,7 +19,6 @@ <fmt:message key="activity.title" /> - @@ -30,10 +29,10 @@ + var removeItemAttachmentUrl = ""; + //var for jquery.jRating.js + var pathToImageFolder = "${lams}images/css/"; + @@ -42,21 +41,20 @@ - + function refreshTopic(){ + var reqIDVar = new Date(); + location.href= ""+reqIDVar.getTime();; + } +