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

Build watchlist activity message strings inside activity instance

parent 3a664bff
......@@ -638,12 +638,13 @@ class ActivityTypeWatchlist extends ActivityType {
}
public function get_message($user) {
return display_name($this->viewinfo, $user) . ' ' . $this->message .
$this->subject . ' ' . $this->viewinfo->title;
return display_name($this->viewinfo, $user) . ' '
. get_string_from_language($user->lang, 'newwatchlistmessageview', 'activity',
$this->viewinfo->title);
}
public function get_required_parameters() {
return array('subject', 'view');
return array('view');
}
}
......
......@@ -560,8 +560,6 @@ class View {
// Tell the watchlist that the view changed
$data = (object)array(
'view' => $this->get('id'),
'subject' => get_string('newwatchlistmessagesubject', 'activity'),
'message' => get_string('newwatchlistmessageview', 'activity', $this->get('title')),
);
activity_occurred('watchlist', $data);
......
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