[svn r22048] FS#2867 - The exercises tool: Eliminating the global variable $fck_attribute within the file fill_blanks.class.php.

skala
Ivan Tcholakov 17 years ago
parent c4f34cb83d
commit 78d9d0faec
  1. 11
      main/exercice/fill_blanks.class.php
  2. 2
      main/inc/lib/fckeditor/toolbars/question_description.php
  3. 4
      main/inc/lib/formvalidator/Element/html_editor.php

@ -64,13 +64,6 @@ class FillBlanks extends Question
function createAnswersForm ($form)
{
$defaults = array();
global $fck_attribute;
$fck_attribute = array();
//$fck_attribute['Width'] = '348px';
$fck_attribute['Width'] = '100%';
$fck_attribute['Height'] = '350px';
$fck_attribute['ToolbarSet'] = 'Full';
if(!empty($this->id)) {
$objAnswer = new answer($this->id);
@ -156,8 +149,8 @@ class FillBlanks extends Question
// answer
$form -> addElement ('html', '<br /><br /><div class="row"><div class="label"></div><div class="formw">'.get_lang('TypeTextBelow').', '.get_lang('And').' '.get_lang('UseTagForBlank').'</div></div>');
$form -> addElement ('html_editor', 'answer','<img src="../img/fill_field.png">','id="answer" cols="122" rows="6" onkeyup="updateBlanks(this)"');
$form -> addElement ('html_editor', 'answer', '<img src="../img/fill_field.png">','id="answer" cols="122" rows="6" onkeyup="javascript: updateBlanks(this);"', array('ToolbarSet' => 'QuestionDescription', 'Width' => '100%', 'Height' => '350'));
$form -> addRule ('answer',get_lang('GiveText'),'required');
$form -> addRule ('answer',get_lang('DefineBlanks'),'regex','/\[.*\]/');

@ -45,4 +45,4 @@ $config['ToolbarSets']['Maximized'] = array(
// Here new width and height of the editor may be set.
// Possible values, examples: 300 , '250' , '100%' , ...
//$config['Width'] = '100%';
//$config['Height'] = '300';
//$config['Height'] = '150';

@ -1,5 +1,5 @@
<?php
// $Id: html_editor.php 22027 2009-07-13 11:03:41Z ivantcholakov $
// $Id: html_editor.php 22048 2009-07-14 03:34:42Z ivantcholakov $
/*
==============================================================================
Dokeos - elearning and course management software
@ -73,7 +73,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
$this->fck_editor->Height = $config['Height'];
}
if (isset($config['FullPage'])) {
$this->fullPage = $config['FullPage'];
$this->fullPage = is_bool($config['FullPage']) ? $config['FullPage'] : ($config['FullPage'] === 'true');
}
}
}

Loading…
Cancel
Save