-
Task
-
Resolution: Unresolved
-
Minor
-
None
-
3.6
-
None
-
MOODLE_36_STABLE
This was discovered in the integraton process of MDL-53035
... I've been looking to all the modules implementation of this stuff, and it seems that there are two alternatives:
- Some modules use xxxx_view() function @ their lib.php file (resources, survey, data, book...)
- Other use xxxx::set_module_viewed() method @ their localib.php file (lesson, assign, feedback...).
Can find all them with ag 'function ([a-z]*_view(|set_module_viewed())'
Does anybody recall the difference? Why do we have such two different ways? Both trigger the corresponding "view" event (\mod_xxxx\event\course_module_viewed::create(), and seem to serve to the same purpose, but it's the duality what mostly called my attention.
BTW, also worth noting that there are big differences about what's added to every event via add_record_snapshot() on each module. Some add nothing, other add the $cm, the $course.
Finally. there is mod_assign now triggering 2 events ("Course module viewed" and "The status of the submission has been viewed"). Is it correct?
- has to be done after
-
MDL-53035 Add course_module_viewed event to mod_assign
-
- Closed
-