Index: lams_tool_assessment/web/pages/learning/learning.jsp
===================================================================
diff -u -rc97b41d72e071f6293126bd85f6eba0b756f7836 -ra2ecf9736333d4a1fb8d1efc320b31ed0ff140f0
--- lams_tool_assessment/web/pages/learning/learning.jsp (.../learning.jsp) (revision c97b41d72e071f6293126bd85f6eba0b756f7836)
+++ lams_tool_assessment/web/pages/learning/learning.jsp (.../learning.jsp) (revision a2ecf9736333d4a1fb8d1efc320b31ed0ff140f0)
@@ -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