Commit Graph

4856 Commits

Author SHA1 Message Date
uzairr
c83750ff58 add hipb api client 2021-09-24 13:09:14 +05:00
Usama Sadiq
484cd536e2 fix: Fixed new pylint warnings (#28724) 2021-09-23 17:54:04 +05:00
Ivo Branco
6f0255bc60 Fix use a registration field order when using a registration extension form (#26633) 2021-09-23 11:07:49 +05:00
Binod Pant
8f59d5e4a2 fix: 🐛 Remove add_user_to_course_cohort function (#28824)
it is not needed, and it causes a circular dep now for some reason which we don't need since we are removing that function altogether

ENT-4974
2021-09-22 21:15:39 -04:00
Felipe Montoya
dbb4658819 Merge pull request #28640 from eduNEXT/MJG/2nd_batch_openedx_events
[BD-32] feat: add 2nd batch of Open edX Events
2021-09-22 14:12:06 -05:00
Bianca Severino
0484799f84 fix: remove special exam mfe flags 2021-09-22 09:07:33 -04:00
Tim McCormack
0bf7cc13f6 doc: Small clarification to CookieName Change middleware instructions (#28804) 2021-09-21 13:45:26 +00:00
Sarina Canelake
c699923d03 Merge pull request #28628 from edx/sarina/i18n-tuneup
fix: abstract edX-specific strings
2021-09-21 08:57:58 -04:00
Muhammad Soban Javed
98de16f97a Merge pull request #28722 from edx/iamsobanjaved/django30-re-path-fix
fix: added default value for parameter to fix re path issue in django 30
2021-09-21 16:15:10 +05:00
Bianca Severino
a3df1472c7 Merge pull request #28800 from edx/bseverino/proctoring-enrollments
[MST-866] Use course overviews instead of modulestore in enrollments service
2021-09-20 15:34:57 -04:00
Bianca Severino
c79518d806 fix: use course overviews instead of modulestore in enrollments service 2021-09-20 14:22:47 -04:00
Matthew Piatetsky
ba7518304c Merge pull request #28675 from edx/AA-905
Populate the course goals user activity table when a user visits course-specific pages
2021-09-20 13:52:27 -04:00
Matthew Piatetsky
3200851563 start addressing comments 2021-09-20 13:08:12 -04:00
sarina
0c74d347f7 fix: abstract edX-specific strings 2021-09-19 14:01:20 -04:00
Soban Javed
56d12bf230 feat!: upgrade pyjwt to version 2.1.0 2021-09-17 16:08:15 +05:00
Kshitij Sobti
a35fa080b3 docs: ADR that documents how MFEs can access in-context discussions [BD-38] [TNL-8396] [BB-4367] (#28452)
* docs: ADR that documents how MFEs can access in-context discussions
This ADR proposes the mechanism for MFEs to get access to the discussion embed for units.

* Update 0005-in-context-discussion-course-blocks.rst

* Update 0005-in-context-discussion-course-blocks.rst
2021-09-17 14:31:19 +05:00
Muhammad Soban Javed
2845786a14 Merge pull request #28723 from edx/iamsobanjaved/django-30-db-args
test: fix skip-checks in a test for django 30
2021-09-16 13:47:37 +05:00
Maria Grimaldi
1c447e6176 feat: add 2nd batch of Open edX Events
* Add COURSE_ENROLLMENT_CHANGED: sent after the enrollment update
* Add COURSE_UNENROLLMENT_COMPLETED: sent after the user's unenrollment
* Add CERTIFICATE_CREATED after the user's certificate generation has
been completed
* Add CERTIFICATE_CHANGED: after the certification update has been
completed
* Add CERTIFICATE_REVOKED: after the certificate revocation has been
completed
* Add COHORT_MEMBERSHIP_CHANGED: when a cohort membership update ends
2021-09-15 14:50:28 -04:00
Samuel Walladge
c3e4976d4d fix: crash in retrieving blockstore bundle links
If the bundle is deleted, `blockstore_cache.get_bundle_version_number(bundle_uuid)`
will raise an error.
Catch this error in `get_bundle_links`,
so the REST api doesn't crash with a 500 error when a linked bundle is deleted.
2021-09-15 10:13:07 -07:00
alangsto
9b204debf4 feat: check if profile name changes are valid for name affirmation. (#28697)
MST-970. If name affirmation is enabled, a user should only be allowed to make limited edits to their profile name before they are required to go through IDV. Right now, the allowable edits are limited to:

* add/delete/replace one character (including one space on either side)

Edits that are not allowed, and therefore require IDV include:

* changing 2 or more characters
* changing their name 3 or more times

This behavior will not be enabled until name affirmation is fully rolled out, so there should be no noticeable difference in account settings behavior at the time this is merged.
2021-09-15 09:53:30 -04:00
Thomas Tracy
6f44841deb [feat] Add user_id scope to credentialsApiClient (#28737)
Now that we're actively using the LMS_USER_ID inside credentials to
identify users, we need to make sure that users created by
notify_credentials are including it in the jwt scopes when authenticated
with credentials.
2021-09-15 09:17:51 -04:00
Soban Javed
ca88e07f47 fix: added default value for parameter to fix re path issue in django 30 2021-09-15 11:03:03 +05:00
Soban Javed
78afc41d4c test: fix skip-checks in a test for django 30 2021-09-15 11:01:38 +05:00
Manjinder Singh
f34606f8a4 feat: adding monitoring to CookieNameChange middleware (#28730)
* feat: adding monitoring to CookieNameChange middleware

Adding custom attribute: cookie.change_name
if cookie.change_name in transaction and equal 0, cookie with alternate name is detected and deleted
if cookie.change_name in transaction and equal 1, cookie with current name not in request and added
2021-09-14 08:31:36 -04:00
Kshitij Sobti
d15a954698 docs: ADR for in context discussions (#28221) 2021-09-14 12:28:26 +05:00
Olivia Ruiz-Knott
5678b9e036 Merge pull request #28715 from edx/ork/MICROBA-1488_change-override-to-datetime-field
feat: Change override date to datetime
2021-09-13 09:23:46 -06:00
Jawayria
43d0b4eec8 Merge pull request #28709 from edx/jawayria/fix-check
fix: Added the condition on body_type in test_reset_password
2021-09-13 16:15:08 +05:00
oliviaruizknott
59fefa10eb feat: Change override date to datetime
When first building the Certificate Date Override feature, I set up the
CertificateDateOverride model to store the override dates as Dates
instead of DateTimes.

Turns out this is not how edX typically handles dates, and it’s causing
some minor headaches around needing to convert values. Also, using just
Dates causes timezone issues.

MICROBA-1488
2021-09-10 14:42:36 -06:00
Olivia Ruiz-Knott
1495981ef6 Merge pull request #28692 from edx/ork/MICROBA-1489_notify-credentials-and-date-overrides
feat: notify_credentials of changed overrides
2021-09-10 13:27:45 -06:00
Tim McCormack
0c164ad4c2 fix: Fix Studio logout by pointing to correct logout view (#28714)
This changes the "Sign out" link on Studio to point to Studio's own logout
view, which clears the session and then redirects to LMS's logout page. The
LMS logout page then skips loading the Studio logout because it is seen in
the Referer header.

This change also brings Studio better into line with how other IDAs perform
their logouts.

Background:

After the rollout of Studio OAuth, logouts initiated on Studio failed to
actually log out Studio (but all other IDAs were logged out). This was
because the LMS logout view loads the logout pages of other IDAs but skips
any that is a *prefix* match on the Referer header, and browsers now often
send a truncated version of the Referer for privacy. Therefore, Studio was
always skipped when coming from Studio.

The fix is to make sure that Studio has already performed its logout by the
time the LMS logout page is loaded.

One wrinkle here is that the LMS logout view is activated by `/logout`, but
the correct logout view (provided by auth_backends) is activated by
`/logout/` -- with a trailing slash. This is fragile and unfortunate, but
can be cleaned up when we later remove other leftovers of Studio's previous
ability to handle logistration.

ref: ARCHBOM-1897
2021-09-10 18:45:58 +00:00
oliviaruizknott
dbfe2a3f2b feat: notify_credentials of changed overrides
We use the `notify_credentials` management command to keep certificate-
related data in the LMS and Credentials service in sync. We can run it
with specific arguments (user_ids, course_keys, etc.) when we notice a
data discrepancy; and it is run regularly by a Jenkins job with the
`--auto` flag every ~4 hours to keep things up-to-date.

Because we probably never want to notify credentials of of ALL the
GeneratedCertificates, the celery task must be given some arguments
to filter down to the relevant certificates. Running the management
command with the `--auto` flag (as the Jenkins job does) adds
`start_date` and `end_date` arguments of 4 hours ago and now,
respectively.

The handle_notify_credentials celery task then takes those arguments and
looks for any GeneratedCertificates that have been modified within the
given time range by checking the GeneratedCertificate modified_date.
It will send the current data for those certificates to credentials.

However, we also want to notify credentials about certificates that have
an associated CertificateDateOverride that has changed within that time
range: added, updated, or deleted. But changes to a
CertificateDateOverride won’t affect the GeneratedCertificate’s modified
date, and therefore wouldn’t be included in the list of certs cent to
credentials.

This commit adds a check for changed CertificateDateOverrides and
includes their associated GeneratedCertificates in the list of certs. We
use the CertificateDateOverride’s history model for this check so that
we can include certificates whose override was deleted.

MICROBA-1489
2021-09-10 12:32:17 -06:00
Albert (AJ) St. Aubin
a235f497ac feat: Remove email sent with program cert award.
[MICROBA-1466]
2021-09-10 13:57:52 -04:00
Jawayria
a3fd502bab fix quality 2021-09-10 21:10:21 +05:00
Jawayria
dee102a70b fix: Added the condition on body_type in test_reset_password 2021-09-10 18:14:07 +05:00
Michael Terry
d5bacad86f Merge pull request #28698 from edx/mikix/hide-after-due-mfe
feat: notify MFE when a sequence is hidden-after-due
2021-09-10 09:12:57 -04:00
Michael Terry
cd7d13cd6d feat: notify MFE when a sequence is hidden-after-due
Currently, if a learner manually loads a sequence page that would
normally be skipped for them because it is hidden-after-due, the
sequence renders anyway.

This commit tells the frontend when it should not show a sequence
because it's hidden.

AA-1000
2021-09-09 14:43:00 -04:00
AsadAzam
f721c62555 refactor: Refactor the program configuration string (#28696) 2021-09-09 18:16:39 +05:00
Awais Qureshi
28d2908588 Merge pull request #28649 from edx/upgrade-django-cors-headers-320--
feat: upgrade django-cors-headers to lateast version.
2021-09-09 18:06:01 +05:00
Zainab Amir
40dba56cff fix: auto register send_activation_email task (#28694) 2021-09-09 14:13:35 +05:00
Albert (AJ) St. Aubin
a28f54bf4a feat: Added lms_user_id and email to data sent to Credentials for Program certs
[MICROBA-1466]
2021-09-08 15:05:09 -04:00
Awais Qureshi
36df86d829 feat!: Major upgrade django-cors-headers to new version 3.2.0
BREAKING CHANGES:
- `CORS_ORIGIN_WHITELIST` now requires URI schemes.
- Added new list `CORS_ORIGIN_WHITELIST_WITH_SCHEME` which contains all links of `CORS_ORIGIN_WHITELIST` with schemes and load the desired list after checking installed version.
- For more details, visit this: https://github.com/adamchainz/django-cors-headers/blob/main/HISTORY.rst#320-2019-11-15
2021-09-08 21:39:57 +05:00
Tim McCormack
035dfd8522 feat: Add feature to display a global maintenance banner (#28673)
This is intended for use in the Studio OAuth transition (ARCHBOM-1887) but
may be useful in the future as well.
2021-09-08 16:21:43 +00:00
David Ormsbee
309cadc973 Revert "Use new version of edx-when." (#28684)
Reverting because of errors seen in proctoring. The error from splunk:

 File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/edx_proctoring/views.py", line 590, in get
    data['onboarding_release_date'] = effective_start.isoformat()
AttributeError: 'NoneType' object has no attribute 'isoformat'

The effective date is coming from learning_sequences, which ultimately
comes from edx-when.
2021-09-08 11:05:35 -04:00
Zainab Amir
517c4af90c fix: rename send_activation_email task (#28678) 2021-09-08 17:52:03 +05:00
Kshitij Sobti
9f356b90d1 feat!: Add data model for course app API [BD-38] [TNL-8506] [BB-4470] (#28165)
* feat!: Add data model for course app API
The current course apps API makes individual queries to determine if a course app is enabled, which can be inefficient. With this change we now have a Django model that contains this information, allowing us to make bulk queries about all the course apps for a course in the API.
It also adds a new signal handler that initialises the status of all course apps in a course on course publish.

* Use celery tasks and a management commands to make cache async

* Review feedback

* update log messages
use separate celery task for each course task
2021-09-08 11:54:19 +05:00
Zainab Amir
bf76fb3f7f move send_activation_email celery task (#28666)
- moved send_activation_email to user_authn app
- registered task under both new and old name
- exposed the old name for task invocation

VAN-417
2021-09-08 10:44:54 +05:00
Chris Deery
4078443969 fix: [AA-950] Add unit test to verify segment called correctly (#28668)
* fix: [AA-950] Add unit test to verify segment called correctly

Add positive and negative test
Moved flag update to same block as segment
Moved WaffleFlag check to can_show_streak_discount_coupon for consistency
2021-09-07 12:53:13 -04:00
Jawayria
d3a3f52d69 Merge pull request #28613 from edx/jawayria/bom-2773
fix: Replaced '&#39' with '&#x27' to prevent tests from failing on Django 3
2021-09-07 18:34:05 +05:00
kenclary
42e7e785e3 Merge pull request #28551 from edx/juliasq/TNL_8061_optimize_outline_block_data_retrieval
Use new version of edx-when.
2021-09-07 09:31:18 -04:00
Jawayria
b3cb59b07f fix: Replaced '&#39' with '&#x27' to prevent test_reset_password_email from failing on Django 3 2021-09-07 17:31:14 +05:00