added getcourseId function