Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== diff -u -re0aac9cd857044545722f389570725a9d33baf4e -re3e91d2a405148a23913ef90471db94b92d8f610 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision e0aac9cd857044545722f389570725a9d33baf4e) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision e3e91d2a405148a23913ef90471db94b92d8f610) @@ -1026,6 +1026,7 @@ TimeZone userTimeZone = userDto.getTimeZone(); boolean isAllowRateAnswers = WebUtil.readBooleanParam(request, "isAllowRateAnswers"); + boolean isAllowRichEditor = WebUtil.readBooleanParam(request, "isAllowRichEditor"); Long qaContentId = WebUtil.readLongParam(request, "qaContentId"); Long questionUid = WebUtil.readLongParam(request, "questionUid"); @@ -1090,10 +1091,16 @@ DateFormat dateFormatterTimeAgo = new SimpleDateFormat(DateUtil.ISO8601_FORMAT); for (QaUsrResp response : responses) { QaQueUsr user = response.getQaQueUser(); + + //remove leading and trailing quotes + String answer = StringEscapeUtils.escapeCsv(response.getAnswer()); + if (isAllowRichEditor && answer.startsWith("\"") && answer.length() >= 3) { + answer = answer.substring(1, answer.length()-1); + } JSONObject responseRow = new JSONObject(); responseRow.put("responseUid", response.getResponseId().toString()); - responseRow.put("answer", StringEscapeUtils.escapeCsv(response.getAnswer())); + responseRow.put("answer", answer); responseRow.put("userName", StringEscapeUtils.escapeCsv(user.getFullname())); responseRow.put("visible", new Boolean(response.isVisible()).toString()); Index: lams_tool_laqa/web/learning/LearnerRep.jsp =================================================================== diff -u -r88e13078544fe92f11f0d5a4c84e3c158b616b07 -re3e91d2a405148a23913ef90471db94b92d8f610 --- lams_tool_laqa/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision 88e13078544fe92f11f0d5a4c84e3c158b616b07) +++ lams_tool_laqa/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision e3e91d2a405148a23913ef90471db94b92d8f610) @@ -79,7 +79,7 @@ // {sortList:col} adds the sortList to the url into a "col" array, and {filterList:fcol} adds // the filterList to the url into an "fcol" array. // So a sortList = [[2,0],[3,0]] becomes "&col[2]=0&col[3]=0" in the url - ajaxUrl : "?method=getResponses&page={page}&size={size}&{sortList:column}&isAllowRateAnswers=${qaContent.allowRateAnswers}&qaContentId=${qaContent.qaContentId}&qaSessionId=" + $("#toolSessionID").val() + "&questionUid=" + $(this).attr('data-question-uid') + "&userId=" + $("#userID").val() + "&reqID=" + (new Date()).getTime(), + ajaxUrl : "?method=getResponses&page={page}&size={size}&{sortList:column}&isAllowRateAnswers=${qaContent.allowRateAnswers}&isAllowRichEditor=${qaContent.allowRichEditor}&qaContentId=${qaContent.qaContentId}&qaSessionId=" + $("#toolSessionID").val() + "&questionUid=" + $(this).attr('data-question-uid') + "&userId=" + $("#userID").val() + "&reqID=" + (new Date()).getTime(), ajaxProcessing: function (data) { if (data && data.hasOwnProperty('rows')) { var rows = [], Index: lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp =================================================================== diff -u -r88e13078544fe92f11f0d5a4c84e3c158b616b07 -re3e91d2a405148a23913ef90471db94b92d8f610 --- lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp (.../RevisitedLearnerRep.jsp) (revision 88e13078544fe92f11f0d5a4c84e3c158b616b07) +++ lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp (.../RevisitedLearnerRep.jsp) (revision e3e91d2a405148a23913ef90471db94b92d8f610) @@ -71,7 +71,7 @@ $(".tablesorter").each(function() { $(this).tablesorterPager({ savePages: false, - ajaxUrl : "?method=getResponses&page={page}&size={size}&{sortList:column}&isAllowRateAnswers=${qaContent.allowRateAnswers}&qaContentId=${qaContent.qaContentId}&qaSessionId=" + $("#toolSessionID").val() + "&questionUid=" + $(this).attr('data-question-uid') + "&userId=" + $("#userID").val() + "&reqID=" + (new Date()).getTime(), + ajaxUrl : "?method=getResponses&page={page}&size={size}&{sortList:column}&isAllowRateAnswers=${qaContent.allowRateAnswers}&isAllowRichEditor=${qaContent.allowRichEditor}&qaContentId=${qaContent.qaContentId}&qaSessionId=" + $("#toolSessionID").val() + "&questionUid=" + $(this).attr('data-question-uid') + "&userId=" + $("#userID").val() + "&reqID=" + (new Date()).getTime(), ajaxProcessing: function (data) { if (data && data.hasOwnProperty('rows')) { var rows = [], Index: lams_tool_laqa/web/learning/mobile/LearnerRep.jsp =================================================================== diff -u -re48fc0e1f6819e257b87efa36c3baec3c1c488f0 -re3e91d2a405148a23913ef90471db94b92d8f610 --- lams_tool_laqa/web/learning/mobile/LearnerRep.jsp (.../LearnerRep.jsp) (revision e48fc0e1f6819e257b87efa36c3baec3c1c488f0) +++ lams_tool_laqa/web/learning/mobile/LearnerRep.jsp (.../LearnerRep.jsp) (revision e3e91d2a405148a23913ef90471db94b92d8f610) @@ -80,7 +80,7 @@ // the filterList to the url into an "fcol" array. // So a sortList = [[2,0],[3,0]] becomes "&col[2]=0&col[3]=0" in the url // and a filterList = [[2,Blue],[3,13]] becomes "&fcol[2]=Blue&fcol[3]=13" in the url - ajaxUrl : "?method=getResponses&page={page}&size={size}&{sortList:column}&isAllowRateAnswers=${qaContent.allowRateAnswers}&qaContentId=${qaContent.qaContentId}&qaSessionId=" + $("#toolSessionID").val() + "&questionUid=" + $(this).attr('data-question-uid') + "&userId=" + $("#userID").val() + "&reqID=" + (new Date()).getTime(), + ajaxUrl : "?method=getResponses&page={page}&size={size}&{sortList:column}&isAllowRateAnswers=${qaContent.allowRateAnswers}&isAllowRichEditor=${qaContent.allowRichEditor}&qaContentId=${qaContent.qaContentId}&qaSessionId=" + $("#toolSessionID").val() + "&questionUid=" + $(this).attr('data-question-uid') + "&userId=" + $("#userID").val() + "&reqID=" + (new Date()).getTime(), ajaxProcessing: function (data) { if (data && data.hasOwnProperty('rows')) { Index: lams_tool_laqa/web/learning/mobile/RevisitedLearnerRep.jsp =================================================================== diff -u -re48fc0e1f6819e257b87efa36c3baec3c1c488f0 -re3e91d2a405148a23913ef90471db94b92d8f610 --- lams_tool_laqa/web/learning/mobile/RevisitedLearnerRep.jsp (.../RevisitedLearnerRep.jsp) (revision e48fc0e1f6819e257b87efa36c3baec3c1c488f0) +++ lams_tool_laqa/web/learning/mobile/RevisitedLearnerRep.jsp (.../RevisitedLearnerRep.jsp) (revision e3e91d2a405148a23913ef90471db94b92d8f610) @@ -80,7 +80,7 @@ // the filterList to the url into an "fcol" array. // So a sortList = [[2,0],[3,0]] becomes "&col[2]=0&col[3]=0" in the url // and a filterList = [[2,Blue],[3,13]] becomes "&fcol[2]=Blue&fcol[3]=13" in the url - ajaxUrl : "?method=getResponses&page={page}&size={size}&{sortList:column}&isAllowRateAnswers=${qaContent.allowRateAnswers}&qaContentId=${qaContent.qaContentId}&qaSessionId=" + $("#toolSessionID").val() + "&questionUid=" + $(this).attr('data-question-uid') + "&userId=" + $("#userID").val() + "&reqID=" + (new Date()).getTime(), + ajaxUrl : "?method=getResponses&page={page}&size={size}&{sortList:column}&isAllowRateAnswers=${qaContent.allowRateAnswers}&isAllowRichEditor=${qaContent.allowRichEditor}&qaContentId=${qaContent.qaContentId}&qaSessionId=" + $("#toolSessionID").val() + "&questionUid=" + $(this).attr('data-question-uid') + "&userId=" + $("#userID").val() + "&reqID=" + (new Date()).getTime(), ajaxProcessing: function (data) { if (data && data.hasOwnProperty('rows')) { Index: lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp =================================================================== diff -u -r5e63656a12c02f7476564e278b43ff4ce86ac930 -re3e91d2a405148a23913ef90471db94b92d8f610 --- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 5e63656a12c02f7476564e278b43ff4ce86ac930) +++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision e3e91d2a405148a23913ef90471db94b92d8f610) @@ -163,7 +163,7 @@ // {sortList:col} adds the sortList to the url into a "col" array, and {filterList:fcol} adds // the filterList to the url into an "fcol" array. // So a sortList = [[2,0],[3,0]] becomes "&col[2]=0&col[3]=0" in the url - ajaxUrl : "?method=getResponses&page={page}&size={size}&{sortList:column}&{filterList:fcol}&isMonitoring=true&isAllowRateAnswers=${qaContent.allowRateAnswers}&qaContentId=${qaContent.qaContentId}&qaSessionId=" + $(this).attr('data-session-id') + "&questionUid=" + $(this).attr('data-question-uid') + "&userId=" + $("#userID").val() + "&reqID=" + (new Date()).getTime(), + ajaxUrl : "?method=getResponses&page={page}&size={size}&{sortList:column}&{filterList:fcol}&isMonitoring=true&isAllowRateAnswers=${qaContent.allowRateAnswers}&isAllowRichEditor=${qaContent.allowRichEditor}&qaContentId=${qaContent.qaContentId}&qaSessionId=" + $(this).attr('data-session-id') + "&questionUid=" + $(this).attr('data-question-uid') + "&userId=" + $("#userID").val() + "&reqID=" + (new Date()).getTime(), ajaxProcessing: function (data) { if (data && data.hasOwnProperty('rows')) { var rows = [],