From 126b0b3db8abc86ed3cf8aaebceea53b705eca31 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 27 Apr 2009 22:52:51 +0200 Subject: [PATCH] [svn r20136] Exercise tool: More UI improvements see FS#3991 --- main/exercice/exercise.class.php | 4 ++-- main/exercice/exercise_admin.php | 4 ++-- main/exercice/question.class.php | 37 +++++++++++++++++++++++++++----- 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php index 0391e31de5..c75ef62771 100644 --- a/main/exercice/exercise.class.php +++ b/main/exercice/exercise.class.php @@ -25,7 +25,7 @@ * Exercise class: This class allows to instantiate an object of type Exercise * @package dokeos.exercise * @author Olivier Brouckaert -* @version $Id: exercise.class.php 20125 2009-04-27 16:20:02Z juliomontoya $ +* @version $Id: exercise.class.php 20136 2009-04-27 20:52:51Z juliomontoya $ */ @@ -870,7 +870,7 @@ class Exercise $form -> addElement('html','
'); diff --git a/main/exercice/exercise_admin.php b/main/exercice/exercise_admin.php index 8c6683a9ff..4f8be1de06 100644 --- a/main/exercice/exercise_admin.php +++ b/main/exercice/exercise_admin.php @@ -60,10 +60,10 @@ $htmlHeadXtra[] = ''; + + $renderer = $form->defaultRenderer(); $form->addElement('html','
'); // question name @@ -992,6 +1007,8 @@ abstract class Question // question type $answerType= intval($_REQUEST['answerType']); $form->addElement('hidden','answerType',$_REQUEST['answerType']); + + // html editor global $fck_attribute; $fck_attribute = array(); @@ -1001,12 +1018,22 @@ abstract class Question if(is_array($fck_config)){ $fck_attribute = array_merge($fck_attribute,$fck_config); - } - + } if(!api_is_allowed_to_edit()) $fck_attribute['Config']['UserStatus'] = 'student'; - $form->add_html_editor('questionDescription', get_lang('QuestionDescription'), false); + $form -> addElement('html',''); + + $form -> addElement ('html',''); + $renderer->setElementTemplate('
{label}
{element}
','questionDescription'); // hidden values