MDL-55770 core_message: remove the send message pop-up

Revert "MDL-48933 core_message: New dialog to send a message to a user"
Revert "MDL-48933 core_message: Behat tests to cover messenger dialogs"
This commit is contained in:
Mark Nelson 2016-09-02 17:36:42 +08:00
parent 5bf0ff278a
commit 658d0b2fd7
16 changed files with 4 additions and 2261 deletions

View file

@ -39,7 +39,7 @@ class block_online_users extends block_base {
}
function get_content() {
global $USER, $CFG, $DB, $OUTPUT, $PAGE;
global $USER, $CFG, $DB, $OUTPUT;
if ($this->content !== NULL) {
return $this->content;
@ -106,7 +106,6 @@ class block_online_users extends block_base {
if (isloggedin() && has_capability('moodle/site:sendmessage', $this->page->context)
&& !empty($CFG->messaging) && !isguestuser()) {
$canshowicon = true;
message_messenger_requirejs();
} else {
$canshowicon = false;
}
@ -126,10 +125,7 @@ class block_online_users extends block_base {
if ($canshowicon and ($USER->id != $user->id) and !isguestuser($user)) { // Only when logged in and messaging active etc
$anchortagcontents = '<img class="iconsmall" src="'.$OUTPUT->pix_url('t/message') . '" alt="'. get_string('messageselectadd') .'" />';
$anchorurl = new moodle_url('/message/index.php', array('id' => $user->id));
$anchortag = html_writer::link($anchorurl, $anchortagcontents, array_merge(
message_messenger_sendmessage_link_params($user),
array('title' => get_string('messageselectadd'))
));
$anchortag = html_writer::link($anchorurl, $anchortagcontents, array('title' => get_string('messageselectadd')));
$this->content->text .= '<div class="message">'.$anchortag.'</div>';
}