Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== diff -u -re3a218766d0bf55858ca4799f42318767389ec7f -rfc9ea4d27882b0a15cfae1d3fc5983ecb0f71020 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision e3a218766d0bf55858ca4799f42318767389ec7f) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision fc9ea4d27882b0a15cfae1d3fc5983ecb0f71020) @@ -1020,6 +1020,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"); @@ -1080,9 +1081,15 @@ //JSONArray cell=new JSONArray(); //cell.put(StringEscapeUtils.escapeHtml(user.getFirstName()) + " " + StringEscapeUtils.escapeHtml(user.getLastName()) + " [" + StringEscapeUtils.escapeHtml(user.getLogin()) + "]"); + //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 -r596674554dfa059875f580b481de92dfce9e1828 -rfc9ea4d27882b0a15cfae1d3fc5983ecb0f71020 --- lams_tool_laqa/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision 596674554dfa059875f580b481de92dfce9e1828) +++ lams_tool_laqa/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision fc9ea4d27882b0a15cfae1d3fc5983ecb0f71020) @@ -75,7 +75,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 -r596674554dfa059875f580b481de92dfce9e1828 -rfc9ea4d27882b0a15cfae1d3fc5983ecb0f71020 --- lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp (.../RevisitedLearnerRep.jsp) (revision 596674554dfa059875f580b481de92dfce9e1828) +++ lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp (.../RevisitedLearnerRep.jsp) (revision fc9ea4d27882b0a15cfae1d3fc5983ecb0f71020) @@ -77,7 +77,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/LearnerRep.jsp =================================================================== diff -u -r596674554dfa059875f580b481de92dfce9e1828 -rfc9ea4d27882b0a15cfae1d3fc5983ecb0f71020 --- lams_tool_laqa/web/learning/mobile/LearnerRep.jsp (.../LearnerRep.jsp) (revision 596674554dfa059875f580b481de92dfce9e1828) +++ lams_tool_laqa/web/learning/mobile/LearnerRep.jsp (.../LearnerRep.jsp) (revision fc9ea4d27882b0a15cfae1d3fc5983ecb0f71020) @@ -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 -r596674554dfa059875f580b481de92dfce9e1828 -rfc9ea4d27882b0a15cfae1d3fc5983ecb0f71020 --- lams_tool_laqa/web/learning/mobile/RevisitedLearnerRep.jsp (.../RevisitedLearnerRep.jsp) (revision 596674554dfa059875f580b481de92dfce9e1828) +++ lams_tool_laqa/web/learning/mobile/RevisitedLearnerRep.jsp (.../RevisitedLearnerRep.jsp) (revision fc9ea4d27882b0a15cfae1d3fc5983ecb0f71020) @@ -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 -r596674554dfa059875f580b481de92dfce9e1828 -rfc9ea4d27882b0a15cfae1d3fc5983ecb0f71020 --- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 596674554dfa059875f580b481de92dfce9e1828) +++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision fc9ea4d27882b0a15cfae1d3fc5983ecb0f71020) @@ -171,7 +171,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 = [],