mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
fix for MDL-8885, do not show bulk message option if user has no capability
This commit is contained in:
parent
116244fbae
commit
c6d9f6a175
1 changed files with 5 additions and 1 deletions
|
@ -589,7 +589,11 @@
|
|||
echo '<br /><div class="buttons">';
|
||||
echo '<input type="button" onclick="checkall()" value="'.get_string('selectall').'" /> ';
|
||||
echo '<input type="button" onclick="checknone()" value="'.get_string('deselectall').'" /> ';
|
||||
$displaylist['messageselect.php'] = get_string('messageselectadd');
|
||||
$displaylist = array();
|
||||
// fix for MDL-8885, only show this if user has capability
|
||||
if (has_capability('moodle/site:readallmessages', $context)) {
|
||||
$displaylist['messageselect.php'] = get_string('messageselectadd');
|
||||
}
|
||||
if ($course->enrolperiod) {
|
||||
$displaylist['extendenrol.php'] = get_string('extendenrol');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue