Fix bug in the check_user_can_view_course function. Filter courses in home view.