edx/edx-platform — pull request #651 by ormsbee (2013-08-12 20:27:26+00:00)
Title: Add mode and is_active to CourseEnrollment, shift enrollment logic to model

Add a mode field to allow us to support different kinds of enrollments (all current enrollments are honor code enrollments). Also add an is_active flag. This will let us do things like have an approval step before a CourseEnrollment is activated, as well as track what courses a person *used* to be signed up for, in case that information is necessary to determine their eligibility for other courses.

There's actually a lot more that I'd eventually like to move into CourseEnrollment (knowledge of courses, permissions, CourseEnrollmentAllowed, etc.) But shifting enroll/unenroll/is_enrolled was good enough for what I needed in the short term goal of supporting is_active as the toggle.

@dianakhuang: I still need to add some docs for this and test the migration on fake prod before I can merge this, but the code should be reviewable at this point.