From 81f41b0e60e3bff006cbae6e75b353bab5163117 Mon Sep 17 00:00:00 2001 From: Stephan Kergomard Date: Thu, 7 Jul 2022 13:41:51 +0200 Subject: [PATCH] Fix for https://mantis.ilias.de/view.php?id=32439 --- .../templates/default/tpl.il_as_tst_output.html | 17 +++++++++++------ .../RTE/templates/default/tpl.usereditor.js | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Modules/Test/templates/default/tpl.il_as_tst_output.html b/Modules/Test/templates/default/tpl.il_as_tst_output.html index ac866f9b7beb..673d0e65024c 100755 --- a/Modules/Test/templates/default/tpl.il_as_tst_output.html +++ b/Modules/Test/templates/default/tpl.il_as_tst_output.html @@ -100,12 +100,17 @@

{QUESTION_OUTPUT}

// fau: testNav - moved saving on time reached to ilTestPlayerQuestionEditControl.js . - function saveTextarea(editor) - { - document.forms["taForm"].submit(); - } - - + function saveTextarea(editor) + { + let form = document.forms['taForm']; + let input = document.createElement('input'); + input.type = 'hidden'; + input.name = 'cmd[submitSolution]'; + input.value = 'save'; + + form.appendChild(input); + form.submit(); + } (function($){ $(document).ready( function() { diff --git a/Services/RTE/templates/default/tpl.usereditor.js b/Services/RTE/templates/default/tpl.usereditor.js index ceec8310fede..3b89e12bb7c0 100755 --- a/Services/RTE/templates/default/tpl.usereditor.js +++ b/Services/RTE/templates/default/tpl.usereditor.js @@ -23,6 +23,7 @@ tinymce.init({ content_style: 'html { overflow: initial; }', plugin_insertdate_dateFormat: "%d.%m.%Y", plugin_insertdate_timeFormat: "%H:%M:%S", + save_enablewhendirty: false, save_onsavecallback: "saveTextarea", resize: 'true', font_formats: "Arial=sans-serif;Courier=monospace;Times Roman=serif",