1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-24 01:44:27 +02:00

MDL-19611 fixing regression - video icon disappeared

This commit is contained in:
skodak 2009-06-24 23:15:24 +00:00
parent 5a4ba49ca7
commit 7de5a29a33
5 changed files with 8 additions and 9 deletions

@ -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();

@ -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 {
}
}
?>

@ -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);
}
?>

@ -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);
}
}
?>

@ -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);
?>