mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
Merge branch 'MDL-51307-master' of git://github.com/cameron1729/moodle
This commit is contained in:
commit
07cc2db61b
@ -3946,7 +3946,7 @@ EOD;
|
||||
* @return string HTML for the header bar.
|
||||
*/
|
||||
public function context_header($headerinfo = null, $headinglevel = 1) {
|
||||
global $DB, $USER;
|
||||
global $DB, $USER, $CFG;
|
||||
$context = $this->page->context;
|
||||
// Make sure to use the heading if it has been set.
|
||||
if (isset($headerinfo['heading'])) {
|
||||
@ -3976,7 +3976,7 @@ EOD;
|
||||
|
||||
$imagedata = $this->user_picture($user, array('size' => 100));
|
||||
// Check to see if we should be displaying a message button.
|
||||
if ($USER->id != $user->id && has_capability('moodle/site:sendmessage', $context)) {
|
||||
if (!empty($CFG->messaging) && $USER->id != $user->id && has_capability('moodle/site:sendmessage', $context)) {
|
||||
$userbuttons = array(
|
||||
'messages' => array(
|
||||
'buttontype' => 'message',
|
||||
|
Loading…
x
Reference in New Issue
Block a user