Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/controller/LearningController.java =================================================================== diff -u -r9f988c0cf9ce45c8812158692f38e74688b96ea4 -ra34124084b91153f8cbe0720a88be1a8e0ae1e88 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/controller/LearningController.java (.../LearningController.java) (revision 9f988c0cf9ce45c8812158692f38e74688b96ea4) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/controller/LearningController.java (.../LearningController.java) (revision a34124084b91153f8cbe0720a88be1a8e0ae1e88) @@ -763,7 +763,7 @@ /** * Create a replayed topic for a parent topic. */ - @RequestMapping(path = "/replyTopicInline", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping("/replyTopicInline") @ResponseBody public String replyTopicInline(@ModelAttribute("replyForm") MessageForm replyForm, HttpServletRequest request, HttpServletResponse response) throws InterruptedException, IOException { @@ -809,6 +809,7 @@ ObjectNode.put(ForumConstants.ATTR_ROOT_TOPIC_UID, rootTopicId); ObjectNode.put(ForumConstants.ATTR_PARENT_TOPIC_ID, newMessageSeq.getMessage().getParent().getUid()); + response.setContentType("application/json;charset=UTF-8"); return ObjectNode.toString(); } @@ -928,7 +929,7 @@ /** * Update a topic. */ - @RequestMapping(path = "/updateTopicInline", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping("/updateTopicInline") @ResponseBody public String updateTopicInline(@ModelAttribute MessageForm messageForm, HttpServletRequest request, HttpServletResponse response) throws PersistenceException, IOException { @@ -947,6 +948,7 @@ Long rootTopicId = forumService.getRootTopicId(topicId); ObjectNode.put(ForumConstants.ATTR_ROOT_TOPIC_UID, rootTopicId); + response.setContentType("application/json;charset=UTF-8"); return ObjectNode.toString(); } @@ -993,7 +995,7 @@ /** * Rates postings submitted by other learners. */ - @RequestMapping(path = "/rateMessage", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping("/rateMessage") @ResponseBody public String rateMessage(HttpServletRequest request, HttpServletResponse response) throws IOException { @@ -1030,6 +1032,7 @@ ObjectNode.put(ForumConstants.ATTR_NO_MORE_RATINGSS, noMoreRatings); ObjectNode.put(ForumConstants.ATTR_NUM_OF_RATINGS, numOfRatings); + response.setContentType("application/json;charset=UTF-8"); return ObjectNode.toString(); } Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/controller/MonitoringController.java =================================================================== diff -u -r98901fbfc777fa7907f4643646147c0c0286fa20 -ra34124084b91153f8cbe0720a88be1a8e0ae1e88 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/controller/MonitoringController.java (.../MonitoringController.java) (revision 98901fbfc777fa7907f4643646147c0c0286fa20) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/controller/MonitoringController.java (.../MonitoringController.java) (revision a34124084b91153f8cbe0720a88be1a8e0ae1e88) @@ -78,6 +78,7 @@ import org.springframework.stereotype.Controller; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.validation.Errors; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @@ -184,9 +185,10 @@ /** * Refreshes user list. */ - @RequestMapping(path = "/getUsers", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping("/getUsers") @ResponseBody - public String getUsers(HttpServletRequest request) throws IOException, ServletException { + public String getUsers(HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { String sessionMapId = WebUtil.readStrParam(request, ForumConstants.ATTR_SESSION_MAP_ID); SessionMap sessionMap = (SessionMap) request.getSession() .getAttribute(sessionMapId); @@ -300,7 +302,7 @@ rows.add(responseRow); } responcedata.set("rows", rows); - + response.setContentType("application/json;charset=UTF-8"); return responcedata.toString(); } @@ -532,7 +534,7 @@ Message topic = forumService.getMessage(msgUid); request.setAttribute(ForumConstants.AUTHORING_TOPIC, MessageDTO.getMessageDTO(topic)); - return "jsps/monitoring/message/viewtopic"; + return "jsps/learning/viewtopic"; } @RequestMapping("/releaseMark") @@ -646,12 +648,12 @@ Float mark = null; MultiValueMap errorMap = new LinkedMultiValueMap<>(); if (StringUtils.isBlank(markStr)) { - errorMap.add("report.mark", messageService.getMessage("error.valueReqd")); + errorMap.add("GLOBAL", messageService.getMessage("error.valueReqd")); } else { try { mark = NumberUtil.getLocalisedFloat(markStr, request.getLocale()); } catch (Exception e) { - errorMap.add("report.mark", messageService.getMessage("error.mark.invalid.number")); + errorMap.add("GLOBAL", messageService.getMessage("error.mark.invalid.number")); } } @@ -664,7 +666,7 @@ // each back to web page request.setAttribute(ForumConstants.ATTR_TOPIC, MessageDTO.getMessageDTO(msg)); request.setAttribute("errorMap", errorMap); - return "jsps/monitoring/monitoring"; + return "jsps/monitoring/updatemarks"; } // update message report @@ -696,7 +698,7 @@ // display root topic rather than leaf one Long rootTopicId = forumService.getRootTopicId(msg.getUid()); - String redirect = "redirect:/monitoring/viewTopic.do"; + String redirect = "redirect:/learning/viewTopic.do"; redirect = WebUtil.appendParameterToURL(redirect, ForumConstants.ATTR_SESSION_MAP_ID, markForm.getSessionMapID()); redirect = WebUtil.appendParameterToURL(redirect, ForumConstants.ATTR_USER, user.toString()); @@ -709,7 +711,7 @@ /** * Set Submission Deadline */ - @RequestMapping(path = "setSubmissionDeadline", produces = MediaType.TEXT_PLAIN_VALUE) + @RequestMapping(path = "/setSubmissionDeadline", produces = MediaType.TEXT_PLAIN_VALUE) @ResponseBody public String setSubmissionDeadline(HttpServletRequest request) throws IOException { Index: lams_tool_forum/web/jsps/learning/message/topiceditform.jsp =================================================================== diff -u -r9f988c0cf9ce45c8812158692f38e74688b96ea4 -ra34124084b91153f8cbe0720a88be1a8e0ae1e88 --- lams_tool_forum/web/jsps/learning/message/topiceditform.jsp (.../topiceditform.jsp) (revision 9f988c0cf9ce45c8812158692f38e74688b96ea4) +++ lams_tool_forum/web/jsps/learning/message/topiceditform.jsp (.../topiceditform.jsp) (revision a34124084b91153f8cbe0720a88be1a8e0ae1e88) @@ -2,7 +2,7 @@
-   +  
Index: lams_tool_forum/web/jsps/learning/message/topicreplyform.jsp =================================================================== diff -u -r98901fbfc777fa7907f4643646147c0c0286fa20 -ra34124084b91153f8cbe0720a88be1a8e0ae1e88 --- lams_tool_forum/web/jsps/learning/message/topicreplyform.jsp (.../topicreplyform.jsp) (revision 98901fbfc777fa7907f4643646147c0c0286fa20) +++ lams_tool_forum/web/jsps/learning/message/topicreplyform.jsp (.../topicreplyform.jsp) (revision a34124084b91153f8cbe0720a88be1a8e0ae1e88) @@ -2,7 +2,7 @@
  - +  
Index: lams_tool_forum/web/jsps/monitoring/statisticpart.jsp =================================================================== diff -u -r98901fbfc777fa7907f4643646147c0c0286fa20 -ra34124084b91153f8cbe0720a88be1a8e0ae1e88 --- lams_tool_forum/web/jsps/monitoring/statisticpart.jsp (.../statisticpart.jsp) (revision 98901fbfc777fa7907f4643646147c0c0286fa20) +++ lams_tool_forum/web/jsps/monitoring/statisticpart.jsp (.../statisticpart.jsp) (revision a34124084b91153f8cbe0720a88be1a8e0ae1e88) @@ -40,7 +40,7 @@
- + Index: lams_tool_forum/web/jsps/monitoring/updatemarks.jsp =================================================================== diff -u -r1561968992b7d31789fc5d8db45d72282adc1dc5 -ra34124084b91153f8cbe0720a88be1a8e0ae1e88 --- lams_tool_forum/web/jsps/monitoring/updatemarks.jsp (.../updatemarks.jsp) (revision 1561968992b7d31789fc5d8db45d72282adc1dc5) +++ lams_tool_forum/web/jsps/monitoring/updatemarks.jsp (.../updatemarks.jsp) (revision a34124084b91153f8cbe0720a88be1a8e0ae1e88) @@ -31,7 +31,7 @@

- learning/viewTopic.do?topicID=${topic.message.uid}&create=${topic.message.created.time}&sessionMapID=${formBean.sessionMapID}&hideReflection=${sessionMap.hideReflection} + learning/viewTopic.do?topicID=${topic.message.uid}&create=${topic.message.created.time}&sessionMapID=${markForm.sessionMapID}&hideReflection=${sessionMap.hideReflection} @@ -40,7 +40,6 @@

- <%@ include file="/common/messages.jsp"%>