Commit Graph

54 Commits

Author SHA1 Message Date
Christie Rice
1181fb343e feat!: Remove allow_certificate checks from course certificates (#27206)
DEPR-140 MICROBA-985
2021-04-05 14:00:07 -04:00
Awais Qureshi
275e0c7527 refactor: remove unused imports. 2021-03-19 15:30:01 +05:00
Awais Qureshi
094573e901 BOM-2375-student-part2
pyupgrade in student app.
2021-03-10 16:17:22 +05:00
Jawayria
8086ca75f2 Applied pylint-amnesty to student 2021-02-03 15:29:53 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Michael Terry
450072582e AA-137: Support courseware celebrations
- Add a new CourseEnrollmentCelebration model, which ties a
  course enrollment to some booleans about progress celebrations
- Add serialization of the new model to the existing courseware_api
  app's existing course info view
- Add new API in courseware_api to update a celebration model
2020-06-16 15:19:21 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Feanil Patel
3c618ad04d Fixup CourseEnrollmentFactory
Historically, the CourseEnrollment model used to have a `course_id`
field.  A lot of tests still call the factory using that.  Instead of a
`course_id` field this model now has a `course` field which is a foreign
key to the CourseOverview model.

The factory still accepts the course_id but uses it to create the
relevant CourseOverview object where necessary.  This commit fixes two
issues with the factory.

1. If the course id is passed in as`course_id` instead of `course__id`
then, the generated CourseOverview does not have the correct course_id.

2. Even though the CourseEnrollment model no longer needs the
`course_id` parameter, we were still passing it through.  We now remove
it so that it is not passed through to the CourseEnrollment model
instantiation.
2020-04-06 09:37:36 -04:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Dave St.Germain
a3b52662d1 Prevent changing dict while iterating 2019-08-19 16:27:04 -04:00
Ayub khan
2244540ade BOM-78
Update uuid4().hex.decode(ascii) calls
2019-08-06 17:16:08 +05:00
Cameron Cairns
6363090144 Addresses INCR-195 - runs modernise /student/tests (#20419) 2019-05-07 15:44:49 -04:00
Saleem Latif
2c9021e480 Make sure only active AccountRecovery records are used 2019-01-09 16:33:12 +05:00
Saleem Latif
eaf93d5978 Update sign in email address for continued access 2018-12-31 11:34:05 +05:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
Gabe Mulley
7fd643faa4 Add tests for experience types, ensure courses have a verified mode 2017-11-01 16:51:10 -04:00
Gabe Mulley
6a36eb0183 Use ACE to 'send' Recurring Nudge emails 2017-08-31 16:58:08 -04:00
Calen Pennington
63244b514d Use a consistent CourseModeFactory from the course_modes module, rather than using one from student 2017-08-23 12:15:46 -04:00
cahrens
fd62164563 Remove usages of deprecated SlashSeparatedCourseKey. 2017-08-08 12:32:58 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Calen Pennington
c9f6872be3 Capture the language preference set by an anonymous user when the register or login
[LEARNER-168]
2017-05-15 07:36:56 -04:00
Vedran Karacic
7fe8e47554 [SOL-2133] Add user deactivation endpoint. 2017-01-31 11:34:26 +00:00
Clinton Blackburn
0dedc6ab71 Revert "Updated User Info Cookie" 2016-09-02 17:26:00 -04:00
Clinton Blackburn
2159b71870 Factory Cleanup
- Corrected import ordering
- Using a constant for the User password

ECOM-4896
2016-08-31 19:40:00 -04:00
Omar Khan
6fc4b38ea0 Disallow free verified course modes
The verification workflow assumes that all verified courses will have a
price. Free verified course modes cause a 404 when the user attempts to
enroll or upgrade.
2016-04-12 18:06:16 -07:00
Peter Fogg
497622d4b4 Switch default course mode to 'audit'.
ECOM-2972
2015-11-25 11:22:29 -05:00
muhammad-ammar
6a5ce5d544 Upgrade factory_boy
TNL-3179
2015-09-18 18:02:38 +05:00
Nickersoft
8c1d3ae412 Added includes_expired parameter to enrollment API
- Adding ?include_expired=1 to course detail requests will now include expired course verifications
2015-06-09 17:12:30 -04:00
muhammad-ammar
3bb7a2508d Add certificate columns to existing grade report
TNL-1886
2015-05-05 17:43:08 +05:00
Andy Armstrong
6976a33a85 Add the preferences endpoint to the User API
TNL-1493

See https://openedx.atlassian.net/wiki/display/TNL/User+API for details
2015-03-16 23:34:35 -04:00
Jonathan Piacenti
be02613aac Do event tracking for major forum events. 2015-02-25 23:30:30 +00:00
Sarina Canelake
0c7b60b82b Remove 'pylint: disable=W0232' because we ignore this warning in pylintrc 2014-12-01 11:22:12 -05:00
Sarina Canelake
e0f1d3f3f3 s/pylint: disable=C0111/pylint: disable=missing-docstring/ 2014-12-01 11:22:09 -05:00
Sarina Canelake
3adc2f0a2e Fix opaque_keys imports from hotfixes 2014-06-11 21:32:41 -04:00
Calen Pennington
f6ea16223b Allow users that have unregistered from a verified course to re-register.
Fixes LMS-2830
2014-06-11 12:37:53 -04:00
David Baumgold
d15391fdfa Update factory_boy to 2.2.1 2013-12-05 15:50:49 -05: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
Sarina Canelake
ea529b8841 Fix instructor api tests 2013-11-05 09:26:32 -05:00
Sarina Canelake
198452cd1c Adds Staff and Instructor factories 2013-11-04 11:38:43 -05: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
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
Don Mitchell
6af4402abd Squash 3 more naive datetime warnings. I think the only ones left are in
migrations.
2013-06-13 10:56:48 -04:00
Calen Pennington
f521b8e8c0 Handle errors while sending emails around changing user data
The most common error is Amazon SES having blacklisted an email address.
However, we handle any error being raised during user.email_user.

Fixes JIRA LMS-131
2013-05-23 10:27:34 -04:00
Calen Pennington
7ef6132194 Make factories return unicode data
Django always returns string data from the database as unicode objects
(ref: https://docs.djangoproject.com/en/1.4/ref/unicode/#models).
Therefor, our factories should do the same
2013-05-22 21:38:07 -04:00
Calen Pennington
2add58bb5a Create sequences for names, emails, and usernames in UserFactory 2013-05-22 21:35:49 -04:00
Greg Price
0f7378a171 Modify UserFactory to create a profile for the user
This allows specification of profile parameters when creating a user. Because
the profile contents are always accessed from the database, the user must be
saved to the database before the profile is created. This means that the
profile cannot be created if the user is merely being built (and not saved)
rather than created.
2013-05-03 10:31:35 -04:00
Jay Zoldak
be76f73107 Consolidate and upgrade factories 2013-04-18 15:11:10 -04:00
Jay Zoldak
0426761bed Update lettuce and factory-boy versions. 2013-04-18 10:18:36 -04:00
Calen Pennington
6644b78819 Fix gradebook when using grade cutoffs other than A/B/C 2013-04-16 11:38:58 -04:00