It seems this function is actually called from remove_course_contents, so the name is a little weird.
How do we feel about changing it to an event? This function has been there for a long time (I wonder if the OU people added it, I don't think Catalyst did) - potentially we'd b breaking backwards compatibility to just change it over.
Penny Leach
added a comment - It seems this function is actually called from remove_course_contents, so the name is a little weird.
How do we feel about changing it to an event? This function has been there for a long time (I wonder if the OU people added it, I don't think Catalyst did) - potentially we'd b breaking backwards compatibility to just change it over.
hmm, I personally think that now is the right time to refactor/cleanup all APIs - no old code will be working, there are few places properly documented, we have to make a clear distinction what is public x private
Petr Škoda (skodak)
added a comment - hmm, I personally think that now is the right time to refactor/cleanup all APIs - no old code will be working, there are few places properly documented, we have to make a clear distinction what is public x private
Penny Leach
added a comment - Interesting. The notify_local_course_delete function is actually called in remove_course_contents, not in delete_course function.
I propose the following:
1. Throw a new event, course_emptied in remove_course_contents
2. delete the notify_local_course_delete function
delete_course does actually throw a 'course_deleted' event as well.
Petr Škoda (skodak)
added a comment - I have cleaned up the course delete code a bit and added the new event that is triggered after removing course content, thanks
maybe we could use events instead - seems much cleaner solution