Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.3, 2.4
    • Fix Version/s: 2.3.2
    • Component/s: Course completion
    • Labels:
    • Testing Instructions:
      Hide

      NOTE: Will require developer to test.

      Write some code to react to the "course_completed" event, or even just add a breakpoint in events_trigger();

      Trigger a course completion:
      1) Enable Course completion in advanced settings
      2) Create course with completion enabled
      3) Tick "Self Completion" criteria on Completion tracking page
      4) Add "Self completion" block to course page
      5) Enrol user in course, login as user, complete course view the Self completion block
      6) Run cron (course_completed event should trigger from the cron)

      Event data supplied in event should match the corresponding record in the course_completions table.

      Show
      NOTE: Will require developer to test. Write some code to react to the "course_completed" event, or even just add a breakpoint in events_trigger(); Trigger a course completion: 1) Enable Course completion in advanced settings 2) Create course with completion enabled 3) Tick "Self Completion" criteria on Completion tracking page 4) Add "Self completion" block to course page 5) Enrol user in course, login as user, complete course view the Self completion block 6) Run cron (course_completed event should trigger from the cron) Event data supplied in event should match the corresponding record in the course_completions table.
    • Workaround:
      Hide

      People have worked around it by checking cmi.core.lesson_status to see if one particular SCORM was completed.
      That does not always mean the entire course is complete, and it's driven by polling rater than an event.

      Show
      People have worked around it by checking cmi.core.lesson_status to see if one particular SCORM was completed. That does not always mean the entire course is complete, and it's driven by polling rater than an event.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:

      Description

      A "course completed" event is documented on the events wish list. Implementing it appears to be a one line addition.

      Would it make sense to add:

      events_trigger('completed_course', $this);

      to lib/completion/completion_completion.php so that other modules can act when a course is completed,
      to send notifications for example, or notify an external institutional system, or to issue a certificate,
      or open up a post requisite course - whatever modules want to do when a course is completed?

      In our case, we wish to notify the university level system that the course has been completed, but it seems
      that a "completed_course" event would be useful in many ways. Is lib/completion/completion_completion.php the
      right place to add that?

      See also:
      http://moodle.org/mod/forum/discuss.php?d=207586#p909679

      PS I used the name "completed_course" so that "completed_" could later be a common prefix for "completed_activity", "completed_quiz" etc. as needed in the future.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/12