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

Add course_module_viewed event to mod_assign

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9.4, 3.0.2
    • Fix Version/s: 3.6
    • Component/s: Assignment, Events API
    • Labels:
    • Testing Instructions:
      Hide

      Covered by PHPUnit test.

      Setup

      1. Login as admin or teacher
      2. Create a course "C1"
      3. Create an assignment "Assignment 1"

      Test

      1. On the C1 course home page follow "Assignment 1".
      2. Go to "Course administration > Reports > Logs"
      3. Press "Get these logs" button.
      4. Confirm exists a log entry for the "Course module viewed" event.
      Show
      Covered by PHPUnit test. Setup Login as admin or teacher Create a course "C1" Create an assignment "Assignment 1" Test On the C1 course home page follow "Assignment 1". Go to "Course administration > Reports > Logs" Press "Get these logs" button. Confirm exists a log entry for the "Course module viewed" event.
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-53035-master

      Description

      Most core activities raise a course_module_viewed event when their view.php page is accessed, but mod_assign is an exception (as are assignment and label).

      It would be useful if mod_assign were to throw an event to log that a user had viewed the module.

      A good example of where this would be useful is in the logstore_xapi plugin, which currently logs the viewing of all other modules but can't log a generic "viewed" event as it isn't raised: https://github.com/jlowe64/moodle-logstore_xapi/issues/46. Many of the actions done by the view page raise their own specific events, but it is difficult to actually determine that a user has simply viewed the module.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Dec/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m