Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64033

Review course_module_viewed event status over core modules

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.6
    • Assignment
    • 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?

            Unassigned Unassigned
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.