mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 05:28:30 +01:00
MDL-83352 message: Update usercantbemessaged string
This commit is contained in:
parent
54e9ee4a9e
commit
b08fbf57fd
@ -263,7 +263,7 @@ $string['unreadnotifications'] = 'There are {$a} unread notifications';
|
||||
$string['unreadnewgroupconversationmessage'] = 'New message from {$a->name} in {$a->conversationname}';
|
||||
$string['unreadnewmessage'] = 'New message from {$a}';
|
||||
$string['useentertosend'] = 'Use enter to send';
|
||||
$string['usercantbemessaged'] = 'You can\'t message {$a} due to their message preferences. Try adding them as a contact.';
|
||||
$string['usercantbemessaged'] = 'You can\'t message this user due to their message preferences. Try adding them as a contact.';
|
||||
$string['userwouldliketocontactyou'] = '{$a} would like to contact you';
|
||||
$string['viewfullnotification'] = 'View full notification';
|
||||
$string['viewmessageswith'] = 'View messages with {$a}';
|
||||
|
@ -212,7 +212,7 @@ class core_message_external extends external_api {
|
||||
// Check if the recipient can be messaged by the sender.
|
||||
if ($success && !\core_message\api::can_send_message($tousers[$message['touserid']]->id, $USER->id)) {
|
||||
$success = false;
|
||||
$errormessage = get_string('usercantbemessaged', 'message', fullname(\core_user::get_user($message['touserid'])));
|
||||
$errormessage = get_string('usercantbemessaged', 'message');
|
||||
}
|
||||
|
||||
// Now we can send the message (at least try).
|
||||
|
@ -128,7 +128,7 @@ class externallib_test extends externallib_advanced_testcase {
|
||||
$sentmessages = core_message_external::send_instant_messages($messages);
|
||||
$sentmessages = external_api::clean_returnvalue(core_message_external::send_instant_messages_returns(), $sentmessages);
|
||||
$this->assertEquals(
|
||||
get_string('usercantbemessaged', 'message', fullname(\core_user::get_user($message1['touserid']))),
|
||||
get_string('usercantbemessaged', 'message'),
|
||||
array_pop($sentmessages)['errormessage']
|
||||
);
|
||||
|
||||
@ -224,7 +224,7 @@ class externallib_test extends externallib_advanced_testcase {
|
||||
|
||||
$sentmessage = reset($sentmessages);
|
||||
|
||||
$this->assertEquals(get_string('usercantbemessaged', 'message', fullname($user2)), $sentmessage['errormessage']);
|
||||
$this->assertEquals(get_string('usercantbemessaged', 'message'), $sentmessage['errormessage']);
|
||||
|
||||
$this->assertEquals(0, $DB->count_records('messages'));
|
||||
}
|
||||
@ -260,7 +260,7 @@ class externallib_test extends externallib_advanced_testcase {
|
||||
|
||||
$sentmessage = reset($sentmessages);
|
||||
|
||||
$this->assertEquals(get_string('usercantbemessaged', 'message', fullname($user2)), $sentmessage['errormessage']);
|
||||
$this->assertEquals(get_string('usercantbemessaged', 'message'), $sentmessage['errormessage']);
|
||||
|
||||
$this->assertEquals(0, $DB->count_records('messages'));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user