Index: lams_tool_assessment/web/pages/learning/learning.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_assessment/web/pages/learning/learning.jsp,v
diff -u -r1.37.2.19 -r1.37.2.20
--- lams_tool_assessment/web/pages/learning/learning.jsp 17 Mar 2017 18:03:02 -0000 1.37.2.19
+++ lams_tool_assessment/web/pages/learning/learning.jsp 20 Mar 2017 19:43:20 -0000 1.37.2.20
@@ -196,15 +196,10 @@
if (isWaitingForConfirmation) return;
//copy value from CKEditor (only available in essay type of questions) to textarea before ajax submit
- $("span[id^=cke_question]").each(function() {
- var questionNumber = "" + this.id.substring("cke_question".length);
-
- $("textarea[id=question" + questionNumber + "]").each(function() {
-
- var ckeditorData = CKEDITOR.instances[this.name].getData();
- //skip out empty values
- this.value = ((ckeditorData == null) || (ckeditorData.replace(/ | |
|\s|
|<\/p>|\xa0/g, "").length == 0)) ? "" : ckeditorData;
- });
+ $("textarea[id^='question']:not([id$='__lamstextarea'])").each(function() {
+ var ckeditorData = CKEDITOR.instances[this.name].getData();
+ //skip out empty values
+ this.value = ((ckeditorData == null) || (ckeditorData.replace(/ | |
|\s|
|<\/p>|\xa0/g, "").length == 0)) ? "" : ckeditorData; }); //fire onchange event for lams:textarea