Commit Graph

48 Commits

Author SHA1 Message Date
Bernard Szabo
2d544f94be feat: TNL-10136 tease course enrollment from student model
Reapply changes developed in bszabo/TNL-10136-student-course-enrollment branch to current master
2022-12-13 17:19:34 -05:00
Simon Chen
313afd70ae fix: update program enrollments to be case insensitive on external_user_key (#29646)
UTAsutin is an example partner who would use mixed casing on their external_user_key references for program enrollment upload and matriculation. Update the system to be case insensitive on external_user_key

Co-authored-by: Simon Chen <schen@edX-C02FW0GUML85.local>
2021-12-21 09:20:16 -05:00
Jawayria
0d63afe840 chore: Applied lint-amnesty on lms/djangoapps (#29394) 2021-12-21 13:36:39 +05:00
M. Zulqarnain
f4a5af29d3 pyupgrade in program_enrollments (#26597) 2021-02-22 12:58:16 +05:00
Aarif
944df92787 replaced unittest assertions pytest assertions (#26548) 2021-02-19 15:58:45 +05:00
Awais Qureshi
ea26268b0a BOM-2285
Apply pylint-amnesty.
2021-02-02 12:09:42 +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
Simon Chen
681eea44f7 MST-418 retire program_enrollments external_user_key with hashed values instead of setting it to null (#25001) 2020-09-16 21:40:00 -04:00
Kyle McCormick
a86576e69b Fix isort and pylint violations in program_enrollments
Run isort -rc lms/djangoapps/program_enrollments
Run pylint lms/djangoapps/program_enrollment and fix messages.

Stop pylint from complaining about DictFactoryBase instances
2020-05-04 09:26:23 -04:00
Zachary Hancock
b9bafed817 add pending role assignment model (#23506) 2020-03-27 14:29:09 -04:00
Kyle McCormick
b40b55cbbf Improve Django admin listings for program_enrollments 2020-03-18 14:33:36 -04:00
Kyle McCormick
f4d5bc22f9 Improve repr() output of program_enrollments models 2020-03-18 14:33:36 -04:00
Simon Chen
eb3e36b822 MST-121 We should allow the business case where a learner can be enrolled into a program, then unenrolled, then enroll into another program with the same course 2020-03-03 14:39:57 -05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Matt Hughes
cfbfe35904 Link program enrollments on social auth updates in add. to creation
See
lms/djangoapps/program_enrollments/docs/decisions/0002-matriculation-on-user_social_auth_change.rst
for more details

JIRA:EDUCATOR-4770
2019-10-29 16:19:48 -04:00
Kyle McCormick
da08357d89 Revert "Revert "Create Python API for program_enrollments: Part IV"" (#21759)
This reverts commit a67b9f70a16a0f16a842aad84754b245a2480b5f,
reinstating commit cf78660ed35712f9bb7c112f70411179070d7382.
The original commit was reverted because I thought I found
bugs in it while verifying it on Stage, but it turns out that
it was simply misconfigured Stage data that causing errors.

The original commit's message has has been copied below:

This commit completes the program_enrollments LMS app
Python API for the time being. It does the following:
* Add bulk-lookup of users by external key in api/reading.py
* Add bulk-writing of program enrollments in api/writing.py
* Move grade-reading to api/grades.py
* Refactor api/linking.py to use api/writing.py
* Refactor signals.py to use api/linking.py
* Update rest_api/v1/views.py to utilize all these changes
* Update linking management command and support tool to use API
* Remove outdated tests from test_models.py
* Misc. cleanup

EDUCATOR-4321
2019-09-24 10:49:54 -04:00
Kyle McCormick
775d2fd807 Revert "Create Python API for program_enrollments: Part IV"
This reverts commit af4e7a348a.

After merging the above commit, I was seeing 'internal-error's
on Stage in responses to the Registrar API. I am temporarily
reverting it until I can figure out a fix.
2019-09-23 09:39:01 -04:00
Kyle McCormick
af4e7a348a Create Python API for program_enrollments: Part IV
This commit completes the program_enrollments LMS app
Python API for the time being. It does the following:
* Add bulk-lookup of users by external key in api/reading.py
* Add bulk-writing of program enrollments in api/writing.py
* Move grade-reading to api/grades.py
* Refactor api/linking.py to use api/writing.py
* Refactor signals.py to use api/linking.py
* Update rest_api/v1/views.py to utilize all these changes
* Update linking management command and support tool to use API
* Remove outdated tests from test_models.py
* Misc. cleanup

EDUCATOR-4321
2019-09-20 09:55:13 -04:00
Kyle McCormick
358f989131 Create Python API for program_enrollments: Part III
This is the third in a series of commits to create
a Python API for the LMS program_enrollments app.
It does the following:
* Creates api/ folder.
* Moves link_program_enrollments.py to api/linking.py
* Creates api/reading.py for enrollment-fetching
  functions.
* Updates rest of app to use api/reading.py when
  it was going directly through the models before.
* Other misc. cleanup (isorting, unicode_literals,
  line breaks, etc).

Still to do:
* Create api/writing.py and update app to use it instead
  of going directly through models.
* Create api/reset.py and api/expire.py, which the management
  commands call out to.

EDUCATOR-4321
2019-09-12 14:54:03 -04:00
Jansen Kantor
4988999697 Jkantor/support (#21541)
* refactor link_program_enrollments into it's own file, add support page
2019-09-05 13:35:43 -04:00
Kyle McCormick
ea5652010c Create Python API for program_enrollments: Part I (#21511)
This is the first in a series of commits to create
a Python API for the LMS program_enrollments app.
We do some general refactoring, renaming, and clean-up
in order to move toward the creation of that API.

EDUCATOR-4321
2019-09-04 14:06:00 -04:00
Zachary Hancock
1a03816ddc ignore enrollment checks for masters (#21517) 2019-09-03 16:45:02 -04:00
Zachary Hancock
b9a2646e4d log all social auth creation failures (#21470)
logging on social auth creation failures
2019-08-28 11:39:24 -04:00
Kyle McCormick
2c572e1b59 Add new ProgramCourseEnrollment uniqueness constriant (#21463)
ProgramCourseEnrollments were already unique on
(program_enrollment, course_enrollment) by nature of the
OneToOneField on course_enrollment. However, this only
affects realized enrollments. For waiting enrollments, we
need to add a uniqueness constraint on
(program_enrollment, course_key).
2019-08-27 15:05:30 -04:00
Awais Qureshi
544c68b1ff Merge pull request #21444 from edx/awais786/BOM-365
BOM-365
2019-08-27 14:47:49 +05:00
arbisoft
e1aca5b659 BOM-365
fixing python3 test.
2019-08-27 13:52:56 +05:00
Jansen Kantor
0ee01a3cac filter out disabled saml provider configs (#21454)
* filter for enabled saml provider configs
2019-08-26 12:29:38 -04:00
Alex Dusenbery
ce943bced2 Add the correct UNIQUE constraints to the ProgramEnrollment model. 2019-08-23 14:02:54 -04:00
Zachary Hancock
96f99bc053 reset integration environment endpoint (#21319) 2019-08-14 13:19:45 -04:00
amitvadhel
b6b1b0c602 INCR-473: Make compatible with Python 3.x 2019-06-23 13:29:43 +03:00
Kyle McCormick
c487b9a384 Change 'withdrawn' status to 'canceled' in program_enrollments
This makes the LMS program_enrollments API compatible with the
Registrar programs API, as specified in the Master's partner
integration guide.

EDUCATOR-4389
2019-06-03 10:16:19 -04:00
Zach Hancock
a350d327de complete waiting enrollments. fixed 2019-05-24 13:47:49 -04:00
jansenk
65bab28341 add retirement endpoint 2019-05-24 11:29:02 -04:00
Zachary Hancock
8012e3a1ca Merge pull request #20630 from edx/zhancock/expire-prgm-enrollments
command to expire waiting program enrollments
2019-05-23 09:22:32 -04:00
Zach Hancock
d9dc0d4b8d command to expire waiting program enrollments 2019-05-22 13:38:10 -04:00
Stu Young
4e1f63bd15 INCR-283 Run python-modernize on lms/djangoapps/program_enrollments/migrations and lms/djangoapps/program_enrollments/tests (#20578)
* run python modernize

* run isort

* Fix merge conflicts

* Fix merge conflict--file was deleted on master
2019-05-21 11:27:52 -04:00
Simon Chen
0b08867aee Revert "complete waiting enrollments"
This reverts commit b041a1f3e6.
2019-05-15 21:20:45 -04:00
Zach Hancock
b041a1f3e6 complete waiting enrollments 2019-05-10 09:55:24 -04:00
jansenk
1caa647621 add program course enrollment PATCH 2019-05-07 15:52:03 -04:00
Rick Reilly
350b4a2589 Add POST method for program enrollments 2019-05-03 14:14:04 -04:00
Alex Dusenbery
20f0bc03d4 Add a GET API endpoint for program enrollments. 2019-05-01 11:35:38 -04:00
Alex Dusenbery
4d6458284c Fix the program_enrollments admin classes. 2019-04-25 13:06:06 -04:00
Zach Hancock
afe3cdb3ec user lookup util 2019-04-24 09:47:38 -04:00
Rick Reilly
2bf3e6621e Add ProgramEnrollment app and model for masters 2019-04-12 15:50:30 -04:00