MDL-40915 events: Replace add_to_log with events in calendar
MDL-40915 events: Add unit tests for the events