'Adds the given user to the CourseTeam.'

def add_user(self, user):

    if (not CourseEnrollment.is_enrolled(user, self.course_id)):
        raise NotEnrolledInCourseForTeam
    if CourseTeamMembership.user_in_team_for_course(user, self.course_id):
        raise AlreadyOnTeamInCourse
    return CourseTeamMembership.objects.create(user=user, team=self)
