From: scyrma Date: Mon, 19 Nov 2007 04:44:08 +0000 (+0000) Subject: MDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddent... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a9237b8b45af10ccd043a5b7c88787ddb9086c81;p=moodle.git MDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddentimedposts. --- diff --git a/mod/forum/post_form.php b/mod/forum/post_form.php index 1eb3c2b04b..d49417ed39 100644 --- a/mod/forum/post_form.php +++ b/mod/forum/post_form.php @@ -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));