Commit Graph

64 Commits

Author SHA1 Message Date
Julia Hansbrough
e4ebb586e8 Update mode appropriately when user enrolls
The "mode" was remaining unchanged when a student unenrolled & re-enrolled in a course--i.e., someone who was verified when first registering would still be verified when unenrolling and re-registering in audit mode.  This commit fixes this problem.

LMS-1526
2013-11-25 21:20:15 +00:00
Diana Huang
7a56e00d53 Merge pull request #1604 from edx/jarv/verified-certs
Jarv/verified certs
2013-11-25 07:37:13 -08:00
Diana Huang
696f1df043 Pass through the certificate mode correctly. 2013-11-20 17:05:57 -05:00
Julia Hansbrough
bc4ebfdc40 Merge pull request #1693 from edx/flowerhack/fix/password-reset-messages
Fixed password reset message
2013-11-19 13:19:33 -08:00
Julia Hansbrough
87238e6d93 Removed null bits 2013-11-19 20:24:58 +00:00
Julia Hansbrough
dac5d2ac0e Merge pull request #1634 from edx/flowerhack/feature/refactor-to-track-enrollment
Flowerhack/feature/refactor to track enrollment
2013-11-19 06:27:22 -08:00
Julia Hansbrough
41b73d8f48 Basic test fix 2013-11-18 23:03:18 +00:00
Julia Hansbrough
f950ea106d response to CR 2013-11-15 15:38:21 +00:00
Julia Hansbrough
e73489ec31 Response to CR 2013-11-14 22:34:18 +00:00
Calen Pennington
061a46beef Formalize various access roles as objects
This centralizes the logic for group membership, and means that we
don't need to make queries to find out whether the legacy groups names exist.
2013-11-13 13:42:37 -05:00
Julia Hansbrough
73af5d017e Changed create_enrollment to create_or_update_enrollment 2013-11-08 19:01:51 +00:00
Julia Hansbrough
05996a71df Added expiration_datetime field to CourseModes
Added an expiration_datetime field to CourseModes, intended to eventually replace expiration_date.

Included relevant schema and data migration file.

LMS-1454
2013-11-08 15:30:37 +00:00
Gabe Mulley
3377cb66c9 emit enrollment event 2013-11-06 15:09:33 -05:00
Gabe Mulley
5aa19c08b5 Revert "emit enrollment event"
This reverts commit 5734cae1c3.
2013-11-06 14:35:28 -05:00
Gabe Mulley
5734cae1c3 emit enrollment event 2013-11-06 08:46:40 -05:00
Sarina Canelake
939dbb6c9d Merge pull request #1579 from edx/sarina/enhance-user-factories
Sarina/enhance user factories
2013-11-05 07:31:00 -08:00
Sarina Canelake
ea529b8841 Fix instructor api tests 2013-11-05 09:26:32 -05:00
Julia Hansbrough
1a3f4cb8f8 Moved can_refund logic to CourseEnrollment 2013-11-04 18:48:43 +00:00
Julia Hansbrough
7ab8142e82 Response to Dave & Diana's CR 2013-11-04 18:38:44 +00:00
Julia Hansbrough
fcab46b138 Refactored to use signals; full test coverage 2013-11-04 18:38:42 +00:00
Julia Hansbrough
63940141c8 End-to-end refunding with tests 2013-11-04 18:37:55 +00:00
Julia Hansbrough
045e69f3c5 Can check verified-ness and expiration date 2013-11-04 18:37:54 +00:00
Sarina Canelake
198452cd1c Adds Staff and Instructor factories 2013-11-04 11:38:43 -05:00
Don Mitchell
f41816637e RESTful refactoring of /course access continued
Move index access into the url
Move course creation into the url
Add helper methods for testing to serialize json data and set accept header.
2013-10-30 13:28:22 -04:00
Diana Huang
92c94b5317 Merge pull request #1483 from edx/diana/certs-upgrade-path
Verified Certificate Upsell
2013-10-28 14:28:50 -07:00
Diana Huang
35ebdfdca4 Better handling of the expiration date.
LMS-1127
2013-10-28 14:39:46 -04:00
Diana Huang
23762a1569 Move more logic into the views
Also includes some tests

Story: LMS-1127
2013-10-25 15:29:44 -04:00
Usman Khalid
6ddd0ae5ab student.tests: Added db access in mock_render_to_response() to test any issues with @transaction.commit_manually 2013-10-25 15:02:52 +00:00
Sarina Canelake
9fb1d9ecf2 Remove 'Email Settings' link on student dashboard for unauth courses 2013-10-17 15:10:47 -04:00
Adam Palay
1fc993ce18 add functionality to disable users
add middleware to detect students with disabled accounts

add tests
2013-10-16 16:57:11 -04:00
Jason Bau
667a1eadb5 Stanford paid course registration
With tests, some settings changes
(all should default to not breaking anything for edx)

Added styling for shopping cart User Experience
- Styled shoppingcart list page
- Styled navigation shopping cart button
- Styled receipt page
- Styled course about page for shopping cart courses

Addressed HTML/SCSS issues

Remove offending body class and unnecessary sass changes

Addresses many review comments on stanford shopping cart

* framework for generating order instructions on receipt page
  in shoppingcart.models
* move user_cart_has_item into shoppingcart.models
* move min_course_price_for_currency into course_modes.models
* remove auto activation on purchase
* 2-space indents in templates
* etc

revert indentation on navigation.html for ease of review

pep8 pylint

move logging/error handling from shoppingcart view to model

Addressing @dave changes
2013-09-26 18:25:00 -07:00
Julian Arni
1a0b752a81 Review fixes 2013-09-24 14:59:07 -04:00
Jason Bau
6a850e27bb Address @brianhw review comments
* Fix open redirect vulnerability
* Add Logging To AUDIT_LOG : Note I had to change existing tests
  that mocked AUDIT_LOG with this
* Use external_auth.views.SHIBBOLETH_DOMAIN_PREFIX in student.views
* Add a bunch of documentation
* PEP8 / Pylint
2013-09-06 15:37:27 -07:00
Jason Bau
948c07c493 Revamped + Enhanced Shibboleth support
* If a shib users type in their email on the regular login page,
  redirects them to /shib-login/
* Modify student.views.accounts_login to handle redirects
  generated by @login_required for courses that use shib for
  access control.
  Redirect those logins to /shib-login/?next=
2013-09-06 15:36:22 -07: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
Jay Zoldak
e78edf8ef9 Rename MITX_SETTING AUTOMATIC_AUTH_FOR_LOAD_TESTING -> AUTOMATIC_AUTH_FOR_TESTING because it will be used for acceptance testing also. 2013-08-08 12:08:25 -04:00
Jay Zoldak
385e9de1fd Modify auto_auth to accept parameters for overriding created user attributes. 2013-08-08 12:08:24 -04:00
cahrens
3732d418c9 Add helper methods to hide internals of how users are enrolled in courses.
Remove _

Minor cleanup.
2013-08-06 09:36:39 -04:00
Diana Huang
c867be7961 Limit the rate of logins. 2013-08-02 11:23:59 -04:00
Brian Wilson
635d36fcf9 Add audit log definition, and use for logging of logins in external_auth and student apps. Move test_login to student app. Improve conditional tests for Shibboleth login logic. (Does not include reconfiguring log settings.) 2013-07-31 13:32:21 -04:00
ihoover
56883d65a1 csrf test fix
remove test that csrf middleware is disabled (since we can't seem to reload middleware between tests)

move definitions from setuo into test method
2013-07-24 17:08:18 -04:00
ihoover
402ae4d8bd added csrf tests 2013-07-23 17:32:21 -04:00
ihoover
4148c00cc4 resolve conflicts 2013-07-23 16:26:11 -04:00
Jay Zoldak
ea31b17d57 Fix up auto auth tests. 2013-07-23 16:22:51 -04:00
ihoover
18352e9f20 comment tweaks 2013-07-20 16:20:32 -04:00
ihoover
d7de09442e tweaks 2013-07-20 16:14:41 -04:00
ihoover
967ef6ff94 tests added 2013-07-20 13:01:37 -04:00
cahrens
2cceda948c Disable test point when run under CMS.
The template exists when django admin is enabled, but the mappings in CMS' urls.py do not exist.
2013-07-08 13:12:44 -04:00
Jason Bau
734440f4b9 Refactored tests 2013-06-25 20:21:20 -07:00
Jason Bau
83062c0b7d Tests + Now subclass PasswordResetForm instead of copy
Changed to subclassing django's PasswordResetForm and
overriding clean_password() instead of copy/paste.
Less lines to worry about for diff-cover this way =)
2013-06-24 11:54:31 -07:00