]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for MDL-8885, do not show bulk message option if user has no capability
authortoyomoyo <toyomoyo>
Wed, 14 Mar 2007 01:50:54 +0000 (01:50 +0000)
committertoyomoyo <toyomoyo>
Wed, 14 Mar 2007 01:50:54 +0000 (01:50 +0000)
user/index.php

index 1b107b8f0ac77e03fca045e7543e0a80341fbf03..345da07060000035dd7c3ae06b7777920fbc59be 100644 (file)
         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');
         }