From: skodak Date: Thu, 11 Jan 2007 09:41:13 +0000 (+0000) Subject: MDL-8144 Fixed can not force free format selection X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9eb9e038f9af777c7ad8907a14f2b2fdadb00319;p=moodle.git MDL-8144 Fixed can not force free format selection --- diff --git a/lib/form/format.php b/lib/form/format.php index 6d8e315863..7fad587b2d 100644 --- a/lib/form/format.php +++ b/lib/form/format.php @@ -36,15 +36,18 @@ class MoodleQuickForm_format extends MoodleQuickForm_select{ $elementLabel = get_string('format'); } HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes); - $this->_persistantFreeze = true; $this->_type = 'format'; $this->_useHtmlEditor=$useHtmlEditor; - if ($this->_useHtmlEditor==null){ + if ($this->_useHtmlEditor === null){ $this->_useHtmlEditor=can_use_html_editor(); } + + $this->setPersistantFreeze($this->_useHtmlEditor); if ($this->_useHtmlEditor){ $this->freeze(); + } else { + $this->unfreeze(); } } //end constructor