Added function to onclick

Added a function to an onclick for updating course table