Commit Graph

13 Commits

Author SHA1 Message Date
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
Ned Batchelder
a484224ef5 Remove pointless addition tests 2013-06-27 16:27:39 -04:00
Ned Batchelder
61b53713d2 Remove unused imports from lms, as detected by pylint. 2013-06-19 16:56:34 -04:00
John Hess
94db91fcef Cast cursor responses as lists. MySQL returns them as tuples.
Removed print statemetns
Moved import call to top of file
2013-03-04 18:19:24 -05:00
John Hess
02e30f5072 Cleaned up admin_dashboard code and template 2013-02-28 11:11:57 -05:00
John Hess
2f5e1b9cc0 Readable admin_dashboard 2013-02-28 10:54:57 -05:00
Calen Pennington
cfae1cdf62 Pep8 autofixes 2013-02-06 11:13:50 -05:00
John Hess
2cf4b28cf7 added additional query to show number of users with any given number of registrations (power users) 2012-08-27 19:22:19 -04:00
John Hess
a9a73561f4 updated admin_dashboard to show count of unique students 2012-08-27 19:05:00 -04:00
Calen Pennington
442fb6e839 Pass the cursor, rather than the output of cursor.execute, to dictfetchall 2012-08-01 16:19:29 -04:00
Piotr Mitros
2df7e02e31 Fixed comment 2012-07-27 10:23:44 -04:00
Piotr Mitros
6db146f6b4 Missing files 2012-07-27 10:19:51 -04:00
Piotr Mitros
c8b2b4d464 Miniture staff dashboard. Not really tested, but should be safe to merge 2012-07-27 10:14:07 -04:00