MDL-39959 events: Replace add_to_log() calls with events for course module actions (create, delete and update)