Commit Graph

23847 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
Cristhian Garcia
e66036bba2 fix: dynamically generated unverified cert data (#30365) 2022-06-03 11:46:46 -04: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
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
Usama Sadiq
259084ed77 Revert "BOM-2245 : Unpin python-dateutil" (#30515) 2022-05-31 21:02:59 +05:00
Ghassan Maslamani
0874ccfc94 fix: share urls in course about page (#30389) 2022-05-31 09:49:22 -04: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
adeel.tajamul
501ac92bd2 fix: thread api will now allow filter by group id 2022-05-31 07:02:44 +05:00
edx-semantic-release
6de1c2fa3f chore(i18n): update translations 2022-05-29 17:07:02 -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
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
97f0ce87ac fix: Fixed a small error related to function return type. 2022-05-26 19:36:38 +05:00
muhammad-ammar
cc0690fcda feat: send segment event for learners who passed a course first time 2022-05-26 17:57:30 +05:00
SaadYousaf
2684189127 fix: address UX feedback on reported content email template 2022-05-26 16:59:24 +05:00
Ali Akbar
8528fc07f6 Merge pull request #30464 from openedx/aakbar/PROD-2764-fix-oauth2
fix: use client-credential oauth2 application entry
2022-05-26 11:21:53 +05:00
julianajlk
43fb2cc022 fix: Update enrollments FBE status by course key in dashboard (#30483)
REV-2466
2022-05-25 12:01:42 -04:00
Saleem Latif
eb45e53799 Merge pull request #30439 from openedx/saleem-latif/ENT-5796
Enterprise learner with enabled learner portal should be redirect to B2B course about page.
2022-05-25 12:36:02 +05:00
Saleem Latif
f13b0e0e8a feat: Enterprise learner with enabled learner portal should be redirect to B2B course about page. 2022-05-25 12:19:53 +05:00
julianajlk
f7d4282101 Revert "fix: Use dashboard_index to get FBE status (#30463)" (#30475)
This reverts commit e25e17ee88.
2022-05-24 14:35:47 -04:00
Eugene Dyudyunov
b4fecd620b refactor: rename toggle_warnings to toggle_warning (#30458)
Rename toggle_warnings to toggle_warning for consistency with setting_warning.
2022-05-24 11:47:31 -04:00
julianajlk
e25e17ee88 fix: Use dashboard_index to get FBE status (#30463)
REV-2466
2022-05-24 10:24:38 -04:00
Kyle McCormick
25df9ca420 refactor: make safe_lxml an ordinary folder in openedx/core/lib (#25689) 2022-05-24 15:35:23 +05:00
Usama Sadiq
583b36938e fix: fix ResourceWarnings (#30317) 2022-05-24 11:44:45 +05:00
AliAkbar
49b2d543e5 fix: use client-credential oauth2 application entry 2022-05-23 19:58:58 +05:00
Justin Hynes
dae0de89dd Merge pull request #30448 from openedx/jhynes/microba-1512_mgmt_cmd
feat: Add management command for processing scheduled instructor tasks
2022-05-20 13:49:17 -04:00
Justin Hynes
8026f74e80 feat: Add management command for processing scheduled instructor tasks
[MICROBA-1512]
* Adds a new management command to the `instructor_task` app that will be used to process scheduled tasks ready for execution by Celery.
2022-05-20 12:50:27 -04:00
julianajlk
aef4d88eef feat: Add logic for happy and non-happy path upgrade msg in learner dashboard (#30368)
REV-2466
2022-05-20 10:09:03 -04:00
Attiya Ishaque
75ca47695c feat: add required fields rest api (#30198)
* feat: add required fields rest api

* feat: first review changes added.
2022-05-20 12:06:24 +05:00
Justin Hynes
068eecff91 Merge pull request #30408 from openedx/jhynes/microba-1510_update-email-api
feat: MICROBA-1510; add support for updating course email content and schedules
2022-05-19 14:10:54 -04:00
Justin Hynes
79c53f1002 feat: MICROBA-1510; add support for updating course email content and schedules
[MICROBA-1510]
- Add support for updating an instructor task schedule date via REST API
- Add support for updating the contents of a scheduled course email via REST API
2022-05-19 13:42:58 -04:00
Justin Hynes
bfd75013a1 chore: update instructor task names to use constants
* Update various instructor task logic to use constants over strings when referring to instructor task names
2022-05-17 11:52:35 -04:00
edx-semantic-release
bb4136c758 chore(i18n): update translations 2022-05-16 18:25:01 -04:00
SaadYousaf
a26a6b83d5 refactor: remove temporary logs and fix email styling for reported content. 2022-05-16 13:48:46 +05:00
edx-transifex-bot
26fa6c2b97 chore(i18n): update translations (#30383)
Co-authored-by: edx-semantic-release <edx-semantic-release@edx.org>
2022-05-13 14:02:42 +00:00
Feanil Patel
661949771a Merge pull request #30347 from raccoongang/remove-verified-track-cohort
FC-0001: Remove verified track cohort
2022-05-13 09:47:13 -04:00
Eugene Dyudyunov
52dd883a3c refactor: delete now unused FutureCourseWaffleFlag (#30367)
Remove temporary FutureCourseWaffleFlag class;
Update ora2 and edx-toggles to versions cleaned from the
LegacyWaffle* classes;
Replace `override_flag`s with `override_waffle_flag`;
Replace `override_switch`s with `override_waffle_switch` (where it's possible).
2022-05-13 08:48:42 -04:00
Mubbshar Anwar
0d2ea3c2e2 fix: handle ObjectDoesNotExist exception (#30378)
Fix exception ObjectDoesNotExist while geting program enrollment in send_program_reminder_emails command.
2022-05-13 14:23:36 +05:00
Ali Akbar
f63543c49d Merge pull request #30243 from openedx/aakbar/PROD-2739
feat: use new financial assistance flow in FinancialAssistanceTool
2022-05-12 23:45:55 +05:00
Mubbshar Anwar
a83c5cd447 fix: attribute error (#30372)
saved program attribute error in send_program_reminder_emails command
2022-05-12 12:28:53 +05:00
AliAkbar
ac985dbf7f feat: use new financial assistance flow in FinancialAssistanceTool 2022-05-12 00:59:07 +05:00
Maria Grimaldi
6b8de6eb3f Merge pull request #29996 from eduNEXT/MJG/course-about-render-filter
[BD-32] feat: add filter before course about rendering process starts
2022-05-11 14:07:02 -04:00