Commit Graph

10 Commits

Author SHA1 Message Date
Chris Dodge
481cbfd8a5 consolidate delete role logic 2013-09-12 15:57:13 -04:00
Chris Dodge
bd69db4410 switch to using get() rather than get_or_create(). Also add a test case with a different casing on the courseId 2013-09-12 14:27:57 -04:00
Chris Dodge
41be20a000 define a unseeding forums permissions and call into it from delete_course
define a unseeding forums permissions and call into it from delete_course

define a unseeding forums permissions and call into it from delete_course
2013-09-12 14:27:57 -04:00
David Ormsbee
3ce87583ab Shift enroll/unenroll logic to CourseEnrollment model, add is_active and mode.
Features coming down the pipe will want to be able to:
* Refer to enrollments before they are actually activated (approval step).
* See what courses a user used to be enrolled in for when they re-enroll in
  the same course, or a different run of that course.
* Have different "modes" of enrolling in a course, representing things like
  honor certificate enrollment, auditing (no certs), etc.

This change adds an is_active flag and mode (with default being "honor").
The commit is only as large as it is because many parts of the codebase were
manipulating enrollments by adding and removing CourseEnrollment objects
directly. It was necessary to create classmethods on CourseEnrollment to
encapsulate this functionality and then port everything over to using them.

The migration to add columns has been tested on a prod replica, and seems to be
fine for running on a live system with single digit millions of rows of
enrollments.
2013-08-14 13:23:06 -04:00
Chris Dodge
470569545d add a migrations to the new django_comment_common to keep things a bit more consistent with our normal useage. 2013-05-22 13:32:32 -04:00
Chris Dodge
d39d44ba49 keep migrations in djangoapp_comment_client 2013-05-10 12:58:00 -04:00
Chris Dodge
3c747f0e6e consolidate the list of permissions 2013-05-07 11:53:02 -04:00
Chris Dodge
81ecf0c5df add unit test to verify forum seeding occurs when creating new courses 2013-05-07 11:18:15 -04:00
Chris Dodge
ae9d13b53a update comment models.py to not have the dependency on get_course_by_id (which is in LMS). Also explicitly set the db_table name because django auto generates table prefixes according to the djangoapp name 2013-05-06 16:04:25 -04:00
Chris Dodge
57eca325d2 move some files from lms/djangoapps/django_comment_client to common/djangoapps/django_comment_common 2013-05-06 15:59:35 -04:00