Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Event 2: Difference between revisions

From MoodleDocs
(Created page with "Question: Should subplugins trigger events using the name of the parent module (e.g. the assignsubmission_comments subplugin can trigger assign_submissioncommented ?) Also - wh...")
 
No edit summary
Line 6: Line 6:


e.g. A teacher grades a submission - the subjects should be all of (teacher, student, assignment and submission).
e.g. A teacher grades a submission - the subjects should be all of (teacher, student, assignment and submission).
Damyon, anybody can trigger event defined in another place. For example plugins can trigger the core events and subplugins can trigger events defined in plugin. It's just most common the plugin who defines event triggers it.
"Teacher grades a submission": teacher is the actor, submission is a subject. Student is not really related here :)
[[User:Marina Glancy|Marina Glancy]] 12:26, 21 May 2013 (WST)

Revision as of 04:26, 21 May 2013

Question:

Should subplugins trigger events using the name of the parent module (e.g. the assignsubmission_comments subplugin can trigger assign_submissioncommented ?)

Also - why are we assuming there is only a single subject for an event?

e.g. A teacher grades a submission - the subjects should be all of (teacher, student, assignment and submission).

Damyon, anybody can trigger event defined in another place. For example plugins can trigger the core events and subplugins can trigger events defined in plugin. It's just most common the plugin who defines event triggers it. "Teacher grades a submission": teacher is the actor, submission is a subject. Student is not really related here :) Marina Glancy 12:26, 21 May 2013 (WST)