Commit Graph

61504 Commits

Author SHA1 Message Date
Waheed Ahmad
f26f53e2fc Merge pull request #250 from edx/waheed/VAN-972-xss-vul
fix: cross-site scripting vulnerability on logout page
2022-06-06 14:46:13 +05:00
edx-semantic-release
7f5d8e3511 chore(i18n): update translations 2022-06-03 13:53:03 -04:00
Cristhian Garcia
e66036bba2 fix: dynamically generated unverified cert data (#30365) 2022-06-03 11:46:46 -04:00
Syed Sajjad Hussain Shah
142945c930 Merge pull request #30488 from openedx/sajjad/VAN-965
fix: Name field validation issue [VAN-965]

The name validation error was being removed after backend validation 

VAN-965
2022-06-03 12:04:11 +05:00
Régis Behmo
7d4543814d refactor: less confusing ACE configuration (#27719)
The ACE_* settings from lms/envs/common.py are all ignored because they are
overloaded by the plugin settings. We were recently bitten by this, as we
discovered that the ACE_ROUTING_KEY was incorrectly set to 'edx.core.low'.
Here, we fix this default value and remove ACE_* settings from
lms/envs/common.py to avoid confusion.

See: https://github.com/overhangio/tutor/issues/439
2022-06-02 14:21:19 -04:00
Justin Hynes
13d82d757f Merge pull request #30524 from openedx/jhynes/scheduled-instructor-task-bugfix
fix: fix issue with incorrect bulk email schedules
2022-06-02 08:06:19 -04:00
SaadYousaf
af31e68f8e fix: fix variable name in email template 2022-06-02 12:38:24 +05:00
Saad Yousaf
1800257bcd fix: fix issues with reported content email notifications (#30522)
Co-authored-by: SaadYousaf <saadyousaf@A006-00314.local>
2022-06-02 11:09:32 +05:00
Kshitij Sobti
a63d023fb6 fix: Run course discussion settings update task when settings change (#30520)
When discussion settings change in a course, call the discussion settings update task so that topics are updated automatically.
2022-06-02 11:04:11 +05:00
John Nagro
ad8724f91f feat: release edx-enterprise 3.49.7 (#30528) 2022-06-01 17:40:12 -04:00
Justin Hynes
d7ae3181b6 fix: fix issue with incorrect bulk email schedules
[MICROBA-1835]
* The DateTime string received from the Comms MFE was already in UTC so there is no need to convert the schedule to UTC on the backend.
2022-06-01 15:49:57 -04:00
Brian Beggs
05f54e8074 Merge pull request #30484 from open-craft/navin/fix-domain-name-length
fix: [BB-6261] trim name for site configuration before saving
2022-06-01 12:58:55 -04:00
John Nagro
364acbb9a3 feat: release edx-enterprise 3.49.6 (#30526)
ENT-5895
2022-06-01 11:35:31 -04:00
Raymond Zhou
34593c2df5 Merge pull request #30525 from openedx/revert-30406-feat--change-default-title-for-text-xblock-to-be-'Text'
Revert "Feat  change default title for text xblock to be 'text'"
2022-06-01 08:09:58 -07:00
connorhaugh
2e13033fbe Revert "Feat change default title for text xblock to be 'text'" 2022-06-01 10:52:09 -04:00
Awais Qureshi
02e29168b2 feat!: Removing sandbox folder from platform and installing it from p… (#30402)
* feat!: common/lib/sandbox-packages folder moved to a new library.
2022-06-01 16:02:13 +05:00
Raymond Zhou
a27247d14d Merge pull request #30406 from openedx/feat--change-default-title-for-text-xblock-to-be-'Text'
Feat  change default title for text xblock to be 'text'
2022-05-31 09:35:33 -07:00
Usama Sadiq
259084ed77 Revert "BOM-2245 : Unpin python-dateutil" (#30515) 2022-05-31 21:02:59 +05:00
Saksham Agrawal
e6caca26c2 docs: ADR for library reference content block (#29633) 2022-05-31 10:49:53 -04:00
Navin Karkera
1172dd00e5 fix: [BB-6261] warn and trim name for site configuration before saving 2022-05-31 19:56:40 +05:30
Ghassan Maslamani
0874ccfc94 fix: share urls in course about page (#30389) 2022-05-31 09:49:22 -04:00
Muhammad Umar Khan
a631324d20 Merge pull request #30255 from openedx/bom-2245-attempt-3
BOM-2245 : Unpin python-dateutil
2022-05-31 18:14:24 +05:00
M Umar Khan
3492bede44 fix: python-dateutil version issue 2022-05-31 17:51:26 +05:00
Waheed Ahmed
7eb9a45e2d fix: cross-site scripting vulnerability on logout page
The target URL on logout page is marked as safe while rendering and
making the page volunerable to Cross-site scripting vulnerability.

Rendered the target variable outside safe HTML so that it should be
treated as text.

VAN-972
2022-05-31 16:07:05 +05:00
Ahtisham Shahid
c6962a9ba6 fix: added global staff to prevliged access (#30506)
Co-authored-by: AhtishamShahid <ahtishamshahid@A006-00850.local>
2022-05-31 13:01:03 +05:00
Ahtisham Shahid
6214e6beee feat: allow banner for discussions moderators (#30502) 2022-05-31 13:00:41 +05:00
Muhammad Adeel Tajamul
d81f7966fb Merge pull request #30503 from openedx/inf-224-2
fix: thread api will now allow filter by group id
2022-05-31 12:56:32 +05:00
edX requirements bot
0c07e4e388 chore: Updating Python Requirements (#30509) 2022-05-31 10:35:43 +05:00
adeel.tajamul
501ac92bd2 fix: thread api will now allow filter by group id 2022-05-31 07:02:44 +05:00
Mohammad Ahtasham ul Hassan
79b3c82e5f build!: drop node12 support (#30468) 2022-05-30 17:38:31 +05:00
edx-semantic-release
6de1c2fa3f chore(i18n): update translations 2022-05-29 17:07:02 -04:00
Raymond Zhou
8422f50a16 feat: fix test 2022-05-27 11:05:52 -07:00
Raymond Zhou
9c8b026588 feat: assertEqual 2022-05-27 10:47:27 -07:00
Raymond Zhou
0678a444ec feat: missed a translation in item.py 2022-05-27 10:23:39 -07:00
Alexander J Sheehan
e0a976ac47 Merge pull request #30453 from openedx/asheehan-edx/saml-api-related-improvements
fix: allowing for provider config fields to be provided on create
2022-05-27 13:16:37 -04:00
Alexander Sheehan
47693769e0 fix: allowing for provider config fields to be provided on create/updates 2022-05-27 12:59:03 -04:00
Adam Stankiewicz
d04ba92ead fix: add segment events to EnterpriseLearnerPortalModal (#30504) 2022-05-27 11:54:01 -04:00
Muhammad Ammar
ceef9bfb1e Merge pull request #30466 from openedx/ammar/send-segment-event-for-first-time-passed-learners
feat: send segment event for learners who passed a course first time
2022-05-27 17:30:23 +05:00
Kshitij Sobti
431b8eb06b fix: revert discussion tab redirection (#30492)
Reverts redirecting to the MFE in the discussion tab since the tab code itself now handles embedding the MFE.
2022-05-27 16:01:24 +05:00
Usama Sadiq
8053b7d90c refactor: replace coursekey.course with coursekey.library (#30398) 2022-05-27 15:55:12 +05:00
Zainab Amir
c1324588c3 feat: send is_marketable field to braze (#30501) 2022-05-27 15:37:44 +05:00
rayzhou-bit
cf84c3bc64 feat: more pep8 fix 2022-05-27 03:48:33 -04:00
rayzhou-bit
701bfbc8c6 feat: pep8 fixes 2022-05-27 03:24:18 -04:00
rayzhou-bit
c63d871e5c feat: add testing and i18n 2022-05-27 02:58:07 -04:00
Olivia Ruiz-Knott
de8e9443e4 Merge pull request #30427 from openedx/ork/MICROBA-1818_fix-certificate-available-date-sync-issue
fix: send COURSE_CERT_DATE_CHANGE signal on_commit
2022-05-26 14:46:07 -04:00
oliviaruizknott
74780ad4c0 fix: send COURSE_CERT_DATE_CHANGE signal on_commit
**Previously**
When a course administrator changed the `certificates_display_behavior` (presumably to `end_with_date`) AND set the `certificate_available_date` in Studio, the `certificate_available_date` was not syncing to Credentials.

This was because we chose to send the `certificate_available_date` only if the course is self-paced and the `certificate_display_behavior` is set to `end_with_date`. [See PR #28275](https://github.com/openedx/edx-platform/pull/28275). However, we were checking those two conditions by looking at the relevant `CourseOverview`, which was not yet truly saved to reflect the updated display behavior at the time of the check due to atomic requests. [Read more about atomic requests and transactions here](https://docs.djangoproject.com/en/4.0/topics/db/transactions/#tying-transactions-to-http-requests-1); we have `ATOMIC_REQUESTS` set to `TRUE` in our codebase. Because the `certificate_display_behavior` was not (yet) `end_with_date`, the post to Credentials was not being fired.

**Solution**
To fix, this commit sends the `COURSE_CERT_DATE_CHANGE` signal `on_commit` instead, which waits until the transaction has completed and the update to the `CourseOverview` has been truly applied to the database. [Read more about `on_commit` here](https://docs.djangoproject.com/en/4.0/topics/db/transactions/#django.db.transaction.on_commit). Now, when the relevant `CourseOverview` is read, it will have the updated `certificate_display_behavior`.

See the [Django docs for how to test on_commit callbacks here](https://docs.djangoproject.com/en/3.2/topics/testing/tools/#django.test.TestCase.captureOnCommitCallbacks); this seems to be our first time using the built-in method.

This commit also cleans up some previous code that was meant to get around the problem caused by atomic requests, that is now unneccessary with this fix. It essentially reverses the work done in [PR #26991](https://github.com/openedx/edx-platform/pull/26991): we no longer need to explicitly pass the `certificate_available_date` since we can trust the `CourseOverview` to be properly updated.

**Rejected Solutions**
A. Simply publish the `COURSE_CERT_DATE_CHANGE` signal `on_commit`; no other changes. Rejected because: This would fix the problem, but leaves a lot of unnecessary code and some puzzling inconsistencies. I prefer the solution above because we are cleaning up behind ourselves.

B. Pass the new `certificate_display_behavior` along with the `certificate_available_date`; read those direclty instead of checking the (not-yet-properly-updated) `CourseOverview`. Rejected because: The pattern of passing the new `certificate_available_date` down through all these methods was put in place to get around the atomic requests problem. I believe `on_commit` to be a better solution to getting around that problem. I’d like to move away from passing data down through several functions / methods.

C. Start the celery task `on_commit` (rather than send the signal `on_commit`). Rejected because: The signal receiver basically only starts the celery task, and I find the break to be a bit more readable when sending the signal. No need to split hairs here.

D. Remove the check for pacing and display behavior; send the updated `certificate_available_date` every time there is a change, no matter what the current display behavior is. Rejected because: We intentionally added this check in [PR #28275](https://github.com/openedx/edx-platform/pull/28275) because the task was not behaving as expected without it (specifically around self-paced courses). I assume this is still necessary.

**Relevant Prior Work**
The following PRs--in order--show how this section (and other relevant sections) of the code have been changed over time:
1. [Move cert date signals to avoid race conditions #26841](https://github.com/openedx/edx-platform/pull/26841)
2. [feat: Pass date in cert date update signal #26991](https://github.com/openedx/edx-platform/pull/26991)
3. [Fix certificate available date sync #28275](https://github.com/openedx/edx-platform/pull/28275)
4. [fix: Correct an issue where cert available date was not sent to Crede… #28524](https://github.com/openedx/edx-platform/pull/28524)

MICROBA-1818
2022-05-26 14:09:00 -04:00
Saleem Latif
20e8da3825 Merge pull request #30494 from openedx/saleem-latif/ENT-5796-bug-fix
fix: Fixed a small error related to function return type.
2022-05-26 19:52:43 +05:00
Saleem Latif
97f0ce87ac fix: Fixed a small error related to function return type. 2022-05-26 19:36:38 +05:00
Adam Blackwell
4cd36cb2c4 Revert "feat: add marketing email opt in field" (#30493) 2022-05-26 10:00:50 -04:00
Abdoul Aw
8e1475f585 Merge pull request #30461 from openedx/zamir/VAN-970/add_is_marketable_field_to_use_profile
feat: add marketing email opt in field
2022-05-26 09:20:17 -04:00