Commit c5cfb3ca authored by Mark Nelson's avatar Mark Nelson
Browse files

MDL-45357 events: changed event descriptions to ensure consistency in core

parent 04011431
......@@ -70,8 +70,8 @@ class blog_association_created extends base {
* @return string
*/
public function get_description() {
return "The blog entry with the id '{$this->other['blogid']}' was associated with the context '{$this->other['associatetype']}' with " .
"the id '{$this->other['associateid']}' by the user with the id '$this->userid'.";
return "The user with the id '$this->userid' associated the context '{$this->other['associatetype']}' with the id " .
"'{$this->other['associateid']}' to the blog entry with the id '{$this->other['blogid']}'.";
}
/**
......
......@@ -50,6 +50,6 @@ class blog_comment_created extends comment_created {
* @return string
*/
public function get_description() {
return "The user with the id '$this->userid' added a comment to the blog with the id '{$this->other['itemid']}'.";
return "The user with the id '$this->userid' added the comment to the blog with the id '{$this->other['itemid']}'.";
}
}
......@@ -50,6 +50,6 @@ class blog_comment_deleted extends comment_deleted {
* @return string
*/
public function get_description() {
return "The user with the id '$this->userid' deleted comment for the blog with the id '{$this->other['itemid']}'.";
return "The user with the id '$this->userid' deleted the comment for the blog with the id '{$this->other['itemid']}'.";
}
}
......@@ -67,7 +67,7 @@ class blog_entries_viewed extends base {
* @return string
*/
public function get_description() {
return 'Blog entries viewed';
return "The user with the id '$this->userid' viewed blog entries.";
}
/**
......
......@@ -88,7 +88,7 @@ class blog_entry_created extends base {
* @return string
*/
public function get_description() {
return "The blog entry with the id '$this->objectid' was created by the user with the id '$this->userid'.";
return "The user with the id '$this->userid' created the blog entry with the id '$this->objectid'.";
}
/**
......
......@@ -87,7 +87,7 @@ class blog_entry_deleted extends base {
* @return string
*/
public function get_description() {
return "The blog entry with the id '$this->objectid' was deleted by user with the id '$this->userid'.";
return "The user with the id '$this->userid' deleted the blog entry with the id '$this->objectid'.";
}
/**
......
......@@ -86,7 +86,7 @@ class blog_entry_updated extends base {
* @return string
*/
public function get_description() {
return "The blog entry with the id '$this->objectid' was updated by the user with the id '$this->userid'.";
return "The user with the id '$this->userid' updated the blog entry with the id '$this->objectid'.";
}
/**
......
......@@ -70,7 +70,8 @@ class calendar_event_created extends base {
* @return string
*/
public function get_description() {
return "The event '" . s($this->other['name']) . "' was created by user with the id '$this->userid'.";
$eventname = s($this->other['name']);
return "The user with the id '$this->userid' created the event '$eventname' with the id '$this->objectid'.";
}
/**
......
......@@ -70,7 +70,8 @@ class calendar_event_deleted extends base {
* @return string
*/
public function get_description() {
return "The event '" . s($this->other['name']) . "' was deleted by the user with the id '{$this->userid}'.";
$eventname = s($this->other['name']);
return "The user with the id '$this->userid' deleted the event '$eventname' with the id '$this->objectid'.";
}
/**
......
......@@ -70,7 +70,8 @@ class calendar_event_updated extends base {
* @return string
*/
public function get_description() {
return "The event '" . s($this->other['name']) . "' was updated by the user with the id '{$this->userid}'.";
$eventname = s($this->other['name']);
return "The user with the id '$this->userid' updated the event '$eventname' with the id '$this->objectid'.";
}
/**
......
......@@ -61,7 +61,7 @@ class cohort_created extends base {
* @return string
*/
public function get_description() {
return "The cohort with the id '$this->objectid' was created by the user with the id '$this->userid'.";
return "The user with the id '$this->userid' created the cohort with the id '$this->objectid'.";
}
/**
......
......@@ -61,7 +61,7 @@ class cohort_deleted extends base {
* @return string
*/
public function get_description() {
return "The cohort with the id '$this->objectid' was deleted by the user with the id '$this->userid'.";
return "The user with the id '$this->userid' deleted the cohort with the id '$this->objectid'.";
}
/**
......
......@@ -61,8 +61,8 @@ class cohort_member_added extends base {
* @return string
*/
public function get_description() {
return "The user with the id '$this->relateduserid' was added to the cohort with the id '$this->objectid' by the " .
"user with the id '$this->userid'.";
return "The user with the id '$this->userid' added the user with the id '$this->relateduserid' to the cohort with " .
"the id '$this->objectid'.";
}
/**
......
......@@ -62,8 +62,8 @@ class cohort_member_removed extends base {
* @return string
*/
public function get_description() {
return "The user with the id '$this->relateduserid' was removed from the cohort with the id '$this->objectid' by the " .
"user with the id '$this->userid'.";
return "The user with the id '$this->userid' removed the user with the id '$this->relateduserid' from the cohort with " .
"the id '$this->objectid'.";
}
/**
......
......@@ -61,7 +61,7 @@ class cohort_updated extends base {
* @return string
*/
public function get_description() {
return "The cohort with the id '$this->objectid' was updated by the user with the id '$this->userid'.";
return "The user with the id '$this->userid' updated the cohort with the id '$this->objectid'.";
}
/**
......
......@@ -70,7 +70,7 @@ abstract class comment_created extends base {
* @return string
*/
public function get_description() {
return "The user with the id '$this->userid' added the comment with the id '$this->objectid' for '$this->component' " .
return "The user with the id '$this->userid' added the comment with the id '$this->objectid' to the '$this->component' " .
"with the course module id '$this->contextinstanceid'.";
}
......
......@@ -70,8 +70,8 @@ abstract class comment_deleted extends base {
* @return string
*/
public function get_description() {
return "The user with the id '$this->userid' deleted the comment with the id '$this->objectid' for '$this->component' " .
"with instance id '$this->contextinstanceid'.";
return "The user with the id '$this->userid' deleted the comment with the id '$this->objectid' from the '$this->component' " .
"with the course module id '$this->contextinstanceid'.";
}
/**
......
......@@ -69,7 +69,7 @@ class course_category_created extends base {
* @return string
*/
public function get_description() {
return "The course category with the id '$this->objectid' was created by the user with the id '$this->userid'.";
return "The user with the id '$this->userid' created the course category with the id '$this->objectid'.";
}
/**
......
......@@ -71,7 +71,7 @@ class course_category_deleted extends base {
* @return string
*/
public function get_description() {
return "The category with the id '$this->objectid' was deleted by the user with the id '$this->userid'.";
return "The user with the id '$this->userid' deleted the course category with the id '$this->objectid'.";
}
/**
......
......@@ -72,7 +72,7 @@ class course_category_updated extends base {
* @return string
*/
public function get_description() {
return "The course category with the id '$this->objectid' was updated by the user with the id '$this->userid'.";
return "The user with the id '$this->userid' updated the course category with the id '$this->objectid'.";
}
/**
......
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