]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19611 fixing regression - video icon disappeared
authorskodak <skodak>
Wed, 24 Jun 2009 23:15:24 +0000 (23:15 +0000)
committerskodak <skodak>
Wed, 24 Jun 2009 23:15:24 +0000 (23:15 +0000)
lib/form/editor.php
mod/forum/post_form.php
mod/glossary/comment.php
mod/glossary/comment_form.php
mod/glossary/edit.php

index 7de814cc394021e8dbaec0ef7be27ad63a679fd6..d891c5474086d99d86db1c6fc5b0f4a0a0551f9b 100644 (file)
@@ -10,7 +10,7 @@ require_once('HTML/QuickForm/element.php');
 class MoodleQuickForm_editor extends HTML_QuickForm_element {
     protected $_helpbutton = '';
     protected $_options    = array('subdirs'=>0, 'maxbytes'=>0, 'maxfiles'=>0, 'changeformat'=>0,
-                                   'context'=>null, 'noclean'=>0, 'trusted'=>0);
+                                   'context'=>null, 'noclean'=>0, 'trusttext'=>0);
     protected $_values     = array('text'=>null, 'format'=>null, 'itemid'=>null);
 
     function MoodleQuickForm_editor($elementName=null, $elementLabel=null, $attributes=null, $options=null) {
@@ -29,6 +29,7 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element {
         if (!$this->_options['context']) {
             $this->_options['context'] = get_context_instance(CONTEXT_SYSTEM);
         }
+        $this->_options['trusted'] = trusttext_trusted($this->_options['context']);
         parent::HTML_QuickForm_element($elementName, $elementLabel, $attributes);
 
         repository_head_setup();
index a3c43fddbfcc5439a9fff3815299154669a30e4f..227b82050155425f0b210e684f706959827d9150 100644 (file)
@@ -16,7 +16,7 @@ class mod_forum_post_form extends moodleform {
         $forum         = $this->_customdata['forum'];
         $post          = $this->_customdata['post'];
         // TODO: add max files and max size support
-        $editoroptions = array('maxfiles' => EDITOR_UNLIMITED_FILES, 'trusted'=>trusttext_trusted($modcontext), 'context'=>$modcontext);
+        $editoroptions = array('maxfiles' => EDITOR_UNLIMITED_FILES, 'trusttext'=>true, 'context'=>$modcontext);
 
         $mform->addElement('header', 'general', '');//fill in the data depending on page params
                                                     //later using set_data
@@ -138,4 +138,4 @@ class mod_forum_post_form extends moodleform {
     }
 
 }
-?>
+
index befe17f585e416b0ad08e4901ee63606303eb12e..66a1c1237eb2c4c35fb5ae96b2b9bc1412cffedb 100644 (file)
@@ -52,7 +52,7 @@ function glossary_comment_add() {
         print_error('nopermissiontocomment');
     }
 
-    $commentoptions = array('trusttext'=>true, 'maxfiles'=>0);
+    $commentoptions = array('trusttext'=>true, 'maxfiles'=>0, 'context'=>$context);
 
     $comment = new object();
     $comment->id      = null;
@@ -233,4 +233,4 @@ function glossary_comment_print_header($course, $cm, $glossary, $entry, $action)
 /// print original glossary entry for any comment action (add, update, delete)
     glossary_print_entry($course, $cm, $glossary, $entry, 'approval', '', false);
 }
-?>
+
index 30c52f2e9e1f1cb36e852ff20ef447347c2af31e..5498da5817e9c82bdc4835e8356f1d44e1cc6452 100644 (file)
@@ -8,7 +8,7 @@ class mod_glossary_comment_form extends moodleform {
 
         $current        = $this->_customdata['current'];
         $commentoptions = $this->_customdata['commentoptions'];
-        
+
         // visible elements
         $mform->addElement('editor', 'entrycomment_editor', get_string('comment', 'glossary'), null, $commentoptions);
         $mform->addRule('entrycomment_editor', get_string('required'), 'required', null, 'client');
@@ -32,4 +32,3 @@ class mod_glossary_comment_form extends moodleform {
         $this->set_data($current);
     }
 }
-?>
\ No newline at end of file
index 22b4c80c720ec07e9a30ebe65f8f24d1e61f2143..3e1406afecf0d5e2de6f3633e53e8e252b186455 100644 (file)
@@ -59,7 +59,7 @@ if ($id) { // if entry is specified
 $maxfiles = 99;                // TODO: add some setting
 $maxbytes = $course->maxbytes; // TODO: add some setting
 
-$definitionoptions = array('trusttext'=>true, 'subdirs'=>false, 'maxfiles'=>$maxfiles, 'maxbytes'=>$maxbytes);
+$definitionoptions = array('trusttext'=>true, 'subdirs'=>false, 'maxfiles'=>$maxfiles, 'maxbytes'=>$maxbytes, 'trusttext'=>true, 'context'=>$context);
 $attachmentoptions = array('subdirs'=>false, 'maxfiles'=>$maxfiles, 'maxbytes'=>$maxbytes);
 
 $entry = file_prepare_standard_editor($entry, 'definition', $definitionoptions, $context, 'glossary_entry', $entry->id);
@@ -175,4 +175,3 @@ $mform->display();
 
 print_footer($course);
 
-?>