Merge branch 'MDL-63915_master' of git://github.com/markn86/moodle
[moodle.git] / lib / outputrenderers.php
index c4e5da5..17f0d7e 100644 (file)
@@ -4098,7 +4098,7 @@ EOD;
                             'title' => get_string('message', 'message'),
                             'url' => new moodle_url('/message/index.php', array('id' => $user->id)),
                             'image' => 'message',
-                            'linkattributes' => array('role' => 'button'),
+                            'linkattributes' => \core_message\helper::messageuser_link_params($user->id),
                             'page' => $this->page
                         ),
                         'togglecontact' => array(
@@ -4183,6 +4183,9 @@ EOD;
                     if ($button['buttontype'] === 'togglecontact') {
                         \core_message\helper::togglecontact_requirejs();
                     }
+                    if ($button['buttontype'] === 'message') {
+                        \core_message\helper::messageuser_requirejs();
+                    }
                     $image = $this->pix_icon($button['formattedimage'], $button['title'], 'moodle', array(
                         'class' => 'iconsmall',
                         'role' => 'presentation'