mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddentimedposts.
This commit is contained in:
parent
f2bcb0815d
commit
a9237b8b45
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ class mod_forum_post_form extends moodleform {
|
||||||
$mform->addElement('checkbox', 'mailnow', get_string('mailnow', 'forum'));
|
$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('header', '', get_string('displayperiod', 'forum'));
|
||||||
|
|
||||||
$mform->addElement('date_selector', 'timestart', get_string('displaystart', 'forum'), array('optional'=>true));
|
$mform->addElement('date_selector', 'timestart', get_string('displaystart', 'forum'), array('optional'=>true));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue