Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McLearningController.java =================================================================== diff -u -ra1ccd73a7050b1e2466b6c2d867a174696cb2bf0 -rd25e9265466c2a19b39850104b8db9a0332ab2f5 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McLearningController.java (.../McLearningController.java) (revision a1ccd73a7050b1e2466b6c2d867a174696cb2bf0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McLearningController.java (.../McLearningController.java) (revision d25e9265466c2a19b39850104b8db9a0332ab2f5) @@ -65,7 +65,6 @@ import org.lamsfoundation.lams.web.util.SessionMap; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -114,7 +113,7 @@ mcLearningForm.setToolSessionID(toolSessionID); McSession mcSession = mcService.getMcSessionById(new Long(toolSessionID)); - + /* * by now, we made sure that the passed tool session id exists in the db as a new record Make sure we can * retrieve it and the relavent content @@ -137,7 +136,7 @@ String mode = request.getParameter(McAppConstants.MODE); request.setAttribute(AttributeNames.ATTR_MODE, mode); - + McQueUsr user = null; if ((mode != null) && mode.equals(ToolAccessMode.TEACHER.toString())) { // monitoring mode - user is specified in URL @@ -252,7 +251,6 @@ return "learning/AnswersContent"; } - /** * ActionForward endLearning(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse * response) @@ -643,7 +641,7 @@ /** * checks Leader Progress */ - @RequestMapping(path = "/checkLeaderProgress", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping("/checkLeaderProgress") @ResponseBody public String checkLeaderProgress(HttpServletRequest request, HttpServletResponse response) throws IOException { @@ -656,6 +654,7 @@ ObjectNode ObjectNode = JsonNodeFactory.instance.objectNode(); ObjectNode.put("isLeaderResponseFinalized", isLeaderResponseFinalized); + response.setContentType("application/json;charset=UTF-8"); return ObjectNode.toString(); } Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McMonitoringController.java =================================================================== diff -u -re1e8890bd7a972827bd9449eeb7f76a9b42c5913 -rd25e9265466c2a19b39850104b8db9a0332ab2f5 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McMonitoringController.java (.../McMonitoringController.java) (revision e1e8890bd7a972827bd9449eeb7f76a9b42c5913) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McMonitoringController.java (.../McMonitoringController.java) (revision d25e9265466c2a19b39850104b8db9a0332ab2f5) @@ -316,7 +316,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) { @@ -343,7 +343,7 @@ /** * Set tool's activityEvaluation */ - @RequestMapping(path = "/setActivityEvaluation", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping("/setActivityEvaluation") @ResponseBody public String setActivityEvaluation(HttpServletRequest request, HttpServletResponse response) throws IOException { @@ -353,6 +353,7 @@ ObjectNode responseJSON = JsonNodeFactory.instance.objectNode(); responseJSON.put("success", "true"); + response.setContentType("application/json;charset=UTF-8"); return responseJSON.toString(); } @@ -396,9 +397,9 @@ /** * Return paged users for jqGrid. */ - @RequestMapping(path = "/getPagedUsers", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping("/getPagedUsers") @ResponseBody - public String getPagedUsers(HttpServletRequest request) { + public String getPagedUsers(HttpServletRequest request, HttpServletResponse response) { Long sessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); McSession session = mcService.getMcSessionById(sessionId); @@ -472,7 +473,7 @@ responseJSON.put("page", page); responseJSON.put("records", countVisitLogs); responseJSON.set("rows", rows); - + response.setContentType("application/json;charset=UTF-8"); return responseJSON.toString(); } @@ -493,9 +494,9 @@ /** * Get the mark summary with data arranged in bands. Can be displayed graphically or in a table. */ - @RequestMapping(path = "/getMarkChartData", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping("/getMarkChartData") @ResponseBody - public String getMarkChartData(HttpServletRequest request) throws IOException { + public String getMarkChartData(HttpServletRequest request, HttpServletResponse response) throws IOException { Long contentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); McContent mcContent = mcService.getMcContent(contentID); @@ -516,7 +517,7 @@ } else { responseJSON.set("data", JsonUtil.readArray(new Float[0])); } - + response.setContentType("application/json;charset=UTF-8"); return responseJSON.toString(); }