MDL-40912 coursecat: replaced 'add' add_to_log call with an event
MDL-40912 coursecat: replaced 'update' add_to_log call with an event