From: toyomoyo <toyomoyo> Date: Wed, 14 Mar 2007 01:50:54 +0000 (+0000) Subject: merged fix for MDL-8885, do not show bulk message option if user has no capability X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=82d561ee7964010a3a715cc262f238d4cd632034;p=moodle.git merged fix for MDL-8885, do not show bulk message option if user has no capability --- diff --git a/user/index.php b/user/index.php index 1b107b8f0a..345da07060 100644 --- a/user/index.php +++ b/user/index.php @@ -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'); }