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

POLICY: Decide on content identifier format for content_viewed events

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.5.1
    • Policy
    • MOODLE_25_STABLE

      We have created abstract class \core\event\content_viewed which would be extended by various modules and triggered to record a content viewed action.

      The content that is viewed is identified by the field $other['content'] in the event.

      Issues:-

      1. Just having an identifier doesn't really describe in detail the content that was viewed.
      2. There is no guidelines for what value should be used for identifiers.

      Suggestion:-

      1. content_viewed classes should define a constant for each of different content which uses this event.
      2. Identifier should not have spaces and have all letters in lower case. Underscores can be allowed.
      3. $event->get_description() should pass on a more appropriate description based on $other['content'] identifier.

            stronk7 Eloy Lafuente (stronk7)
            ankit_frenz Ankit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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