Commit Graph

5299 Commits

Author SHA1 Message Date
Muhammad Soban Javed
4463ee751d Revert "refactor: move common/lib/capa/capa to xmodule/capa" (#30762) 2022-07-21 18:22:15 +05:00
Muhammad Soban Javed
06064b237b Merge pull request #30403 from openedx/iamsobanjaved/BOM-2582-move-common-lib-capa
refactor: move common/lib/capa/capa to xmodule/capa
2022-07-21 16:27:47 +05:00
Robert Raposa
49dcb68a5e docs: fix restricted app adr status (#30677)
The decision to provide Restricted Applications expired
JWTs was superseded by another ADR. This commit simply
adds clarity around that change.

Co-authored-by: Phillip Shiu <pshiu@users.noreply.github.com>
2022-07-20 17:02:33 -04:00
connorhaugh
45c2858d61 Revert "feat: FC-0001 Remove Persistent Course Grades Flags (#30540)" (#30744)
This reverts commit 4a9243ef9f.
2022-07-19 13:45:31 -04:00
Sagirov Evgeniy
4a9243ef9f feat: FC-0001 Remove Persistent Course Grades Flags (#30540)
* feat: revert Fix certificate generation without persistent grades

* feat: Remove Persistent Course Grades Flags

* test: update tests
2022-07-19 11:30:37 -04:00
Soban Javed
9eba9f983a refactor!: move common/lib/capa/capa to xmodule/capa
As part of dissolving our sub-projects in edx-platform, we are moving this package under the xmodule directory.
We have fixed all the occurences of import of this package and also fixed all documents related references.
This might break your platform if you have any reference of `import capa` or `from capa import` in your codebase or in any Xblock.

Ref: https://openedx.atlassian.net/browse/BOM-2582
2022-07-19 12:20:04 +05:00
John Nagro
efa979a13d temp: guard against resume button failures in dropdown template (#30703) 2022-07-06 13:05:14 -04:00
Azan Bin Zahid
a3f9a27ed9 temp: add broad exception and log err for resume block (#30701) 2022-07-06 18:54:51 +05:00
Attiya Ishaque
9d1f31603e feat: [VAN-986] Add amplitude API (#30675)
* feat: [VAN-986] Add amplitude API

* feat: add suggestion

* feat: add spinner

Co-authored-by: Zainab Amir <zainab.amir@arbisoft.com>
2022-07-05 16:23:38 +05:00
Ahtisham Shahid
6f71e4cc0d fix: Made lti_config optional field (#30680)
Co-authored-by: AhtishamShahid <ahtishamshahid@A006-00850.local>
2022-06-30 19:09:14 +05:00
jawad khan
2dc7990653 feat: Added token grant_type in JWT payload (#30519)
To exchange jwt with session cookies we need to determine JWT grant type in
AccessTokenExchangeView. JWT only having password grant type will be allowed to exchange session.
Added ADR for mobile migration to JWT authentication.

LEARNER-8886
2022-06-30 16:49:11 +05:00
Waheed Ahmad
fb604e4345 fix: login endpoint username param rate limiting (#30673)
The username was allowed in the login endpoint alongside the email address
but rate-limiting logic was not updated to rate limit on the new POST
param `email_or_username`.

VAN-1003
2022-06-30 15:24:19 +05:00
Braden MacDonald
5d93f883f1 docs: Clarify a potentially confusing deprecation message 2022-06-29 12:13:39 -07:00
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
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
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
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