MDL-45357 events: changed event descriptions to ensure consistency in core
authorMark Nelson <markn@moodle.com>
Wed, 30 Apr 2014 22:37:17 +0000 (15:37 -0700)
committerMark Nelson <markn@moodle.com>
Mon, 5 May 2014 07:55:50 +0000 (00:55 -0700)
78 files changed:
lib/classes/event/blog_association_created.php
lib/classes/event/blog_comment_created.php
lib/classes/event/blog_comment_deleted.php
lib/classes/event/blog_entries_viewed.php
lib/classes/event/blog_entry_created.php
lib/classes/event/blog_entry_deleted.php
lib/classes/event/blog_entry_updated.php
lib/classes/event/calendar_event_created.php
lib/classes/event/calendar_event_deleted.php
lib/classes/event/calendar_event_updated.php
lib/classes/event/cohort_created.php
lib/classes/event/cohort_deleted.php
lib/classes/event/cohort_member_added.php
lib/classes/event/cohort_member_removed.php
lib/classes/event/cohort_updated.php
lib/classes/event/comment_created.php
lib/classes/event/comment_deleted.php
lib/classes/event/course_category_created.php
lib/classes/event/course_category_deleted.php
lib/classes/event/course_category_updated.php
lib/classes/event/course_completed.php
lib/classes/event/course_completion_updated.php
lib/classes/event/course_content_deleted.php
lib/classes/event/course_created.php
lib/classes/event/course_deleted.php
lib/classes/event/course_reset_started.php
lib/classes/event/course_restored.php
lib/classes/event/course_updated.php
lib/classes/event/message_sent.php
lib/classes/event/mnet_access_control_created.php
lib/classes/event/mnet_access_control_updated.php
lib/classes/event/note_created.php
lib/classes/event/note_deleted.php
lib/classes/event/note_updated.php
lib/classes/event/question_category_created.php
lib/classes/event/role_allow_assign_updated.php
lib/classes/event/role_allow_override_updated.php
lib/classes/event/role_allow_switch_updated.php
lib/classes/event/role_assigned.php
lib/classes/event/role_capabilities_updated.php
lib/classes/event/role_deleted.php
lib/classes/event/role_unassigned.php
lib/classes/event/tag_flagged.php
lib/classes/event/tag_removed.php
lib/classes/event/tag_unflagged.php
lib/classes/event/tag_updated.php
lib/classes/event/user_created.php
lib/classes/event/user_deleted.php
lib/classes/event/user_enrolment_created.php
lib/classes/event/user_enrolment_deleted.php
lib/classes/event/user_graded.php
lib/classes/event/user_password_updated.php
lib/classes/event/user_profile_viewed.php
lib/classes/event/user_updated.php
lib/classes/event/webservice_service_created.php
lib/classes/event/webservice_service_deleted.php
lib/classes/event/webservice_service_updated.php
lib/classes/event/webservice_service_user_added.php
lib/classes/event/webservice_service_user_removed.php
lib/classes/event/webservice_token_created.php
lib/classes/event/webservice_token_sent.php
mod/assign/classes/event/submission_form_viewed.php
mod/book/classes/event/chapter_created.php
mod/book/classes/event/chapter_deleted.php
mod/book/classes/event/chapter_updated.php
mod/book/classes/event/chapter_viewed.php
mod/data/classes/event/record_created.php
mod/data/classes/event/record_deleted.php
mod/data/classes/event/record_updated.php
mod/forum/classes/event/readtracking_disabled.php
mod/forum/classes/event/readtracking_enabled.php
mod/forum/classes/event/subscription_created.php
mod/forum/classes/event/subscription_deleted.php
mod/lesson/classes/event/essay_attempt_viewed.php
mod/quiz/classes/event/attempt_becameoverdue.php
mod/scorm/classes/event/user_report_viewed.php
mod/workshop/classes/event/submission_assessed.php
mod/workshop/classes/event/submission_reassessed.php

index cf65eaa..9abb4e0 100644 (file)
@@ -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']}'.";
     }
 
     /**
index b15e118..ee92138 100644 (file)
@@ -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']}'.";
     }
 }
index 068ab77..94f7fae 100644 (file)
@@ -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']}'.";
     }
 }
index 816a31b..b216158 100644 (file)
@@ -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.";
     }
 
     /**
index 5aa5e5d..8f4dfc5 100644 (file)
@@ -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'.";
     }
 
     /**
index bdf2342..c20a253 100644 (file)
@@ -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'.";
     }
 
     /**
index dc3dd4e..71edfbe 100644 (file)
@@ -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'.";
     }
 
     /**
index 0046cb3..af97e85 100644 (file)
@@ -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'.";
     }
 
     /**
index 02df261..1781426 100644 (file)
@@ -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'.";
     }
 
     /**
index 97d1307..a346e53 100644 (file)
@@ -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'.";
     }
 
     /**
index 2f5c2ac..0e07ced 100644 (file)
@@ -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'.";
     }
 
     /**
index f3b5d34..36c8169 100644 (file)
@@ -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'.";
     }
 
     /**
index 628b1b7..0782d16 100644 (file)
@@ -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'.";
     }
 
     /**
index ee1d493..79f1c55 100644 (file)
@@ -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'.";
     }
 
     /**
index 142fb60..3d369fa 100644 (file)
@@ -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'.";
     }
 
     /**
index 3ab9474..46b9c69 100644 (file)
@@ -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'.";
     }
 
index 4d34b2e..195908c 100644 (file)
@@ -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'.";
     }
 
     /**
index 8088874..979ac12 100644 (file)
@@ -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'.";
     }
 
     /**
index 8b27f12..1bb88f8 100644 (file)
@@ -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'.";
     }
 
     /**
index c251e13..ce29ae0 100644 (file)
@@ -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'.";
     }
 
     /**
index 705251d..16ea903 100644 (file)
@@ -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'.";
     }
 
     /**
index dc40b14..fe37094 100644 (file)
@@ -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'.";
     }
 
     /**
index ac097e7..646c792 100644 (file)
@@ -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'.";
     }
 
     /**
index 58cf285..f1f5da5 100644 (file)
@@ -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'.";
     }
 
     /**
index 17da551..50c3bb4 100644 (file)
@@ -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'.";
     }
 
     /**
index dd043de..4913b87 100644 (file)
@@ -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'.";
     }
 
     /**
index 6ca02ae..42c8e12 100644 (file)
@@ -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'.";
     }
 
     /**
index b36d251..0d5e2a9 100644 (file)
@@ -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'.";
     }
 
     /**
index 8fdecc5..9e49095 100644 (file)
@@ -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'.";
index c3ec1dd..20ae94b 100644 (file)
@@ -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']}'.";
     }
 
     /**
index 84c6bac..4703b6b 100644 (file)
@@ -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']}'.";
     }
 
     /**
index 9985e5e..408194d 100644 (file)
@@ -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'.";
     }
 
     /**
index 7fbe36c..4597a4e 100644 (file)
@@ -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'";
     }
 
     /**
index 1fe138d..c6e79be 100644 (file)
@@ -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'";
     }
 
     /**
index b459877..96d1bbe 100644 (file)
@@ -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'.";
     }
 
     /**
index 3a194c1..92732a8 100644 (file)
@@ -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.";
     }
 
     /**
index 79aa2e4..3c5c8d8 100644 (file)
@@ -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.";
     }
 
     /**
index d3551c9..8811b95 100644 (file)
@@ -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";
     }
 
     /**
index 1722732..5897c8d 100644 (file)
@@ -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'.";
     }
 
     /**
index 9cc28f4..8c30211 100644 (file)
@@ -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'.";
     }
 
     /**
index 27a1982..13a2fb2 100644 (file)
@@ -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'.";
     }
 
     /**
index 8de2c00..3b53201 100644 (file)
@@ -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'.";
     }
 
     /**
index f6c4c63..dcbbb78 100644 (file)
@@ -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'.";
     }
 
     /**
index 518fcfe..f692675 100644 (file)
@@ -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']}'.";
     }
 
index 86c3833..c239bba 100644 (file)
@@ -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'.";
     }
 
     /**
index f9c2660..f08e43c 100644 (file)
@@ -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'.";
     }
 
     /**
index e0738ee..4a119bc 100644 (file)
@@ -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'.";
     }
 
     /**
index 79d9cec..dcd756f 100644 (file)
@@ -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'.";
     }
 
     /**
index 8f5b2e7..9dd6667 100644 (file)
@@ -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'.";
     }
 
     /**
index 8fc8daa..03974cd 100644 (file)
@@ -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'.";
     }
 
     /**
index 8dfb934..c00666f 100644 (file)
@@ -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']}'.";
     }
 
index aea7bb9..6970beb 100644 (file)
@@ -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'.";
         }
     }
 
index c031842..f225aeb 100644 (file)
@@ -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']}'.";
     }
 
     /**
index 54dc983..208f7de 100644 (file)
@@ -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'.";
     }
 
     /**
index c23101e..55ccc4c 100644 (file)
@@ -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'.";
     }
 
     /**
index 170c89e..d1f7732 100644 (file)
@@ -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'.";
     }
 
     /**
index e8d44a7..3fb8971 100644 (file)
@@ -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'.";
     }
 
     /**
index 1bea51b..a1b9749 100644 (file)
@@ -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'.";
     }
 
     /**
index ca4d6ee..8ff9429 100644 (file)
@@ -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'.";
     }
 
     /**
index a9c4f27..d1e5bc9 100644 (file)
@@ -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'.";
     }
 
     /**
index be2c2a2..ac1ad1c 100644 (file)
@@ -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'.";
     }
 
     /**
index 45a2e8f..163b053 100644 (file)
@@ -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'.";
     }
 
index 96efdf7..3a9c838 100644 (file)
@@ -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'.";
     }
 
     /**
index b7f9889..0ab07db 100644 (file)
@@ -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'.";
     }
 
     /**
index c13c05c..ff45dd5 100644 (file)
@@ -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'.";
     }
 
     /**
index 4183656..981009a 100644 (file)
@@ -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'.";
     }
 
     /**
index c0f3467..e167ff3 100644 (file)
@@ -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'.";
     }
 
index a56c34e..6bf534b 100644 (file)
@@ -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'.";
     }
 
index 296cce2..1bff789 100644 (file)
@@ -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'.";
     }
 
index ee85714..2585dbc 100644 (file)
@@ -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'.";
     }
 
     /**
index 5604187..34b0558 100644 (file)
@@ -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'.";
     }
 
     /**
index 03625fe..08db996 100644 (file)
@@ -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'.";
     }
 
     /**
index c075bc3..cf8f36f 100644 (file)
@@ -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'.";
     }
 
     /**
index 92d34f9..c5ac3ec 100644 (file)
@@ -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'.";
     }
 
     /**
index 945107a..754e03c 100644 (file)
@@ -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.";
     }
 
     /**
index d818f8f..b14ec1c 100644 (file)
@@ -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'.";
     }
 
     /**
index 87b0b1a..f92cbbe 100644 (file)
@@ -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'.";
     }
 
     /**
index 49bb0c4..4d43d49 100644 (file)
@@ -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'.";
     }
 
     /**