]> git.mjollnir.org Git - moodle.git/commitdiff
FIx fileareas being sent to mform for forum post
authormoodler <moodler>
Fri, 29 Aug 2008 06:57:10 +0000 (06:57 +0000)
committermoodler <moodler>
Fri, 29 Aug 2008 06:57:10 +0000 (06:57 +0000)
mod/forum/post_form.php

index 60d16672726a5f12354b6517f3f487595f173917..8b1e8e707abda52f7ebc85f7bb8b5c05233950ed 100644 (file)
@@ -23,7 +23,7 @@ class mod_forum_post_form extends moodleform {
         $mform->addRule('subject', get_string('required'), 'required', null, 'client');
         $mform->addRule('subject', get_string('maximumchars', '', 255), 'maxlength', 255, 'client'); 
 
-        $mform->addElement('htmleditor', 'message', get_string('message', 'forum'), array('cols'=>50, 'rows'=>30));
+        $mform->addElement('htmleditor', 'message', get_string('message', 'forum'), array('cols'=>50, 'rows'=>30, 'filearea'=>'forumpost'));
         $mform->setType('message', PARAM_RAW);
         $mform->addRule('message', get_string('required'), 'required', null, 'client');
         $mform->setHelpButton('message', array('reading', 'writing', 'questions', 'richtext'), false, 'editorhelpbutton');
@@ -53,7 +53,7 @@ class mod_forum_post_form extends moodleform {
         }
 
         if ($forum->maxbytes != 1 && has_capability('mod/forum:createattachment', $modcontext))  {  //  1 = No attachments at all
-            $mform->addElement('filepicker', 'attachment', get_string('attachment', 'forum'), 'forum_submission');
+            $mform->addElement('filepicker', 'attachment', get_string('attachment', 'forum'), 'forumpost');
             $mform->setHelpButton('attachment', array('attachment', get_string('attachment', 'forum'), 'forum'));
         }