From a9237b8b45af10ccd043a5b7c88787ddb9086c81 Mon Sep 17 00:00:00 2001 From: scyrma Date: Mon, 19 Nov 2007 04:44:08 +0000 Subject: [PATCH] MDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddentimedposts. --- mod/forum/post_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.39.5