MDL-40912 coursecat: replaced 'hide' and 'show' add_to_log calls with an event