$string['sendingviawhen'] = 'Sending "{$a->provider}" via "{$a->processor}" when {$a->state}';
$string['sendmessage'] = 'Send message';
$string['sendbulkmessage'] = 'Send message to {$a} people';
-$string['sendbulkmessagesent'] = 'Message sent to {$a} people.';
+$string['sendbulkmessagesingle'] = 'Send message to 1 person';
+$string['sendbulkmessagesent'] = 'Message sent to {$a} people';
+$string['sendbulkmessagesentsingle'] = 'Message sent to 1 person';
$string['sendmessageto'] = 'Send message to {$a}';
$string['sendmessagetopopup'] = 'Send message to {$a} - new window';
$string['settings'] = 'Settings';
And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 1')]//input[@type='checkbox']" to "1"
And I choose "Add a new note" from the participants page bulk action menu
And I set the field "bulk-note" to "Student 1 needs to pick up his game"
- And I press "Add a new note to 1 people"
+ And I press "Add a new note to 1 person"
And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 1')]//input[@type='checkbox']" to "0"
And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 2')]//input[@type='checkbox']" to "1"
And I choose "Add a new note" from the participants page bulk action menu
And I set the field "bulk-note" to ""
- And I press "Add a new note to 1 people"
+ And I press "Add a new note to 1 person"
And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 2')]//input[@type='checkbox']" to "0"
And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 3')]//input[@type='checkbox']" to "1"
And I choose "Add a new note" from the participants page bulk action menu
And I set the field "bulk-note" to " "
- And I press "Add a new note to 1 people"
+ And I press "Add a new note to 1 person"
And I follow "Student 1"
And I follow "Notes"
# Student 1 has note from Teacher
}
var context = {stateNames: states, stateHelpIcon: this.stateHelpIcon};
+ var titlePromise = null;
+ if (users.length == 1) {
+ titlePromise = Str.get_string('addbulknotesingle', 'core_notes');
+ } else {
+ titlePromise = Str.get_string('addbulknote', 'core_notes', users.length);
+ }
return $.when(
ModalFactory.create({
type: ModalFactory.types.SAVE_CANCEL,
body: Templates.render('core_user/add_bulk_note', context)
}),
- Str.get_string('addbulknote', 'core_notes', users.length)
+ titlePromise
).then(function(modal, title) {
// Keep a reference to the modal.
this.modal = modal;
methodname: 'core_notes_create_notes',
args: {notes: notes}
}])[0].then(function(noteIds) {
- return Str.get_string('addbulknotedone', 'core_notes', noteIds.length);
+ if (noteIds.length == 1) {
+ return Str.get_string('addbulknotedonesingle', 'core_notes');
+ } else {
+ return Str.get_string('addbulknotedone', 'core_notes', noteIds.length);
+ }
}).then(function(msg) {
Notification.addNotification({
message: msg,
// Nothing to do.
return $.Deferred().resolve().promise();
}
- var bodyPromise = Templates.render('core_user/send_bulk_message', {});
+ var titlePromise = null;
+ if (users.length == 1) {
+ titlePromise = Str.get_string('sendbulkmessagesingle', 'core_message');
+ } else {
+ titlePromise = Str.get_string('sendbulkmessage', 'core_message', users.length);
+ }
return $.when(
ModalFactory.create({
type: ModalFactory.types.SAVE_CANCEL,
- body: bodyPromise
+ body: Templates.render('core_user/send_bulk_message', {})
}),
- Str.get_string('sendbulkmessage', 'core_message', users.length)
+ titlePromise
).then(function(modal, title) {
// Keep a reference to the modal.
this.modal = modal;
methodname: 'core_message_send_instant_messages',
args: {messages: messages}
}])[0].then(function(messageIds) {
- return Str.get_string('sendbulkmessagesent', 'core_message', messageIds.length);
+ if (messageIds.length == 1) {
+ return Str.get_string('sendbulkmessagesentsingle', 'core_message');
+ } else {
+ return Str.get_string('sendbulkmessagesent', 'core_message', messageIds.length);
+ }
}).then(function(msg) {
Notification.addNotification({
message: msg,