From 1b3b2841c9b18ee2459d312acbef7e19561e35c5 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 5 May 2009 19:25:04 +0200 Subject: [PATCH] [svn r20341] Fixing fill in blank question type + fckeditor see FS#4154 --- main/exercice/fill_blanks.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main/exercice/fill_blanks.class.php b/main/exercice/fill_blanks.class.php index 3e2541c711..75e66df91a 100644 --- a/main/exercice/fill_blanks.class.php +++ b/main/exercice/fill_blanks.class.php @@ -155,11 +155,11 @@ class FillBlanks extends Question // answer - $form -> addElement ('html', '

'.get_lang('TypeTextBelow').', '.get_lang('And').' '.get_lang('UseTagForBlank').'
'); - - //$form->addElement('html_editor', 'answer',null, ''); - + $form -> addElement ('html', '

'.get_lang('TypeTextBelow').', '.get_lang('And').' '.get_lang('UseTagForBlank').'
'); $form -> addElement ('html_editor', 'answer','','id="answer" cols="122" rows="6" onkeyup="updateBlanks(this)"'); + $form -> addElement ('textarea', 'answer',get_lang('Answer'),'id="answer" cols="65" rows="6" onkeyup="updateBlanks(this)"'); + + $form -> addRule ('answer',get_lang('GiveText'),'required'); $form -> addRule ('answer',get_lang('DefineBlanks'),'regex','/\[.*\]/'); @@ -185,6 +185,8 @@ class FillBlanks extends Question function processAnswersCreation($form) { $answer = $form -> getSubmitValue('answer'); + //Due the fckeditor transform the elements to their HTML value + $answer = html_entity_decode($answer); //remove the :: eventually written by the user $answer = str_replace('::','',$answer);