Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java,v diff -u -r1.73 -r1.74 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 1 Apr 2016 16:19:06 -0000 1.73 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 8 Apr 2016 13:05:53 -0000 1.74 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/LearnerRep.jsp,v diff -u -r1.66 -r1.67 --- lams_tool_laqa/web/learning/LearnerRep.jsp 3 Nov 2015 23:50:43 -0000 1.66 +++ lams_tool_laqa/web/learning/LearnerRep.jsp 8 Apr 2016 13:05:53 -0000 1.67 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp,v diff -u -r1.45 -r1.46 --- lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp 3 Nov 2015 23:50:43 -0000 1.45 +++ lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp 8 Apr 2016 13:05:53 -0000 1.46 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/mobile/LearnerRep.jsp,v diff -u -r1.23 -r1.24 --- lams_tool_laqa/web/learning/mobile/LearnerRep.jsp 3 Nov 2015 23:50:43 -0000 1.23 +++ lams_tool_laqa/web/learning/mobile/LearnerRep.jsp 8 Apr 2016 13:05:53 -0000 1.24 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/mobile/RevisitedLearnerRep.jsp,v diff -u -r1.24 -r1.25 --- lams_tool_laqa/web/learning/mobile/RevisitedLearnerRep.jsp 3 Nov 2015 23:50:43 -0000 1.24 +++ lams_tool_laqa/web/learning/mobile/RevisitedLearnerRep.jsp 8 Apr 2016 13:05:53 -0000 1.25 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp,v diff -u -r1.50 -r1.51 --- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp 3 Nov 2015 23:50:43 -0000 1.50 +++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp 8 Apr 2016 13:05:53 -0000 1.51 @@ -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 = [],