diff --git a/lib/classes/event/blog_association_created.php b/lib/classes/event/blog_association_created.php index cf65eaa526e..9abb4e00f7c 100644 --- a/lib/classes/event/blog_association_created.php +++ b/lib/classes/event/blog_association_created.php @@ -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']}'."; } /** diff --git a/lib/classes/event/blog_comment_created.php b/lib/classes/event/blog_comment_created.php index b15e118ba6b..ee92138a3c3 100644 --- a/lib/classes/event/blog_comment_created.php +++ b/lib/classes/event/blog_comment_created.php @@ -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']}'."; } } diff --git a/lib/classes/event/blog_comment_deleted.php b/lib/classes/event/blog_comment_deleted.php index 068ab777354..94f7fae9abf 100644 --- a/lib/classes/event/blog_comment_deleted.php +++ b/lib/classes/event/blog_comment_deleted.php @@ -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']}'."; } } diff --git a/lib/classes/event/blog_entries_viewed.php b/lib/classes/event/blog_entries_viewed.php index 816a31bf5d4..b216158efaf 100644 --- a/lib/classes/event/blog_entries_viewed.php +++ b/lib/classes/event/blog_entries_viewed.php @@ -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."; } /** diff --git a/lib/classes/event/blog_entry_created.php b/lib/classes/event/blog_entry_created.php index 5aa5e5dc782..8f4dfc54c99 100644 --- a/lib/classes/event/blog_entry_created.php +++ b/lib/classes/event/blog_entry_created.php @@ -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'."; } /** diff --git a/lib/classes/event/blog_entry_deleted.php b/lib/classes/event/blog_entry_deleted.php index bdf2342e453..c20a2535bbc 100644 --- a/lib/classes/event/blog_entry_deleted.php +++ b/lib/classes/event/blog_entry_deleted.php @@ -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'."; } /** diff --git a/lib/classes/event/blog_entry_updated.php b/lib/classes/event/blog_entry_updated.php index dc3dd4e7443..71edfbe5942 100644 --- a/lib/classes/event/blog_entry_updated.php +++ b/lib/classes/event/blog_entry_updated.php @@ -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'."; } /** diff --git a/lib/classes/event/calendar_event_created.php b/lib/classes/event/calendar_event_created.php index 0046cb31dfc..af97e856210 100644 --- a/lib/classes/event/calendar_event_created.php +++ b/lib/classes/event/calendar_event_created.php @@ -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'."; } /** diff --git a/lib/classes/event/calendar_event_deleted.php b/lib/classes/event/calendar_event_deleted.php index 02df261aafb..17814265c25 100644 --- a/lib/classes/event/calendar_event_deleted.php +++ b/lib/classes/event/calendar_event_deleted.php @@ -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'."; } /** diff --git a/lib/classes/event/calendar_event_updated.php b/lib/classes/event/calendar_event_updated.php index 97d1307766c..a346e538c89 100644 --- a/lib/classes/event/calendar_event_updated.php +++ b/lib/classes/event/calendar_event_updated.php @@ -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'."; } /** diff --git a/lib/classes/event/cohort_created.php b/lib/classes/event/cohort_created.php index 2f5c2ac2747..0e07ceda4e4 100644 --- a/lib/classes/event/cohort_created.php +++ b/lib/classes/event/cohort_created.php @@ -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'."; } /** diff --git a/lib/classes/event/cohort_deleted.php b/lib/classes/event/cohort_deleted.php index f3b5d344556..36c81690bfe 100644 --- a/lib/classes/event/cohort_deleted.php +++ b/lib/classes/event/cohort_deleted.php @@ -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'."; } /** diff --git a/lib/classes/event/cohort_member_added.php b/lib/classes/event/cohort_member_added.php index 628b1b78de1..0782d16724a 100644 --- a/lib/classes/event/cohort_member_added.php +++ b/lib/classes/event/cohort_member_added.php @@ -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'."; } /** diff --git a/lib/classes/event/cohort_member_removed.php b/lib/classes/event/cohort_member_removed.php index ee1d49309e4..79f1c552583 100644 --- a/lib/classes/event/cohort_member_removed.php +++ b/lib/classes/event/cohort_member_removed.php @@ -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'."; } /** diff --git a/lib/classes/event/cohort_updated.php b/lib/classes/event/cohort_updated.php index 142fb606155..3d369fa2422 100644 --- a/lib/classes/event/cohort_updated.php +++ b/lib/classes/event/cohort_updated.php @@ -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'."; } /** diff --git a/lib/classes/event/comment_created.php b/lib/classes/event/comment_created.php index 3ab94744b3c..46b9c6918b9 100644 --- a/lib/classes/event/comment_created.php +++ b/lib/classes/event/comment_created.php @@ -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'."; } diff --git a/lib/classes/event/comment_deleted.php b/lib/classes/event/comment_deleted.php index 4d34b2e36ad..195908ca52d 100644 --- a/lib/classes/event/comment_deleted.php +++ b/lib/classes/event/comment_deleted.php @@ -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'."; } /** diff --git a/lib/classes/event/course_category_created.php b/lib/classes/event/course_category_created.php index 808887468c7..979ac123777 100644 --- a/lib/classes/event/course_category_created.php +++ b/lib/classes/event/course_category_created.php @@ -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'."; } /** diff --git a/lib/classes/event/course_category_deleted.php b/lib/classes/event/course_category_deleted.php index 8b27f12556d..1bb88f85105 100644 --- a/lib/classes/event/course_category_deleted.php +++ b/lib/classes/event/course_category_deleted.php @@ -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'."; } /** diff --git a/lib/classes/event/course_category_updated.php b/lib/classes/event/course_category_updated.php index c251e138399..ce29ae01742 100644 --- a/lib/classes/event/course_category_updated.php +++ b/lib/classes/event/course_category_updated.php @@ -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'."; } /** diff --git a/lib/classes/event/course_completed.php b/lib/classes/event/course_completed.php index 705251d6d0e..16ea9038094 100644 --- a/lib/classes/event/course_completed.php +++ b/lib/classes/event/course_completed.php @@ -85,7 +85,7 @@ class course_completed extends base { * @return string */ public function get_description() { - return "The course with the id '$this->courseid' was completed for the user with the id '$this->relateduserid'."; + return "The user with the id '$this->relateduserid' completed the course with the id '$this->courseid'."; } /** diff --git a/lib/classes/event/course_completion_updated.php b/lib/classes/event/course_completion_updated.php index dc40b144c2e..fe37094fb6b 100644 --- a/lib/classes/event/course_completion_updated.php +++ b/lib/classes/event/course_completion_updated.php @@ -59,7 +59,7 @@ class course_completion_updated extends base { * @return string */ public function get_description() { - return "The requirements to complete the course with the id '$this->courseid' was updated by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' updated the requirements to complete the course with the id '$this->courseid'."; } /** diff --git a/lib/classes/event/course_content_deleted.php b/lib/classes/event/course_content_deleted.php index ac097e7266a..646c792d86d 100644 --- a/lib/classes/event/course_content_deleted.php +++ b/lib/classes/event/course_content_deleted.php @@ -66,7 +66,7 @@ class course_content_deleted extends base { * @return string */ public function get_description() { - return "The course with the id '$this->courseid' had content deleted by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' deleted content from course with the id '$this->courseid'."; } /** diff --git a/lib/classes/event/course_created.php b/lib/classes/event/course_created.php index 58cf28591e8..f1f5da50505 100644 --- a/lib/classes/event/course_created.php +++ b/lib/classes/event/course_created.php @@ -67,7 +67,7 @@ class course_created extends base { * @return string */ public function get_description() { - return "The course 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 with the id '$this->courseid'."; } /** diff --git a/lib/classes/event/course_deleted.php b/lib/classes/event/course_deleted.php index 17da551d9e8..50c3bb4681e 100644 --- a/lib/classes/event/course_deleted.php +++ b/lib/classes/event/course_deleted.php @@ -68,7 +68,7 @@ class course_deleted extends base { * @return string */ public function get_description() { - return "The course with the id '$this->courseid' was deleted by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' deleted the course with the id '$this->courseid'."; } /** diff --git a/lib/classes/event/course_reset_started.php b/lib/classes/event/course_reset_started.php index dd043dee7cd..4913b87b415 100644 --- a/lib/classes/event/course_reset_started.php +++ b/lib/classes/event/course_reset_started.php @@ -47,7 +47,7 @@ class course_reset_started extends base { * @return string */ public function get_description() { - return "The user with the id '$this->userid' has started the reset of course '$this->courseid''."; + return "The user with the id '$this->userid' has started the reset of the course with the id '$this->courseid'."; } /** diff --git a/lib/classes/event/course_restored.php b/lib/classes/event/course_restored.php index 6ca02ae912c..42c8e12459b 100644 --- a/lib/classes/event/course_restored.php +++ b/lib/classes/event/course_restored.php @@ -70,7 +70,7 @@ class course_restored extends base { * @return string */ public function get_description() { - return "The course with the id '$this->objectid' was restored by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' restored the course with the id '$this->courseid'."; } /** diff --git a/lib/classes/event/course_updated.php b/lib/classes/event/course_updated.php index b36d251526c..0d5e2a9db37 100644 --- a/lib/classes/event/course_updated.php +++ b/lib/classes/event/course_updated.php @@ -70,7 +70,7 @@ class course_updated extends base { * @return string */ public function get_description() { - return "The course with the id '$this->courseid' was updated by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' updated the course with the id '$this->courseid'."; } /** diff --git a/lib/classes/event/message_sent.php b/lib/classes/event/message_sent.php index 8fdecc57f1a..9e490951f6e 100644 --- a/lib/classes/event/message_sent.php +++ b/lib/classes/event/message_sent.php @@ -76,7 +76,7 @@ class message_sent extends base { public function get_description() { // Check if we are sending from a valid user. if (\core_user::is_real_user($this->userid)) { - return "The user with the id '$this->objectid' sent a message to the user with the id '$this->relateduserid'."; + return "The user with the id '$this->userid' sent a message to the user with the id '$this->relateduserid'."; } return "A message was sent by the system to the user with the id '$this->relateduserid'."; diff --git a/lib/classes/event/mnet_access_control_created.php b/lib/classes/event/mnet_access_control_created.php index c3ec1dd2314..20ae94bb9fa 100644 --- a/lib/classes/event/mnet_access_control_created.php +++ b/lib/classes/event/mnet_access_control_created.php @@ -70,8 +70,8 @@ class mnet_access_control_created extends base { * @return string */ public function get_description() { - return "Access control created for the user with the username '{$this->other['username']}' belonging to the mnet " . - "host '{$this->other['hostname']}'."; + return "The user with the id '$this->userid' created access control for the user with the username '{$this->other['username']}' " . + "belonging to the mnet host '{$this->other['hostname']}'."; } /** diff --git a/lib/classes/event/mnet_access_control_updated.php b/lib/classes/event/mnet_access_control_updated.php index 84c6bac42eb..4703b6b5513 100644 --- a/lib/classes/event/mnet_access_control_updated.php +++ b/lib/classes/event/mnet_access_control_updated.php @@ -70,8 +70,8 @@ class mnet_access_control_updated extends base { * @return string */ public function get_description() { - return "Access control updated for the user with the username '{$this->other['username']}' belonging to the mnet " . - "host '{$this->other['hostname']}'."; + return "The user with the id '$this->userid' updated access control for the user with the username '{$this->other['username']}' " . + "belonging to the mnet host '{$this->other['hostname']}'."; } /** diff --git a/lib/classes/event/note_created.php b/lib/classes/event/note_created.php index 9985e5e81b8..408194d991b 100644 --- a/lib/classes/event/note_created.php +++ b/lib/classes/event/note_created.php @@ -68,8 +68,8 @@ class note_created extends base { * @return string */ public function get_description() { - return "The note with the id '$this->objectid' for the user with the id '$this->relateduserid' was created by the user " . - "with the id '$this->userid'."; + return "The user with the id '$this->userid' created the note with the id '$this->objectid' for the user with the id " . + "'$this->relateduserid'."; } /** diff --git a/lib/classes/event/note_deleted.php b/lib/classes/event/note_deleted.php index 7fbe36ce55c..4597a4e54a8 100644 --- a/lib/classes/event/note_deleted.php +++ b/lib/classes/event/note_deleted.php @@ -68,8 +68,8 @@ class note_deleted extends base { * @return string */ public function get_description() { - return "The note with the id '$this->objectid' for the user with the id '$this->relateduserid' was deleted by the user " . - "with the id '$this->userid'."; + return "The user with the id '$this->userid' deleted the note with the id '$this->objectid' for the user with the id " . + "'$this->relateduserid'"; } /** diff --git a/lib/classes/event/note_updated.php b/lib/classes/event/note_updated.php index 1fe138d8f92..c6e79beba5c 100644 --- a/lib/classes/event/note_updated.php +++ b/lib/classes/event/note_updated.php @@ -68,8 +68,8 @@ class note_updated extends base { * @return string */ public function get_description() { - return "The note with the id '$this->objectid' for the user with the id '$this->relateduserid' was updated by the user " . - "with the id '$this->userid'."; + return "The user with the id '$this->userid' updated the note with the id '$this->objectid' for the user with the id " . + "'$this->relateduserid'"; } /** diff --git a/lib/classes/event/question_category_created.php b/lib/classes/event/question_category_created.php index b4598776cd2..96d1bbe8dd5 100644 --- a/lib/classes/event/question_category_created.php +++ b/lib/classes/event/question_category_created.php @@ -60,7 +60,7 @@ class question_category_created extends base { * @return string */ public function get_description() { - return "A question category with the id of '$this->objectid' was created by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' created the question category with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/role_allow_assign_updated.php b/lib/classes/event/role_allow_assign_updated.php index 3a194c1a8d4..92732a8907e 100644 --- a/lib/classes/event/role_allow_assign_updated.php +++ b/lib/classes/event/role_allow_assign_updated.php @@ -59,7 +59,7 @@ class role_allow_assign_updated extends base { * @return string */ public function get_description() { - return "Allow role assignments updated by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' updated the allowed role assignments."; } /** diff --git a/lib/classes/event/role_allow_override_updated.php b/lib/classes/event/role_allow_override_updated.php index 79aa2e4593b..3c5c8d84a79 100644 --- a/lib/classes/event/role_allow_override_updated.php +++ b/lib/classes/event/role_allow_override_updated.php @@ -59,7 +59,7 @@ class role_allow_override_updated extends base { * @return string */ public function get_description() { - return "Allow role override updated by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' updated the allowed role overrides."; } /** diff --git a/lib/classes/event/role_allow_switch_updated.php b/lib/classes/event/role_allow_switch_updated.php index d3551c9c173..8811b959845 100644 --- a/lib/classes/event/role_allow_switch_updated.php +++ b/lib/classes/event/role_allow_switch_updated.php @@ -59,7 +59,7 @@ class role_allow_switch_updated extends base { * @return string */ public function get_description() { - return "Allow role switch updated by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' updated the allowed role switches"; } /** diff --git a/lib/classes/event/role_assigned.php b/lib/classes/event/role_assigned.php index 172273283b3..5897c8d7341 100644 --- a/lib/classes/event/role_assigned.php +++ b/lib/classes/event/role_assigned.php @@ -68,8 +68,8 @@ class role_assigned extends base { * @return string */ public function get_description() { - return "The role with the id '$this->objectid' was assigned to the user with the id '$this->relateduserid' " . - "by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' assigned the role with the id '$this->objectid' to the user with the id " . + "'$this->relateduserid'."; } /** diff --git a/lib/classes/event/role_capabilities_updated.php b/lib/classes/event/role_capabilities_updated.php index 9cc28f41fd4..8c302113870 100644 --- a/lib/classes/event/role_capabilities_updated.php +++ b/lib/classes/event/role_capabilities_updated.php @@ -63,7 +63,7 @@ class role_capabilities_updated extends base { * @return string */ public function get_description() { - return "The capabilities for the role with the id '$this->objectid' were updated by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' updated the capabilities for the role with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/role_deleted.php b/lib/classes/event/role_deleted.php index 27a198236fe..13a2fb27ba0 100644 --- a/lib/classes/event/role_deleted.php +++ b/lib/classes/event/role_deleted.php @@ -67,7 +67,7 @@ class role_deleted extends base { * @return string */ public function get_description() { - return "The role 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 role with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/role_unassigned.php b/lib/classes/event/role_unassigned.php index 8de2c004f7f..3b532016b3f 100644 --- a/lib/classes/event/role_unassigned.php +++ b/lib/classes/event/role_unassigned.php @@ -65,8 +65,8 @@ class role_unassigned extends base { * @return string */ public function get_description() { - return "The role with the id '$this->objectid' was unassigned from the user with the id '$this->relateduserid' " . - "by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' unassigned the role with the id '$this->objectid' from the user with the " . + "id '$this->relateduserid'."; } /** diff --git a/lib/classes/event/tag_flagged.php b/lib/classes/event/tag_flagged.php index f6c4c63cb71..dcbbb7887b5 100644 --- a/lib/classes/event/tag_flagged.php +++ b/lib/classes/event/tag_flagged.php @@ -67,7 +67,7 @@ class tag_flagged extends base { * @return string */ public function get_description() { - return "The tag with the id '$this->objectid' was flagged by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' flagged the tag with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/tag_removed.php b/lib/classes/event/tag_removed.php index 518fcfe58be..f6926758406 100644 --- a/lib/classes/event/tag_removed.php +++ b/lib/classes/event/tag_removed.php @@ -70,7 +70,7 @@ class tag_removed extends base { * @return string */ public function get_description() { - return "The user with the id '$this->userid' removed the tag with the id '{$this->other['tagid']}' to the item type '" . + return "The user with the id '$this->userid' removed the tag with the id '{$this->other['tagid']}' from the item type '" . s($this->other['itemtype']) . "' with the id '{$this->other['itemid']}'."; } diff --git a/lib/classes/event/tag_unflagged.php b/lib/classes/event/tag_unflagged.php index 86c383346f4..c239bba97cd 100644 --- a/lib/classes/event/tag_unflagged.php +++ b/lib/classes/event/tag_unflagged.php @@ -67,7 +67,7 @@ class tag_unflagged extends base { * @return string */ public function get_description() { - return "The tag with the id '$this->objectid' was unflagged by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' unflagged the tag with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/tag_updated.php b/lib/classes/event/tag_updated.php index f9c2660e1a6..f08e43c769c 100644 --- a/lib/classes/event/tag_updated.php +++ b/lib/classes/event/tag_updated.php @@ -70,7 +70,7 @@ class tag_updated extends base { * @return string */ public function get_description() { - return "The tag 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 tag with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/user_created.php b/lib/classes/event/user_created.php index e0738eea156..4a119bca072 100644 --- a/lib/classes/event/user_created.php +++ b/lib/classes/event/user_created.php @@ -60,7 +60,7 @@ class user_created extends base { * @return string */ public function get_description() { - return "The user with the id '$this->objectid' was created."; + return "The user with the id '$this->userid' created the user with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/user_deleted.php b/lib/classes/event/user_deleted.php index 79d9cecf78f..dcd756feb20 100644 --- a/lib/classes/event/user_deleted.php +++ b/lib/classes/event/user_deleted.php @@ -69,7 +69,7 @@ class user_deleted extends base { * @return string */ public function get_description() { - return "The user with the id '$this->objectid' was deleted."; + return "The user with the id '$this->userid' deleted the user with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/user_enrolment_created.php b/lib/classes/event/user_enrolment_created.php index 8f5b2e70be2..9dd666729b1 100644 --- a/lib/classes/event/user_enrolment_created.php +++ b/lib/classes/event/user_enrolment_created.php @@ -65,8 +65,8 @@ class user_enrolment_created extends base { * @return string */ public function get_description() { - return "The user with the id '$this->relateduserid' was enrolled in the course with the id '$this->courseid' by the " . - "user with the id '$this->userid'."; + return "The user with the id '$this->userid' enrolled the user with the id '$this->relateduserid' in the course with " . + "the id '$this->courseid'."; } /** diff --git a/lib/classes/event/user_enrolment_deleted.php b/lib/classes/event/user_enrolment_deleted.php index 8fc8daa6a5e..03974cd9674 100644 --- a/lib/classes/event/user_enrolment_deleted.php +++ b/lib/classes/event/user_enrolment_deleted.php @@ -66,8 +66,8 @@ class user_enrolment_deleted extends base { * @return string */ public function get_description() { - return "The user with the id '$this->relateduserid' was unenrolled in the course with the id '$this->courseid' by the " . - "user with the id '$this->userid'."; + return "The user with the id '$this->userid' unenrolled the user with the id '$this->relateduserid' from the course with " . + "the id '$this->courseid'."; } /** diff --git a/lib/classes/event/user_graded.php b/lib/classes/event/user_graded.php index 8dfb934f290..c00666f6194 100644 --- a/lib/classes/event/user_graded.php +++ b/lib/classes/event/user_graded.php @@ -107,7 +107,7 @@ class user_graded extends base { * @return string */ public function get_description() { - return "The user with the id '$this->userid' updated the grade with the id {$this->objectid} for the user with the " . + return "The user with the id '$this->userid' updated the grade with the id '$this->objectid' for the user with the " . "id '$this->relateduserid' for the grade item with the id '{$this->other['itemid']}'."; } diff --git a/lib/classes/event/user_password_updated.php b/lib/classes/event/user_password_updated.php index aea7bb94702..6970bebcb06 100644 --- a/lib/classes/event/user_password_updated.php +++ b/lib/classes/event/user_password_updated.php @@ -84,11 +84,11 @@ class user_password_updated extends base { public function get_description() { if ($this->userid == $this->relateduserid) { if ($this->other['forgottenreset']) { - return "User $this->userid reset their password"; + return "The user with the id '$this->userid' reset their password."; } - return "User $this->userid changed their password"; + return "The user with the id '$this->userid' changed their password."; } else { - return "User $this->userid changed password of user $this->relateduserid"; + return "The user with the id '$this->userid' changed the password of the user with the id '$this->relateduserid'."; } } diff --git a/lib/classes/event/user_profile_viewed.php b/lib/classes/event/user_profile_viewed.php index c0318429eab..f225aeb5ad0 100644 --- a/lib/classes/event/user_profile_viewed.php +++ b/lib/classes/event/user_profile_viewed.php @@ -68,8 +68,8 @@ class user_profile_viewed extends base { * @return string */ public function get_description() { - return 'The user ' . $this->userid . ' viewed the profile for user ' . $this->relateduserid . ' in the course ' . - $this->other['courseid']; + return "The user with the id '$this->userid' viewed the profile for the user with the id '$this->relateduserid' in the course " . + "with the id '{$this->other['courseid']}'."; } /** diff --git a/lib/classes/event/user_updated.php b/lib/classes/event/user_updated.php index 54dc983547e..208f7de23ce 100644 --- a/lib/classes/event/user_updated.php +++ b/lib/classes/event/user_updated.php @@ -60,7 +60,7 @@ class user_updated extends base { * @return string */ public function get_description() { - return 'User profile updated for userid '.$this->objectid; + return "The user with the id '$this->userid' updated the profile for the user with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/webservice_service_created.php b/lib/classes/event/webservice_service_created.php index c23101e1e17..55ccc4cfa88 100644 --- a/lib/classes/event/webservice_service_created.php +++ b/lib/classes/event/webservice_service_created.php @@ -47,7 +47,7 @@ class webservice_service_created extends base { * @return string */ public function get_description() { - return "The web service service $this->objectid has been created by user $this->userid."; + return "The user with the id '$this->userid' created the web service with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/webservice_service_deleted.php b/lib/classes/event/webservice_service_deleted.php index 170c89e6caf..d1f77321d4e 100644 --- a/lib/classes/event/webservice_service_deleted.php +++ b/lib/classes/event/webservice_service_deleted.php @@ -41,7 +41,7 @@ class webservice_service_deleted extends base { * @return string */ public function get_description() { - return "The web service service $this->objectid has been deleted by user $this->userid."; + return "The user with the id '$this->userid' deleted the web service with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/webservice_service_updated.php b/lib/classes/event/webservice_service_updated.php index e8d44a7721f..3fb8971bae3 100644 --- a/lib/classes/event/webservice_service_updated.php +++ b/lib/classes/event/webservice_service_updated.php @@ -41,7 +41,7 @@ class webservice_service_updated extends base { * @return string */ public function get_description() { - return "The web service service $this->objectid has been updated by user $this->userid."; + return "The user with the id '$this->userid' updated the web service with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/webservice_service_user_added.php b/lib/classes/event/webservice_service_user_added.php index 1bea51bcc3c..a1b9749a5d8 100644 --- a/lib/classes/event/webservice_service_user_added.php +++ b/lib/classes/event/webservice_service_user_added.php @@ -41,7 +41,8 @@ class webservice_service_user_added extends base { * @return string */ public function get_description() { - return "The user $this->relateduserid has been added to the web service service $this->objectid."; + return "The user with the id '$this->userid' added the user with the id '$this->relateduserid' to the web service " . + "with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/webservice_service_user_removed.php b/lib/classes/event/webservice_service_user_removed.php index ca4d6eeccf5..8ff94299018 100644 --- a/lib/classes/event/webservice_service_user_removed.php +++ b/lib/classes/event/webservice_service_user_removed.php @@ -41,7 +41,8 @@ class webservice_service_user_removed extends base { * @return string */ public function get_description() { - return "The user $this->relateduserid has been removed to the web service service $this->objectid."; + return "The user with the id '$this->userid' removed the user with the id '$this->relateduserid' from the web service " . + "with the id '$this->objectid'."; } /** diff --git a/lib/classes/event/webservice_token_created.php b/lib/classes/event/webservice_token_created.php index a9c4f27d151..d1e5bc973e6 100644 --- a/lib/classes/event/webservice_token_created.php +++ b/lib/classes/event/webservice_token_created.php @@ -47,7 +47,7 @@ class webservice_token_created extends base { * @return string */ public function get_description() { - return "A web service token has been created for the user $this->relateduserid."; + return "The user with the id '$this->userid' created a web service token for the user with the id '$this->relateduserid'."; } /** diff --git a/lib/classes/event/webservice_token_sent.php b/lib/classes/event/webservice_token_sent.php index be2c2a209d5..ac1ad1c9d8e 100644 --- a/lib/classes/event/webservice_token_sent.php +++ b/lib/classes/event/webservice_token_sent.php @@ -41,7 +41,7 @@ class webservice_token_sent extends base { * @return string */ public function get_description() { - return "The token $this->objectid has been sent to the user $this->userid."; + return "The user with the id '$this->userid' has been sent the web service token with the id '$this->objectid'."; } /** diff --git a/mod/assign/classes/event/submission_form_viewed.php b/mod/assign/classes/event/submission_form_viewed.php index 45a2e8fba06..163b0531e1e 100644 --- a/mod/assign/classes/event/submission_form_viewed.php +++ b/mod/assign/classes/event/submission_form_viewed.php @@ -99,7 +99,7 @@ class submission_form_viewed extends base { "for the assignment with the course module id '$this->contextinstanceid'."; } - return "The user with the id '$this->userid' viewed their submission for the assignment with the the course " . + return "The user with the id '$this->userid' viewed their submission for the assignment with the course " . "module id '$this->contextinstanceid'."; } diff --git a/mod/book/classes/event/chapter_created.php b/mod/book/classes/event/chapter_created.php index 96efdf7fa2c..3a9c838f367 100644 --- a/mod/book/classes/event/chapter_created.php +++ b/mod/book/classes/event/chapter_created.php @@ -62,8 +62,8 @@ class chapter_created extends \core\event\base { * @return string */ public function get_description() { - return "The chapter with the id '$this->objectid' of the book with the course module id '$this->contextinstanceid' - has been created by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' created the chapter with the id '$this->objectid' for the book with the " . + "course module id '$this->contextinstanceid'."; } /** diff --git a/mod/book/classes/event/chapter_deleted.php b/mod/book/classes/event/chapter_deleted.php index b7f988940a2..0ab07db7985 100644 --- a/mod/book/classes/event/chapter_deleted.php +++ b/mod/book/classes/event/chapter_deleted.php @@ -62,8 +62,8 @@ class chapter_deleted extends \core\event\base { * @return string */ public function get_description() { - return "The chapter with the id '$this->objectid' of the book with the course module id '$this->contextinstanceid' - has been deleted by the user with the id '$this->userid."; + return "The user with the id '$this->userid' deleted the chapter with the id '$this->objectid' for the book with the " . + "course module id '$this->contextinstanceid'."; } /** diff --git a/mod/book/classes/event/chapter_updated.php b/mod/book/classes/event/chapter_updated.php index c13c05c2056..ff45dd592f5 100644 --- a/mod/book/classes/event/chapter_updated.php +++ b/mod/book/classes/event/chapter_updated.php @@ -62,8 +62,8 @@ class chapter_updated extends \core\event\base { * @return string */ public function get_description() { - return "The chapter with the id '$this->objectid' of the book with the course module id '$this->contextinstanceid' - has been updated by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' updated the chapter with the id '$this->objectid' for the book with the " . + "course module id '$this->contextinstanceid'."; } /** diff --git a/mod/book/classes/event/chapter_viewed.php b/mod/book/classes/event/chapter_viewed.php index 41836562a65..981009a4f0a 100644 --- a/mod/book/classes/event/chapter_viewed.php +++ b/mod/book/classes/event/chapter_viewed.php @@ -62,8 +62,8 @@ class chapter_viewed extends \core\event\base { * @return string */ public function get_description() { - return "The chapter with the id '$this->objectid' of the book with the course module id '$this->contextinstanceid' - has been viewed by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' viewed the chapter with the id '$this->objectid' for the book with the " . + "course module id '$this->contextinstanceid'."; } /** diff --git a/mod/data/classes/event/record_created.php b/mod/data/classes/event/record_created.php index c0f34673afe..e167ff38b14 100644 --- a/mod/data/classes/event/record_created.php +++ b/mod/data/classes/event/record_created.php @@ -68,7 +68,7 @@ class record_created extends \core\event\base { * @return string */ public function get_description() { - return "The user with the id '$this->userid' created the data record the id '$this->objectid' for the data activity " . + return "The user with the id '$this->userid' created the data record with the id '$this->objectid' for the data activity " . "with the course module id '$this->contextinstanceid'."; } diff --git a/mod/data/classes/event/record_deleted.php b/mod/data/classes/event/record_deleted.php index a56c34e896e..6bf534bee05 100644 --- a/mod/data/classes/event/record_deleted.php +++ b/mod/data/classes/event/record_deleted.php @@ -68,7 +68,7 @@ class record_deleted extends \core\event\base { * @return string */ public function get_description() { - return "The user with the id '$this->userid' deleted the data record the id '$this->objectid' in the data activity " . + return "The user with the id '$this->userid' deleted the data record with the id '$this->objectid' in the data activity " . "with the course module id '$this->contextinstanceid'."; } diff --git a/mod/data/classes/event/record_updated.php b/mod/data/classes/event/record_updated.php index 296cce2474a..1bff789edba 100644 --- a/mod/data/classes/event/record_updated.php +++ b/mod/data/classes/event/record_updated.php @@ -68,7 +68,7 @@ class record_updated extends \core\event\base { * @return string */ public function get_description() { - return "The user with the id '$this->userid' updated the data record the id '$this->objectid' in the data activity " . + return "The user with the id '$this->userid' updated the data record with the id '$this->objectid' in the data activity " . "with the course module id '$this->contextinstanceid'."; } diff --git a/mod/forum/classes/event/readtracking_disabled.php b/mod/forum/classes/event/readtracking_disabled.php index ee8571464cc..2585dbc44f6 100644 --- a/mod/forum/classes/event/readtracking_disabled.php +++ b/mod/forum/classes/event/readtracking_disabled.php @@ -57,8 +57,8 @@ class readtracking_disabled extends \core\event\base { * @return string */ public function get_description() { - return "Read tracking has been disabled for the user with the id '$this->relateduserid' in the forum with the " . - "course module id '$this->contextinstanceid'."; + return "The user with the id '$this->userid' has disabled read tracking for the user with the id '$this->relateduserid' " . + "in the forum with the course module id '$this->contextinstanceid'."; } /** diff --git a/mod/forum/classes/event/readtracking_enabled.php b/mod/forum/classes/event/readtracking_enabled.php index 5604187d231..34b05584d38 100644 --- a/mod/forum/classes/event/readtracking_enabled.php +++ b/mod/forum/classes/event/readtracking_enabled.php @@ -57,8 +57,8 @@ class readtracking_enabled extends \core\event\base { * @return string */ public function get_description() { - return "Read tracking has been enabled for the user with the id '$this->relateduserid' in the forum with the " . - "course module id '$this->contextinstanceid'."; + return "The user with the id '$this->userid' has enabled read tracking for the user with the id '$this->relateduserid' " . + "in the forum with the course module id '$this->contextinstanceid'."; } /** diff --git a/mod/forum/classes/event/subscription_created.php b/mod/forum/classes/event/subscription_created.php index 03625fe783b..08db9964581 100644 --- a/mod/forum/classes/event/subscription_created.php +++ b/mod/forum/classes/event/subscription_created.php @@ -57,8 +57,8 @@ class subscription_created extends \core\event\base { * @return string */ public function get_description() { - return "The user with the id '$this->relateduserid' was subscribed to the forum with the course module id " . - "'$this->contextinstanceid' by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' subscribed the user with the id '$this->relateduserid' to the forum with the " . + "course module id '$this->contextinstanceid'."; } /** diff --git a/mod/forum/classes/event/subscription_deleted.php b/mod/forum/classes/event/subscription_deleted.php index c075bc356ed..cf8f36f48b7 100644 --- a/mod/forum/classes/event/subscription_deleted.php +++ b/mod/forum/classes/event/subscription_deleted.php @@ -57,8 +57,8 @@ class subscription_deleted extends \core\event\base { * @return string */ public function get_description() { - return "The user with the id '$this->relateduserid' was unsubscribed to the forum with the course module id " . - "'$this->contextinstanceid' by the user with the id '$this->userid'."; + return "The user with the id '$this->userid' unsubscribed the user with the id '$this->relateduserid' to the forum with the " . + "course module id '$this->contextinstanceid'."; } /** diff --git a/mod/lesson/classes/event/essay_attempt_viewed.php b/mod/lesson/classes/event/essay_attempt_viewed.php index 92d34f969f0..c5ac3ec6d3a 100644 --- a/mod/lesson/classes/event/essay_attempt_viewed.php +++ b/mod/lesson/classes/event/essay_attempt_viewed.php @@ -70,9 +70,8 @@ class essay_attempt_viewed extends \core\event\base { * @return string */ public function get_description() { - return "The essay grade for the user with the id '$this->relateduserid' for the attempt with the id " . - "'$this->objectid' was viewed by the user with the id '$this->userid' for the lesson activity with the " . - "course module id '$this->contextinstanceid'."; + return "The user with the id '$this->userid' viewed the essay grade for the user with the id '$this->relateduserid' for " . + "the attempt with the id '$this->objectid' for the lesson activity with the course module id '$this->contextinstanceid'."; } /** diff --git a/mod/quiz/classes/event/attempt_becameoverdue.php b/mod/quiz/classes/event/attempt_becameoverdue.php index 945107a8c3c..754e03c4e8a 100644 --- a/mod/quiz/classes/event/attempt_becameoverdue.php +++ b/mod/quiz/classes/event/attempt_becameoverdue.php @@ -59,7 +59,8 @@ class attempt_becameoverdue extends \core\event\base { * @return string */ public function get_description() { - return "Attempt with the id '$this->objectid' for the user with the id '$this->relateduserid' became overdue."; + return "The quiz attempt with the id '$this->objectid' belonging to the quiz with the course module id '$this->contextinstanceid' " . + "for the user with the id '$this->relateduserid' became overdue."; } /** diff --git a/mod/scorm/classes/event/user_report_viewed.php b/mod/scorm/classes/event/user_report_viewed.php index d818f8f2dfb..b14ec1c4f71 100644 --- a/mod/scorm/classes/event/user_report_viewed.php +++ b/mod/scorm/classes/event/user_report_viewed.php @@ -56,7 +56,7 @@ class user_report_viewed extends \core\event\base { * @return string */ public function get_description() { - return 'User with id ' . $this->userid . ' viewed user report for user ' . $this->relateduserid; + return "The user with the id '$this->userid' viewed the scorm user report for the user with the id '$this->relateduserid'."; } /** diff --git a/mod/workshop/classes/event/submission_assessed.php b/mod/workshop/classes/event/submission_assessed.php index 87b0b1a7806..f92cbbe96d6 100644 --- a/mod/workshop/classes/event/submission_assessed.php +++ b/mod/workshop/classes/event/submission_assessed.php @@ -59,8 +59,8 @@ class submission_assessed extends \core\event\base { * @return string */ public function get_description() { - return "The submission with the id '$this->objectid' has been assessed by the user with the id '$this->userid' for the user " . - "with the id '$this->relateduserid' in the workshop with the course module id '$this->contextinstanceid'."; + return "The user with the id '$this->userid' assessed the submission with the id '$this->objectid' for the user with " . + "the id '$this->relateduserid' in the workshop with the course module id '$this->contextinstanceid'."; } /** diff --git a/mod/workshop/classes/event/submission_reassessed.php b/mod/workshop/classes/event/submission_reassessed.php index 49bb0c42ff5..4d43d495e87 100644 --- a/mod/workshop/classes/event/submission_reassessed.php +++ b/mod/workshop/classes/event/submission_reassessed.php @@ -60,8 +60,8 @@ class submission_reassessed extends \core\event\base { * @return string */ public function get_description() { - return "The submission with the id '$this->objectid' has been reassessed by the user with the id '$this->userid' for the user " . - "with the id '$this->relateduserid' in the workshop with the course module id '$this->contextinstanceid'."; + return "The user with the id '$this->userid' reassessed the submission with the id '$this->objectid' for the user with " . + "the id '$this->relateduserid' in the workshop with the course module id '$this->contextinstanceid'."; } /**