Index: lams_tool_assessment/web/pages/learning/learning.jsp =================================================================== diff -u -r292df3a6fb3cce2b31c9d9ee33c61bbe931e58ab -r59d41e00dc903011eb31f69c3b85b0b4f958c593 --- lams_tool_assessment/web/pages/learning/learning.jsp (.../learning.jsp) (revision 292df3a6fb3cce2b31c9d9ee33c61bbe931e58ab) +++ lams_tool_assessment/web/pages/learning/learning.jsp (.../learning.jsp) (revision 59d41e00dc903011eb31f69c3b85b0b4f958c593) @@ -263,14 +263,18 @@ function learnerAutosave(){ - // if (isWaitingForConfirmation) return; - + //copy value from CKEditor (only available in essay type of questions) to textarea before ajax submit $("textarea[id^='question']").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; + this.value = ((ckeditorData == null) || (ckeditorData.replace(/ | |
|\s|

|<\/p>|\xa0/g, "").length == 0)) ? "" : ckeditorData; }); + + // copy value from lams:textarea (only available in essay and mark hedging type of questions) to hidden input before ajax submit + $("textarea[id^='essay-question'], textarea[id^='justification-question']").each(function() { + filterData(this, document.getElementById(this.name.split('_')[0] + '__lamshidden')); + }); //ajax form submit $('#answers').ajaxSubmit({ @@ -316,6 +320,12 @@ } } disableButtons(); + + // copy value from lams:textarea (only available in essay and mark hedging type of questions) to hidden input before submit + $("textarea[id^='essay-question'], textarea[id^='justification-question']").each(function() { + filterData(this, document.getElementById(this.name.split('_')[0] + '__lamshidden')); + }); + var myForm = $("#answers"); myForm.attr("action", "&isTimelimitExpired=" + isTimelimitExpired); myForm.submit();