MDL-43238 events: Added event other information in event php doc block
authorRajesh Taneja <rajesh@moodle.com>
Fri, 3 Jan 2014 07:03:48 +0000 (15:03 +0800)
committerRajesh Taneja <rajesh@moodle.com>
Fri, 3 Jan 2014 07:03:48 +0000 (15:03 +0800)
76 files changed:
lib/classes/event/assessable_uploaded.php
lib/classes/event/blog_association_created.php
lib/classes/event/blog_entries_viewed.php
lib/classes/event/comment_created.php
lib/classes/event/comment_deleted.php
lib/classes/event/content_viewed.php
lib/classes/event/course_category_deleted.php
lib/classes/event/course_content_deleted.php
lib/classes/event/course_created.php
lib/classes/event/course_deleted.php
lib/classes/event/course_module_created.php
lib/classes/event/course_module_deleted.php
lib/classes/event/course_module_updated.php
lib/classes/event/course_reset_ended.php
lib/classes/event/course_reset_started.php
lib/classes/event/course_restored.php
lib/classes/event/course_section_updated.php
lib/classes/event/course_updated.php
lib/classes/event/group_member_added.php
lib/classes/event/note_created.php
lib/classes/event/note_deleted.php
lib/classes/event/note_updated.php
lib/classes/event/notes_viewed.php
lib/classes/event/role_assigned.php
lib/classes/event/role_deleted.php
lib/classes/event/role_unassigned.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_enrolment_updated.php
lib/classes/event/user_list_viewed.php
lib/classes/event/user_loggedin.php
lib/classes/event/user_loggedinas.php
lib/classes/event/user_loggedout.php
lib/classes/event/user_profile_viewed.php
lib/classes/event/webservice_function_called.php
lib/classes/event/webservice_login_failed.php
lib/classes/event/webservice_service_created.php
lib/classes/event/webservice_token_created.php
mod/assign/classes/event/assessable_submitted.php
mod/assign/classes/event/marker_updated.php
mod/assign/classes/event/submission_status_updated.php
mod/assign/classes/event/workflow_state_updated.php
mod/assign/submission/file/classes/event/assessable_uploaded.php
mod/assign/submission/onlinetext/classes/event/assessable_uploaded.php
mod/assignment/type/online/classes/event/assessable_uploaded.php
mod/assignment/type/upload/classes/event/assessable_submitted.php
mod/assignment/type/upload/classes/event/assessable_uploaded.php
mod/chat/classes/event/sessions_viewed.php
mod/choice/classes/event/answer_submitted.php
mod/choice/classes/event/answer_updated.php
mod/choice/classes/event/report_viewed.php
mod/feedback/classes/event/course_module_viewed.php
mod/feedback/classes/event/response_deleted.php
mod/feedback/classes/event/response_submitted.php
mod/forum/classes/event/assessable_uploaded.php
mod/lti/classes/event/unknown_service_api_called.php
mod/quiz/classes/event/attempt_abandoned.php
mod/quiz/classes/event/attempt_becameoverdue.php
mod/quiz/classes/event/attempt_submitted.php
mod/wiki/classes/event/comment_created.php
mod/wiki/classes/event/comment_deleted.php
mod/wiki/classes/event/page_deleted.php
mod/wiki/classes/event/page_diff_viewed.php
mod/wiki/classes/event/page_locks_deleted.php
mod/wiki/classes/event/page_map_viewed.php
mod/wiki/classes/event/page_updated.php
mod/wiki/classes/event/page_version_deleted.php
mod/wiki/classes/event/page_version_restored.php
mod/wiki/classes/event/page_version_viewed.php
mod/workshop/classes/event/assessable_uploaded.php
report/log/classes/event/content_viewed.php
report/loglive/classes/event/content_viewed.php
report/outline/classes/event/content_viewed.php
report/participation/classes/event/content_viewed.php
report/stats/classes/event/content_viewed.php

index 4e4ed8d..46aa825 100644 (file)
@@ -36,6 +36,13 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Both events could be triggered in a row, first the uploaded, then the submitted.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type array pathnamehashes uploaded files path name hashes.
+ *      @type string content string.
+ * }
+ *
  * @package    core
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 5670f52..0e7da1c 100644 (file)
@@ -29,6 +29,15 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Class for event to be triggered when a new blog entry is associated with a context.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string associatetype type of blog association, course/coursemodule.
+ *      @type int blogid id of blog.
+ *      @type int associateid id of associate.
+ *      @type string subject blog subject.
+ * }
+ *
  * @package    core
  * @copyright  2013 onwards Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index bf4dbaf..d0119fa 100644 (file)
@@ -29,6 +29,12 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Class for event to be triggered when blog entries are viewed.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int courseid id of associated course.
+ * }
+ *
  * @package    core
  * @copyright  2013 onwards Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index abee52e..cebf7c5 100644 (file)
@@ -31,6 +31,12 @@ defined('MOODLE_INTERNAL') || die();
  *
  * This class has to be extended by any event which is triggred while creating new comment.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int itemid id of item for which comment is added.
+ * }
+ *
  * @package    core
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index f6a2004..69c43c6 100644 (file)
@@ -31,6 +31,12 @@ defined('MOODLE_INTERNAL') || die();
  *
  * This class has to be extended by any event which is triggred while deleting comment.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int itemid id of item for which comment is deleted.
+ * }
+ *
  * @package    core
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 7492bd1..17f0328 100644 (file)
@@ -39,6 +39,12 @@ defined('MOODLE_INTERNAL') || die();
  *  $event->trigger();
  * where \report_participation\event\content_viewed extends \core\event\content_viewed
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string content viewed content identifier.
+ * }
+ *
  * @package    core
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index ff7ecf3..a856ef1 100644 (file)
@@ -19,7 +19,13 @@ namespace core\event;
 defined('MOODLE_INTERNAL') || die();
 
 /**
- * category deleted event.
+ * Category deleted event.
+ *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string name category name.
+ * }
  *
  * @package    core
  * @copyright  2013 Mark Nelson <markn@moodle.com>
index 92fc9a6..d5b6624 100644 (file)
@@ -21,6 +21,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Course content_deleted event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type array options list of options which were skipped while deleting course content.
+ * }
+ *
  * @package    core
  * @copyright  2013 Mark Nelson <markn@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index deeacb4..57eb640 100644 (file)
@@ -21,6 +21,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Course created event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string shortname shortname of course.
+ *      @type string fullname fullname of course.
+ * }
+ *
  * @package    core
  * @copyright  2013 Mark Nelson <markn@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 0f704a7..0580e7c 100644 (file)
@@ -21,6 +21,14 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Course deleted event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string shortname shortname of course.
+ *      @type string fullname fullname of course.
+ *      @type string idnumber id number of course.
+ * }
+ *
  * @package    core
  * @copyright  2013 Mark Nelson <markn@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 9ed6fc8..2c481a8 100644 (file)
 /**
  * Event to be triggered when a new course module is created.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string modulename name of module created.
+ *      @type string name title of module.
+ *      @type string instanceid id of module instance.
+ * }
+ *
  * @package    core
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
index 67a4b02..d00a43a 100644 (file)
@@ -30,6 +30,13 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Class for event to be triggered when a course module is deleted.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string modulename name of module deleted.
+ *      @type string instanceid id of module instance.
+ * }
+ *
  * @package    core
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
index ced4210..99e61f8 100644 (file)
@@ -30,6 +30,14 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Class for event to be triggered when a course module is updated.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string modulename name of module updated.
+ *      @type string name title of module.
+ *      @type string instanceid id of module instance.
+ * }
+ *
  * @package    core
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
index 56e1009..5c8f280 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * core course reset ended event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type array reset_options all reset options settings including courseid.
+ * }
+ *
  * @package    core
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 8a34a75..f28d6de 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * core course reset started event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type array reset_options all reset options settings including courseid.
+ * }
+ *
  * @package    core
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 2f8fa4f..8e7af36 100644 (file)
@@ -21,6 +21,16 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Course restored event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string type restore type, activity, course or section.
+ *      @type int target where restored (new/existing/current/adding/deleting)
+ *      @type int mode execution mode
+ *      @type string opertaion restore
+ *      @type boolean samesite true is restored to same site.
+ * }
+ *
  * @package    core
  * @copyright  2013 Mark Nelson <markn@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 5a7d9e0..60760e5 100644 (file)
@@ -29,6 +29,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Course section updated.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int sectionnum section number.
+ * }
+ *
  * @package    core
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index c037d20..47ab3af 100644 (file)
@@ -21,6 +21,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Course updated event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string shortname shortname of course.
+ *      @type string fullname fullname of course.
+ * }
+ *
  * @package    core
  * @copyright  2013 Mark Nelson <markn@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index df1c2d1..6855e15 100644 (file)
@@ -28,6 +28,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * core_group member added event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string component name of component
+ *      @type int itemid id of item.
+ * }
+ *
  * @package    core_group
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 838ba8c..e3ce2ab 100644 (file)
@@ -31,6 +31,12 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Class for event to be triggered when a note is created.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string publishstate publish state.
+ * }
+ *
  * @package    core
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 45249fe..52f9182 100644 (file)
@@ -31,6 +31,12 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Class for event to be triggered when a note is deleted.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string publishstate publish state
+ * }
+ *
  * @package    core
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index df3ac78..fb94617 100644 (file)
@@ -31,6 +31,12 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Class for event to be triggered when a note is updated.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string publishstate publish state.
+ * }
+ *
  * @package    core
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 3680fc4..a298106 100644 (file)
@@ -31,6 +31,12 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Class for event to be triggered when a note is viewed.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string content hard-coded to notes.
+ * }
+ *
  * @package    core
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 5213900..f22fd16 100644 (file)
@@ -21,6 +21,14 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Role assigned event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int id role assigned id.
+ *      @type string component name of component.
+ *      @type int itemid id of item.
+ * }
+ *
  * @package    core
  * @copyright  2013 Petr Skoda {@link http://skodak.org}
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index d11dab8..ae150c8 100644 (file)
@@ -21,6 +21,14 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Role assigned event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string shortname shortname of role.
+ *      @type string description role description.
+ *      @type string archetype role type.
+ * }
+ *
  * @package    core_event
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 2e5a986..f3d0850 100644 (file)
@@ -21,6 +21,14 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Role unassigned event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int id role assigned id.
+ *      @type string component name of component.
+ *      @type int itemid id of item.
+ * }
+ *
  * @package    core
  * @copyright  2013 Petr Skoda {@link http://skodak.org}
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index e04ee16..fdc68c8 100644 (file)
@@ -28,6 +28,16 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Event when user profile is deleted.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string username name of user.
+ *      @type string email user email.
+ *      @type string idnumber user idnumber.
+ *      @type string picture user picture.
+ *      @type int mnethostid mnet host id.
+ * }
+ *
  * @package    core
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 064ccf5..c5e0d0e 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Event when user is enrolled in a course.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string enrol name of enrolment instance.
+ * }
+ *
  * @package    core
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 8992347..4376a2b 100644 (file)
 /**
  * User enrolment deleted event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string enrol name of enrolment instance.
+ *      @type array userenrolment user_enrolment record.
+ * }
+ *
  * @package    core
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 8e53236..69e71de 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Event when user enrolment is updated.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string enrol name of enrolment instance.
+ * }
+ *
  * @package    core
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 45aa787..fce1f0d 100644 (file)
 /**
  * Defines the user list viewed event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int courseid id of course.
+ *      @type string courseshortname short name of course.
+ *      @type string coursefullname full name of course.
+ * }
+ *
  * @package    core
  * @copyright  2013 Mark Nelson <markn@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 9628e31..0bb4e17 100644 (file)
@@ -29,6 +29,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * User login event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string username name of user.
+ * }
+ *
  * @package    core
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 50012d8..136307d 100644 (file)
@@ -29,6 +29,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * User loggedinas event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string originalusername original username.
+ *      @type string loggedinasusername username of logged in as user.
+ * }
+ *
  * @package    core
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 8f2c6aa..d17f0bf 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Event when user logout.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string sessionid session id.
+ * }
+ *
  * @package    core
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index af9f228..eefc9bf 100644 (file)
 /**
  * Defines the user profile viewed event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int courseid id of course.
+ *      @type string courseshortname short name of course.
+ *      @type string coursefullname fullname of course.
+ * }
+ *
  * @package    core
  * @copyright  2013 Mark Nelson <markn@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 9914385..1334784 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * core webservice function_called event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string function name of the function.
+ * }
+ *
  * @package    core
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 395e91b..9ababb0 100644 (file)
@@ -28,6 +28,14 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * core web service login_failed event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string method authentication method.
+ *      @type string reason failure reason.
+ *      @type string tokenid id of token.
+ * }
+ *
  * @package    core
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 436a236..22fd29c 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * core webservice service created event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string sessionid session id.
+ * }
+ *
  * @package    core
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 5f18336..d5799e0 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * core webservice token_created event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type bool auto automatically created.
+ * }
+ *
  * @package    core
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 7c67ad9..5e7d6e8 100644 (file)
@@ -29,6 +29,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_assign assessable submitted event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type bool submission_editable is submission editable.
+ * }
+ *
  * @package    mod_assign
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 2596e9b..616005d 100644 (file)
@@ -29,6 +29,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_assign marker updated event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int markerid userid id of marker.
+ * }
+ *
  * @package    mod_assign
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 731be58..32be18b 100644 (file)
@@ -29,6 +29,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_assign submission status updated event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string newstatus status of submission.
+ * }
+ *
  * @package    mod_assign
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 00c7812..6ccdf0d 100644 (file)
@@ -29,6 +29,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_assign workflow state updated event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string newstatus status of submission.
+ * }
+ *
  * @package    mod_assign
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 0f2ccc7..b32eb00 100644 (file)
@@ -29,6 +29,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * assignsubmission_file assessable uploaded event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type array pathnamehashes uploaded files path name hash.
+ *      @type string content empty string.
+ * }
+ *
  * @package    assignsubmission_file
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 179319e..07a6b35 100644 (file)
@@ -29,6 +29,14 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * assignsubmission_onlinetext assessable uploaded event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type array pathnamehashes uploaded files path name hashes.
+ *      @type string content string.
+ *      @type string format content format.
+ * }
+ *
  * @package    assignsubmission_onlinetext
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -100,4 +108,16 @@ class assessable_uploaded extends \core\event\assessable_uploaded {
         $this->data['objecttable'] = 'assign_submission';
     }
 
+    /**
+     * Validation that should be shared among child classes.
+     *
+     * @throws \coding_exception when validation fails.
+     * @return void
+     */
+    protected function validate_data() {
+        parent::validate_data();
+        if (!isset($this->other['format']) || !is_string($this->other['format'])) {
+            throw new \coding_exception('format must be set in $other and must be a string.');
+        }
+    }
 }
index d1659b0..1a9c8a3 100644 (file)
@@ -29,6 +29,14 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * assignment_online assessable uploaded event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type array pathnamehashes uploaded files path name hashes.
+ *      @type string content submission text.
+ *      @type string triggeredfrom name of the function from which it is triggred.
+ * }
+ *
  * @package    assignment_online
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 5a0f2c5..5318d4a 100644 (file)
@@ -29,6 +29,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * assignment_submitted assessable uploaded event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int assignmentid assignment id.
+ *      @type bool submission_editable is submission editable.
+ * }
+ *
  * @package    assignment_submitted
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -117,5 +124,8 @@ class assessable_submitted extends \core\event\assessable_submitted {
         if (!isset($this->other['submission_editable'])) {
             throw new \coding_exception('Other must contain the key submission_editable.');
         }
+        if (!isset($this->other['assignmentid'])) {
+            throw new \coding_exception('Other must contain the key assignmentid.');
+        }
     }
 }
index 697456b..1d3a776 100644 (file)
@@ -29,6 +29,14 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * assignment_upload assessable uploaded event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type array pathnamehashes uploaded files path name hashes.
+ *      @type string content empty string.
+ *      @type int assignmentid assignment id.
+ * }
+ *
  * @package    assignment_upload
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index e18562b..766ac9a 100644 (file)
@@ -28,6 +28,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_chat sessions viewed event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int start start of period.
+ *      @type int end end of period.
+ * }
+ *
  * @package    mod_chat
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 2b3e673..999a969 100644 (file)
@@ -29,6 +29,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_choice answer submitted event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int choiceid id of choice.
+ *      @type int optionid id of option
+ * }
+ *
  * @package    mod_choice
  * @copyright  2013 Adrian Greeve <adrian@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index be548b7..eb0a276 100644 (file)
@@ -29,6 +29,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_choice answer updated event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int choiceid id of choice.
+ *      @type int optionid id of option
+ * }
+ *
  * @package    mod_choice
  * @copyright  2013 Adrian Greeve <adrian@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 88299ea..acf1394 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Event for when a choice activity report is viewed.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string content viewed content identifier.
+ * }
+ *
  * @package mod_choice
  * @copyright 2013 Adrian Greeve
  * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 637a3ed..bbe47c0 100644 (file)
@@ -28,6 +28,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Event for when a feedback activity is viewed.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int anonymous if feedback is anonymous.
+ *      @type int cmid course module id.
+ * }
+ *
  * @package    mod_feedback
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 49bee25..be00b5e 100644 (file)
@@ -30,6 +30,14 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Class for event to be triggered when a feedback response is deleted.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int anonymous if feedback is anonymous.
+ *      @type int cmid course module id.
+ *      @type int instanceid id of instance.
+ * }
+ *
  * @package    mod_feedback
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
index 74abca9..600fd27 100644 (file)
@@ -30,6 +30,14 @@ defined('MOODLE_INTERNAL') || die();
  *
  * Class for event to be triggered when a feedback response is submitted.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int anonymous if feedback is anonymous.
+ *      @type int cmid course module id.
+ *      @type int instanceid id of instance.
+ * }
+ *
  * @package    mod_feedback
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
index db25779..5cbfd3c 100644 (file)
@@ -29,6 +29,15 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_forum assessable uploaded event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type array pathnamehashes uploaded files path name hashes.
+ *      @type string content post discussion message.
+ *      @type int discussionid id of discussion.
+ *      @type string triggeredfrom name of the function from where event is triggred.
+ * }
+ *
  * @package    mod_forum
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index dad8f78..9e6dff7 100644 (file)
@@ -28,6 +28,16 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Event for when something happens with an unknown lti service API call.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string body raw body.
+ *      @type string messageid id of message.
+ *      @type string messagetype type of message.
+ *      @type string consumerkey key of consumer.
+ *      @type string sharedsecret shared secret key.
+ * }
+ *
  * @package    mod_lti
  * @copyright  2013 Adrian Greeve <adrian@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 5b6f439..eacdd70 100644 (file)
@@ -27,6 +27,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Event for when a quiz attempt is abandoned.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int submitterid id of submitter.
+ * }
+ *
  * @package    mod_quiz
  * @copyright  2013 Adrian Greeve <adrian@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index e6ca398..ad8a087 100644 (file)
@@ -30,6 +30,12 @@ defined('MOODLE_INTERNAL') || die();
  * Please note that the name of this event is not following the event naming convention.
  * Its name should not be used as a reference for other events to be created.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int submitterid id of submitter.
+ * }
+ *
  * @package    mod_quiz
  * @copyright  2013 Adrian Greeve <adrian@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 83d54f5..476ca3c 100644 (file)
@@ -27,6 +27,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * Event for when a quiz attempt is submitted.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int submitterid id of submitter.
+ * }
+ *
  * @package    mod_quiz
  * @copyright  2013 Adrian Greeve <adrian@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index bbc4a58..904039a 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_wiki comment created event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int itemid id of item for which comment is created.
+ * }
+ *
  * @package    mod_wiki
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 1e3c757..48ab637 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_wiki comment deleted event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int itemid id of item for which comment is deleted.
+ * }
+ *
  * @package    mod_wiki
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 44432e0..b129f37 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_wiki page deleted.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int subwikiid id subwiki.
+ * }
+ *
  * @package    mod_wiki
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 487ae03..a1d69a8 100644 (file)
@@ -28,6 +28,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_wiki diff viewed event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int comparewith version number to compare with.
+ *      @type int compare version number to compare.
+ * }
+ *
  * @package    mod_wiki
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index b7cead2..5aee13b 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_wiki page locks deleted (override locks)
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int section section id.
+ * }
+ *
  * @package    mod_wiki
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 251b7c2..8b94fd4 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_wiki map viewed event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int option map option viewed.
+ * }
+ *
  * @package    mod_wiki
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 2c9737f..e39aa34 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_wiki page updated.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string newcontent updated content.
+ * }
+ *
  * @package    mod_wiki
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index dc0b6ce..622d8e1 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_wiki page version deleted.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int pageid id wiki page.
+ * }
+ *
  * @package    mod_wiki
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 435e009..601c635 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_wiki version restored event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int pageid id wiki page.
+ * }
+ *
  * @package    mod_wiki
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 8239c43..c641933 100644 (file)
@@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_wiki version viewed event.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type int versionid id page version.
+ * }
+ *
  * @package    mod_wiki
  * @copyright  2013 Rajesh Taneja <rajesh@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index a1c3f53..bef08cd 100644 (file)
@@ -29,6 +29,13 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * mod_workshop assessable uploaded event class.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type array pathnamehashes uploaded files path name hashes.
+ *      @type string content string.
+ * }
+ *
  * @package    mod_workshop
  * @copyright  2013 Frédéric Massart
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index a5a0510..b6d677e 100644 (file)
@@ -26,6 +26,13 @@ namespace report_log\event;
 /**
  * Event triggered, when some content in log report is viewed.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string content viewed content identifier.
+ *      @type string url (optional) url of report page.
+ * }
+ *
  * @package    report_log
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 1038322..8dea5b2 100644 (file)
@@ -26,6 +26,13 @@ namespace report_loglive\event;
 /**
  * Event triggered, when some content in loglive report is viewed.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string content viewed content identifier.
+ *      @type string url (optional) url of report page.
+ * }
+ *
  * @package    report_loglive
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 97f1b0d..8ae1618 100644 (file)
@@ -26,6 +26,13 @@ namespace report_outline\event;
 /**
  * Event for when some content in outline report is viewed.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string content viewed content identifier.
+ *      @type string url (optional) url of report page.
+ * }
+ *
  * @package    report_outline
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index 1702628..5918f57 100644 (file)
@@ -26,6 +26,13 @@ namespace report_participation\event;
 /**
  * Event triggered, when some content in participation report is viewed.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string content viewed content identifier.
+ *      @type string url (optional) url of report page.
+ * }
+ *
  * @package    report_participation
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index e29544c..836cde8 100644 (file)
@@ -26,6 +26,13 @@ namespace report_stats\event;
 /**
  * Event triggered, when some content in stats report is viewed.
  *
+ * @property-read array $other {
+ *      Extra information about event.
+ *
+ *      @type string content viewed content identifier.
+ *      @type string url (optional) url of report page.
+ * }
+ *
  * @package    report_stats
  * @copyright  2013 Ankit Agarwal
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later