]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddent...
authorscyrma <scyrma>
Mon, 19 Nov 2007 04:44:08 +0000 (04:44 +0000)
committerscyrma <scyrma>
Mon, 19 Nov 2007 04:44:08 +0000 (04:44 +0000)
mod/forum/post_form.php

index 1eb3c2b04bf2ba544efcafd6d68bf8eb03712b64..d49417ed396af7f538f94c78bdcb7866583701ee 100644 (file)
@@ -64,7 +64,7 @@ class mod_forum_post_form extends moodleform {
             $mform->addElement('checkbox', 'mailnow', get_string('mailnow', 'forum'));
         }
 
-        if (!empty($CFG->forum_enabletimedposts) && !$post->parent) {
+        if (!empty($CFG->forum_enabletimedposts) && !$post->parent && has_capability('mod/forum:viewhiddentimedposts', $coursecontext)) {
             $mform->addElement('header', '', get_string('displayperiod', 'forum'));
 
             $mform->addElement('date_selector', 'timestart', get_string('displaystart', 'forum'), array('optional'=>true));