From 9eb9e038f9af777c7ad8907a14f2b2fdadb00319 Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 11 Jan 2007 09:41:13 +0000 Subject: [PATCH] MDL-8144 Fixed can not force free format selection --- lib/form/format.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.39.5