Commit Graph

6542 Commits

Author SHA1 Message Date
Ahtisham Shahid
8e8bb57b3b feat: Added flag for big blue button provider (#30645)
* feat: added flag for big blue button provider

* feat: Updated a comment

* fix: updated tests

* fix: updated serializer

* fix: resolved failed tests

Co-authored-by: AhtishamShahid <ahtishamshahid@A006-00850.local>
2022-06-28 16:34:10 +05:00
Mohammad Ahtasham ul Hassan
44fa09eba5 refactor: refactor discussions_xblock (#30636)
JIRA: https://openedx.atlassian.net/browse/BOM-2580
This PR aims at refactoring the discussion xblock sub project and moving it within the xmodule directory effectively removing its position as a sub project within edx-platform
2022-06-27 17:11:56 +05:00
Ahtisham Shahid
73c2b1be7e Added Big Blue button as live provider (#30613)
* feat: added new live provider and fixed tests

* feat: added free_tier compatiblity

* fix: resolved linter issues and other refactors

* fix: ran makemigration to generate migrations

* fix: Implemeted key retrival for tabs

Co-authored-by: AhtishamShahid <ahtishamshahid@A006-00850.local>
2022-06-23 11:48:44 +05:00
jawad khan
fe6b666f5b feat: exchange third party auth token with jwt token (#30283)
Exchange third party auth token wiith jwt token
since mobile platform is moving to jwt token we
need jwt token instead of access token now.

LEARNER-8517

Co-authored-by: Robert Raposa <rraposa@edx.org>
2022-06-21 14:58:39 -04:00
Muhammad Umar Khan
a389a9ff10 Revert "Revert "refactor: move xmodule folder to root"" 2022-06-20 18:20:06 +05:00
Muhammad Umar Khan
d890f06507 Revert "refactor: move xmodule folder to root" 2022-06-20 16:03:48 +05:00
M Umar Khan
a91df0c40f refactor: move xmodule folder to root
- Moving xmodule folder to root as we're dissolving sub-projects of common folder in edx-platform
    - More info: https://openedx.atlassian.net/browse/BOM-2579
- -e common/lib/xmodule has been removed from the requirements as xmodule has itself become the part of edx-platform and not being installed through requirements
- The test files common/lib/xmodule/test_files/ have been removed as they are not being used anymore
2022-06-20 14:33:45 +05:00
Shafqat Farhan
26c8ec5c2a Merge pull request #30517 from openedx/shafqat/VAN-966
feat: VAN-966 - Added a management command to back populate 'marketing_emails_opt_in' UserAttribute
2022-06-20 14:22:48 +05:00
Shafqat Farhan
c7a42f2cbe feat: VAN-966 - Added a management command to back populate 'marketing_emails_opt_in' UserAttribute 2022-06-20 13:31:39 +05:00
Syed Sajjad Hussain Shah
c1a58499a5 fix: remove fields based on extended_profile configuration
Meta field in UserProfile model will only store those fields which are available in extended_profile configuration,
so we are removing the fields that are not available in extended_profile configuration because their data will
not be stored

VAN-977
2022-06-20 12:26:22 +05:00
Muhammad Ammar
a1f8df126d Merge pull request #30608 from openedx/ammar/refine-source-param-in-dsc-url
chore: refine source param in dsc url
2022-06-17 15:28:24 +05:00
muhammad-ammar
dd70066644 chore: refine source param in dsc url 2022-06-17 15:05:29 +05:00
Shafqat Farhan
018b4ccd60 Merge branch 'master' into shafqat/VAN-966 2022-06-17 07:51:27 +05:00
Attiya Ishaque
27a787aa5a fix: [VAN-975] add confirm email field to registration form (#30584) 2022-06-16 18:15:56 +05:00
Zainab Amir
9762ccf5cd fix: update is_marketable value for Braze (#30591) 2022-06-16 14:07:07 +05:00
Zaman Afzal
ec36d3a949 fix: revert Add Learner pathway progress update signal (#30598) 2022-06-16 01:59:40 +05:00
Attiya Ishaque
7b1f402199 feat: [VAN-953] Update MFE context API (#30516) 2022-06-15 19:16:33 +05:00
Zaman Afzal
6c6dabaa3c Feat: Add Learner pathway progress update signal (#30547)
* feat: Add Learner pathway progress update signal
2022-06-15 00:58:22 +05:00
Jillian Vogel
5688ad0ba7 fix: call blockstore APIs in atomic transactions. [BD-14] (#30456)
* fix: call blockstore APIs in atomic transactions.

To ensure database integry when using the blockstore APIs, the Content
Library views which invoke blockstore API methods are wrapped in
database transactions.

* fix: assert create_library is called inside an atomic transaction block
2022-06-14 09:10:08 -07:00
Shafqat Farhan
f71dd805ea feat: VAN-966 - Added a management command to back populate 'marketing_emails_opt_in' UserAttribute 2022-06-14 06:40:07 +05:00
Maria Grimaldi
ec69659253 feat: integrate cohort assignment filter definition to cohort model 2022-06-13 11:28:01 -04:00
ruzniaievdm
116431cb81 refactor: Replace PDF course certificate view code (#30397)
Co-authored-by: ruzniaievdm <ruzniaievdm@gmail.com>
2022-06-13 09:43:02 -04:00
Feanil Patel
b9131ac1af Merge pull request #30299 from raccoongang/depr/remove-course-info
FC-0001: Remove legacy course info page & related code
2022-06-13 08:23:25 -04:00
muhammad-ammar
415291fd27 feat: add source query param in data sharing consent url 2022-06-13 14:43:51 +05:00
Arunmozhi
ba8e98c710 refactor: move noauth rebind ModuleSystem argument to service (#30320)
This removes the `rebind_noauth_module_to_user` argument from the
ModuleSystem constructor and moves it to a separate service called
"rebinder" in the class `RebindModuleService`. This is used in the
LTI module to bind calls received by its noauth endpoint to bind
the module the real_user.
2022-06-08 20:26:59 +02:00
Demid
8886f29e52 refactor: remove debug property from ModuleSystem (#30450)
This also:
1. Removes this property from XBlock runtime shims.
2. Updates the minimum required version of the LTI Consumer XBlock.
2022-06-08 18:59:45 +02:00
Arunmozhi
c54d8a81bf refactor: deprecate node_path attribute of ModuleSystem (#30447)
The node_path attribute & constructor argument of the ModuleSystem is
deprecated without any replacement service or fallback as there doesn't
seem to be any core blocks using it.

It also removes the references to node_path from the LMS settings, the
LoncapaModuleSystem and the XBlock runtime shim.

Co-authored-by: Agrendalath <piotr@surowiec.it>
2022-06-08 18:06:59 +02:00
Mohammad Ahtasham ul Hassan
22e510d69b fix: remove logging (#30559) 2022-06-08 20:31:52 +05:00
connorhaugh
ab59796a56 fix: python-dateutil version issue 2022-06-07 14:33:44 +05:00
Kyle McCormick
9f380b9ccd refactor: import common/lib/ modules from canonical locations (#30533)
Unfortunately, some code in edx-platform is imported
relative to sub-projects instead of the repository root.
The only three remaining instances of this are:
* common/lib/xmodule/xmodule (imported as just 'xmodule')
* common/lib/capa/capa (imported as just 'capa')
* openedx/core/lib/xblock_builtin/xblock_discussion
  (imported as just 'xblock_discussion')

For more details on the situation, see:
https://openedx.atlassian.net/browse/BOM-2579
(public, but requires Atlassian account creation).

We would like to get to a point where all edx-platform
import paths match their folder paths, relative to the repo
root. For now, though, all common/lib/capa and common/lib/xmodule
code should be imported as just `from capa` and `from xmodule`,
respectively. Importing using the full `common.lib.xmodule.xmodule...`
path will often work, but it instantiates a second instance of all
modules imported this way, which in the past has led to very
difficult-to-diagnose bugs.  It also confuses tooling such as
import-linter, which we are trying to add to edx-platform
(see https://openedx.atlassian.net/browse/BOM-2576)
2022-06-06 09:54:16 -04:00
Sagirov Eugeniy
92ca176fde refactor: Remove legacy course info page & related code 2022-06-05 19:00:05 +03: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
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
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
Usama Sadiq
259084ed77 Revert "BOM-2245 : Unpin python-dateutil" (#30515) 2022-05-31 21:02:59 +05:00
Navin Karkera
1172dd00e5 fix: [BB-6261] warn and trim name for site configuration before saving 2022-05-31 19:56:40 +05:30
M Umar Khan
3492bede44 fix: python-dateutil version issue 2022-05-31 17:51:26 +05:00
Zainab Amir
c1324588c3 feat: send is_marketable field to braze (#30501) 2022-05-27 15:37:44 +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
Robert Raposa
432cde31a5 refactor: add create_jwt_token_dict (#30485)
Moves the functionality from views._get_jwt_dict_from_access_token_dict
to a new method jwt.create_jwt_token_dict, which create a JWT version
of the passed token_dict. Also updates create_jwt_from_token to wrap
this call and return the "access_token" from the dict.

This will hopefully make it less likely that the token
dict attributes could get out of sync with the claims
inside the JWT.
2022-05-25 17:02:19 -04:00
Robert Raposa
d321ed5ccd refactor: extract shareable jwt methods (#30451)
Extract some jwt related methods to enable reuse across views.
This is in preparation for a change to AccessTokenExchangeView.

Co-authored-by: jawad-khan <jawadkhan444@gmail.com>
2022-05-25 08:53:36 -04:00
Syed Sajjad Hussain Shah
2fc04e65db fix: Name field validation issue from lms [VAN-965] 2022-05-25 14:56:38 +05: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
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
SaadYousaf
23aa0d39c1 fix: add investigation log for comment client request error 2022-05-24 16:39:40 +05: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
Muhammad Adeel Tajamul
be13b0d6af Merge pull request #30435 from openedx/inf-224
fix: cohorts api not working
2022-05-23 09:54:44 +05:00