Commit f8c8467a authored by Evan Goldenberg's avatar Evan Goldenberg Committed by Richard Mansfield
Browse files

better subjects for view released and new friend notifications

Signed-off-by: default avatarEvan Goldenberg <>
parent 3a02c2f3
......@@ -100,8 +100,8 @@ $string['remove'] = 'Remove';
$string['updatemembership'] = 'Update membership';
$string['memberchangefailed'] = 'Failed to update some membership information';
$string['memberchangesuccess'] = 'Membership status changed successfully';
$string['viewreleasedsubject'] = 'Your view has been released';
$string['viewreleasedmessage'] = 'The view that you submitted to %s has been released back to you by %s';
$string['viewreleasedsubject'] = 'Your view "%s" has been released from %s by %s';
$string['viewreleasedmessage'] = 'Your view "%s" has been released from %s by %s';
$string['viewreleasedsuccess'] = 'View was released successfully';
$string['groupmembershipchangesubject'] = 'Group membership: %s';
$string['groupmembershipchangedmessagetutor'] = 'You have been promoted to a tutor in this group';
......@@ -186,7 +186,7 @@ $string['friendformrejectsuccess'] = 'Rejected friend request';
$string['addtofriendslist'] = 'Add to friends';
$string['requestfriendship'] = 'Request friendship';
$string['addedtofriendslistsubject'] = 'New friend';
$string['addedtofriendslistsubject'] = '%s has added you as a friend';
$string['addedtofriendslistmessage'] = '%s added you as a friend! This means that %s is also on your friend list now too. '
. ' Click on the link below to see their profile page';
......@@ -1544,7 +1544,7 @@ function addfriend_submit(Pieform $form, $values) {
$f->usr1 = $values['id'];
$f->usr2 = $loggedinid;
insert_record('usr_friend', $f);
$n->subject = get_string_from_language($lang, 'addedtofriendslistsubject', 'group');
$n->subject = get_string_from_language($lang, 'addedtofriendslistsubject', 'group', $displayname);
$n->message = get_string_from_language($lang, 'addedtofriendslistmessage', 'group', $displayname, $displayname);
......@@ -750,12 +750,18 @@ class View {
$this->set('submittedtime', null);
$ownerlang = get_user_language($this->get('owner'));
$url = get_config('wwwroot') . 'view/view.php?id=' . $this->get('id');
array('users' => array($this->get('owner')),
'subject' => get_string_from_language($ownerlang, 'viewreleasedsubject', 'group'),
'message' => get_string_from_language($ownerlang, 'viewreleasedmessage', 'group', $submitinfo['name'],
display_name($releaseuser, $this->get_owner_object()))));
'users' => array($this->get('owner')),
'subject' => get_string_from_language($ownerlang, 'viewreleasedsubject', 'group', $this->get('title'),
$submitinfo['name'], display_name($releaseuser, $this->get_owner_object())),
'message' => get_string_from_language($ownerlang, 'viewreleasedmessage', 'group', $this->get('title'),
$submitinfo['name'], display_name($releaseuser, $this->get_owner_object())),
'url' => $url,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment