Commit e1b86943 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Use correct activity name in otification email subject

parent 5ab57f92
......@@ -88,6 +88,7 @@ function handle_activity($activitytype, $data, $cron=false) {
$data = $activity->to_stdclass();
safe_require('notification', 'internal', 'lib.php', 'require_once');
$data->type = $activity->get_id();
$data->activityname = $activitytype->name;
foreach ($activity->get_users() as $user) {
$userdata = $data;
// some stuff gets overridden by user specific stuff
......
......@@ -33,7 +33,7 @@ class PluginNotificationEmail extends PluginNotification {
public static function notify_user($user, $data) {
$sitename = get_config('sitename');
$fulltype = get_string('type' . $data->type, 'activity');
$fulltype = get_string('type' . $data->activityname, 'activity');
$subject = get_string('emailsubject', 'notification.email', $sitename, $fulltype);
if (!empty($data->subject)) {
$subject .= ': ' . $data->subject;
......
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