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

Local plugin hooking \core\event\coursecompletion to update external database

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 4.1
    • Events API
    • None
    • MOODLE_401_STABLE

      Dear developers,

      I have to update an external database table (with the date of course completion) every time a student complete a course. 

      The best idea I found is to write a local plugin with an observer to the event \core\event\coursecompletion.

      In the callback function I wrote a procedure to update an external database. 

      When a student completes a course the event is fired but the external database is not updated. No error (syntax or db) is raised and I'm no able to check or modify code. 

      I wrote the hook in local_plugin\db\events.php and the callback function in local_plugin\classes\observer.php 

      Any idea of alternative and better solution ?

      Thanks.

       

       

            Unassigned Unassigned
            nicola_vallinoto Nicola Vallinoto
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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