Added function to get all courses and example usage in index.html