Fixed an error with an if statement in CoursePanel.

Fixed an error with an if statement in CoursePanel.