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.53.2.15 -r1.53.2.16
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 1 Apr 2016 16:23:08 -0000 1.53.2.15
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 8 Apr 2016 13:36:24 -0000 1.53.2.16
@@ -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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/LearnerRep.jsp,v
diff -u -r1.53.2.14 -r1.53.2.15
--- lams_tool_laqa/web/learning/LearnerRep.jsp 11 Mar 2016 23:22:34 -0000 1.53.2.14
+++ lams_tool_laqa/web/learning/LearnerRep.jsp 8 Apr 2016 13:36:24 -0000 1.53.2.15
@@ -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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp,v
diff -u -r1.32.2.14 -r1.32.2.15
--- lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp 11 Mar 2016 23:22:34 -0000 1.32.2.14
+++ lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp 8 Apr 2016 13:36:24 -0000 1.32.2.15
@@ -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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/mobile/LearnerRep.jsp,v
diff -u -r1.10.2.10 -r1.10.2.11
--- lams_tool_laqa/web/learning/mobile/LearnerRep.jsp 26 Feb 2016 07:17:47 -0000 1.10.2.10
+++ lams_tool_laqa/web/learning/mobile/LearnerRep.jsp 8 Apr 2016 13:36:24 -0000 1.10.2.11
@@ -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.11.2.10 -r1.11.2.11
--- lams_tool_laqa/web/learning/mobile/RevisitedLearnerRep.jsp 26 Feb 2016 07:17:47 -0000 1.11.2.10
+++ lams_tool_laqa/web/learning/mobile/RevisitedLearnerRep.jsp 8 Apr 2016 13:36:24 -0000 1.11.2.11
@@ -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.39.2.12 -r1.39.2.13
--- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp 24 Feb 2016 12:35:26 -0000 1.39.2.12
+++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp 8 Apr 2016 13:36:24 -0000 1.39.2.13
@@ -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 = [],