Commit 9c9507bf authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1836653: Allow revoked LTI submissions not send email to self"

parents d3af6bc0 61d8ca02
......@@ -1201,29 +1201,32 @@ class Collection {
if (!defined('INSTALLER') && $this->submittedgroup) {
$releaseuser = optional_userobj($releaseuser);
$releaseuserdisplay = display_name($releaseuser, $this->owner);
$releaseuserid = ($releaseuser instanceof User) ? $releaseuser->get('id') : $releaseuser->id;
$submitinfo = $this->submitted_to();
require_once('activity.php');
activity_occurred(
'maharamessage',
array(
'users' => array($this->get('owner')),
'strings' => (object) array(
'subject' => (object) array(
'key' => 'collectionreleasedsubject1',
'section' => 'group',
'args' => array($this->name, $submitinfo->name, $releaseuserdisplay),
),
'message' => (object) array(
'key' => 'collectionreleasedmessage1',
'section' => 'group',
'args' => array($this->name, $submitinfo->name, $releaseuserdisplay),
if ((int)$releaseuserid !== (int)$this->get('owner')) {
require_once('activity.php');
activity_occurred(
'maharamessage',
array(
'users' => array($this->get('owner')),
'strings' => (object) array(
'subject' => (object) array(
'key' => 'collectionreleasedsubject1',
'section' => 'group',
'args' => array($this->name, $submitinfo->name, $releaseuserdisplay),
),
'message' => (object) array(
'key' => 'collectionreleasedmessage1',
'section' => 'group',
'args' => array($this->name, $submitinfo->name, $releaseuserdisplay),
),
),
),
'url' => $this->get_url(false),
'urltext' => $this->name,
)
);
'url' => $this->get_url(false),
'urltext' => $this->name,
)
);
}
}
}
......
......@@ -1639,18 +1639,21 @@ class View {
'groupname' => $submitinfo['name'],
'eventfor' => 'view'));
require_once('activity.php');
activity_occurred('maharamessage',
array(
'users' => array($this->get('owner')),
'subject' => get_string_from_language($ownerlang, 'viewreleasedsubject1', 'group', $this->get('title'),
$submitinfo['name'], display_name($releaseuser, $this->get_owner_object())),
'message' => get_string_from_language($ownerlang, 'viewreleasedmessage1', 'group', $this->get('title'),
$submitinfo['name'], display_name($releaseuser, $this->get_owner_object())),
'url' => $url,
'urltext' => $this->get('title'),
)
);
$releaseuserid = ($releaseuser instanceof User) ? $releaseuser->get('id') : $releaseuser->id;
if ((int)$releaseuserid !== (int)$this->get('owner')) {
require_once('activity.php');
activity_occurred('maharamessage',
array(
'users' => array($this->get('owner')),
'subject' => get_string_from_language($ownerlang, 'viewreleasedsubject1', 'group', $this->get('title'),
$submitinfo['name'], display_name($releaseuser, $this->get_owner_object())),
'message' => get_string_from_language($ownerlang, 'viewreleasedmessage1', 'group', $this->get('title'),
$submitinfo['name'], display_name($releaseuser, $this->get_owner_object())),
'url' => $url,
'urltext' => $this->get('title'),
)
);
}
}
public static function _db_pendingrelease(array $viewids) {
......
Markdown is supported
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