Commit Graph

24784 Commits

Author SHA1 Message Date
Leangseu Kim
ae6914fe3d chore: add ora mfe url env 2023-11-27 16:36:23 -05:00
github-actions[bot]
3b902c8f6f feat: Upgrade Python dependency edx-drf-extensions 9.0.0 (#33807)
Upgrade edx-drf-extensions 9.0.0

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

edx-drf-extensions 9.0.0 requires VERIFY_LMS_USER_ID_PROPERTY_NAME
to be properly set in LMS to get the appropriate verification when
forgiving JWTs is enabled (which will soon be by default).

See openedx/edx-drf-extensions#408 for details.

This is part of:
edx/edx-arch-experiments#429

Co-authored-by: robrap <robrap@users.noreply.github.com>
2023-11-27 18:19:57 +00:00
Feanil Patel
a958097630 Merge pull request #33294 from raccoongang/rg/feat/FC0031/add_pagination_in_user_course_enrollments
feat: [FC-0031] Add DefaultPagination in UserCourseEnrollmentsList
2023-11-27 11:23:18 -05:00
mubbsharanwar
487b870ae4 revert: remove learner_recommendations app 2023-11-27 10:38:24 +05:00
Jenkins
1734fdc0dc chore(i18n): update translations 2023-11-26 16:09:14 -05:00
Mohammad Ahtasham ul Hassan
a57dd7325b feat: add course key param to track selection url (#33716) 2023-11-24 15:23:36 +05:00
Moeez Zahid
f880855f66 feat: Publish mobile SKUs to LMS (#33754) 2023-11-24 14:14:33 +05:00
Régis Behmo
09dfd8718e fix: CSRF errors in POST requests to LMS (#33727)
POST requests to the LMS are failing systematically when HTTPS is
enabled. This issue is observed in the Quince release branch. Here is
the root cause analysis:

- CorsCSRFMiddleware overrides the `is_secure` attribute by setting it
  to "false".
- CorsCSRFMiddleware calls the parent `process_view` method, from the
  CsrfViewMiddleware.
- CsrfViewMiddleware checks the Origin header, including the scheme. It
  is equal to "https://LMSHOST". But because the request is not
  considered secure, the expected origin is "http://LMSHOST".
- The check fails with "Origin checking failed"

We resolve this issue by running the CsrfViewMiddleware *before* the
custom CorsCSRFMiddleware. After a successful check of the
CsrfViewMiddleware, the request has the "csrf_processing_done = True"
attribute, and CorsCSRFMiddleware is short-circuited.

This issue did not happen in the following environments:

- in Palm because the CsrfViewMiddleware did not check the "Origin" header in Django 3.
- in the Studio, because the Studio already runs the CsrfViewMiddleware before
  the CorsCSRFMiddleware.
- in the master branch because the master branch does not yet run on
  Django 4. But the issue will happen in the master branch without this
  proposed change.

To bypass this issue in the master branch, it was proposed that we add
"https://LMSHOST" to CSRF_TRUSTED_ORIGINS. This would effectily bypass
CSRF checking entirely for all requests that originate from the LMS.
Such a solution would not be acceptable, as we would lose the security
guarantees offered by CSRF.

See discussion: https://github.com/openedx/wg-build-test-release/issues/325
2023-11-23 13:52:16 -04:00
Navin Karkera
e9ca49d3a6 fix: session_language url renamed to update_language
The url was renamed from session_language to update_language but it was still referred to in some html templates
2023-11-23 22:06:19 +05:30
jszewczulak
2df2030811 feat: added hotjar site id property (#33738) 2023-11-21 10:27:20 -05:00
Glib Glugovskiy
3da85a994e fix: remove trailing whitespace failing quality check 2023-11-20 23:08:56 +02:00
Glib Glugovskiy
95fcb124dd docs: add docstring for the paginator property override 2023-11-20 22:40:28 +02:00
KyryloKireiev
ee4b92ca10 feat: [AXIM-6] Add DefaultPagination for UserCourseEnrollmentsList v3 2023-11-20 22:40:28 +02:00
Kyle McCormick
e800ae7622 feat: provisionally support V2 libraries in LibraryContentBlock (randomized only) (#33263)
Refactors and reworks the LibraryContentBlock so that its
sync-from-library operations are asynchronous and work with
V2 content libraries. This also required us to make
library_content block duplication asynchronous, as that
involves syncing from the source library.

For the sake of clarity, this PR includes two major method renames:

* update_children(...) -> sync_from_library(...)
* refresh_library(...) -> sync_from_library(upgrade_to_latest=True, ...)

an an XBlock HTTP handler rename:

  /refresh_children -> /upgrade_and_sync

There are still a couple issues with import or duplication
of library_content blocks referencing V2 libraries other than
latest. These will be resolved in an upcoming PR.

Part of: https://openedx.atlassian.net/wiki/spaces/COMM/pages/3820617729/Spec+Memo+Content+Library+Authoring+Experience+V2
Follow-up work: https://github.com/openedx/edx-platform/issues/33640

Co-authored-by: Connor Haugh <chaugh@2u.com>
Co-authored-by: Eugene Dyudyunov <evgen.dyudyunov@raccoongang.com>
2023-11-20 15:58:10 +00:00
Jenkins
c53cf9f1c3 chore(i18n): update translations 2023-11-20 10:57:40 -05:00
Andrew Shultz
6c6ecab27a Merge pull request #33732 from openedx/ashultz0/es-search-log-settings
ES courseware search log settings
2023-11-16 10:32:07 -05:00
Andy Shultz
3da6578e9b feat: add settings for detailed search logging (default off)
devstack on, production load from environment
2023-11-16 10:00:30 -05:00
Feanil Patel
942a2419f1 Merge pull request #33295 from raccoongang/rg/feat/FC0031/add_profile_image_to_api_discussion
feat: [FC-0031] Add field profile_image to CommentSerializer
2023-11-16 09:57:03 -05:00
Ahtisham Shahid
c6b36a8558 feat: added beamer to edx-platform (#33701) 2023-11-16 14:56:08 +05:00
KyryloKireiev
da9266e31d refactor: [FC-0031] Move get_profile_image method to api 2023-11-14 21:45:18 +02:00
KyryloKireiev
ae3830b023 feat: [AXIM-20] Add profile_image to API CommentViewSet 2023-11-14 21:45:18 +02:00
Jason Wesson
3c40052579 Merge pull request #31668 from raccoongang/lunyachek/fix/absent-notification-message-certificate-exception-generation
fix: Fix absent notification message after submit Generate Exception …
2023-11-14 10:20:50 -08:00
Andy Shultz
aeaa1f8628 feat: if course is specified, do not build the course limiting filters
Adding these filters in the course case makes it harder to understand
what is going on in the search engine for no benefit.
2023-11-14 09:08:41 -05:00
Arunmozhi
5b2f012acc feat: link LTI Provider launches to authenticated users
With this change, the platform users who access content via LTI will be 
automatically linked to their platform account instead of the new (anonymous) 
one. The following conditions need to be met:
* The `LtiConsumer` should be configured to auto-link the users via email.
* The LTI Consumer should share the user's email using the
`lis_person_contact_email_primary` parameter in the LTI Launch POST data.

This also replaces the one-to-one relationship of the `User` and `LtiUser` 
with one-to-many. This way, multiple `LtiUser` objects can refer to the same 
`edx_user`. With the auto-linking, multiple LTI Consumers can create 
independent `LtiUser` objects with the same `edx_user`.

Co-authored-by: Piotr Surowiec <piotr@surowiec.it>
2023-11-13 19:38:37 +01:00
Feanil Patel
c4598c5527 Merge pull request #33293 from raccoongang/rg/fix/FC0031/fix_count_items_in_pagination_for_api_courses_list
fix: [FC-0031] Fix count items in pagination for api courses list.
2023-11-09 10:23:37 -05:00
Artur Gaspar
dea15c23d3 fix: hide instructor tab when masquerading as user role with no masquerade user 2023-11-09 16:04:53 +01:00
Feanil Patel
d32def97ab Merge pull request #33576 from thezaeemaanwar/badges_deletion_migrations
feat: Migrations for badges deletion
2023-11-09 09:06:54 -05:00
Zachary Hancock
10805a6a24 feat: remove old proctoring settings url (#33679)
This flag was introduced to gate the rollout of moving the UI component for proctoring settings into the pages and resources view and was never cleaned up. At this point we should always be linking the the new page for proctoring settings.
2023-11-09 08:54:28 -05:00
Muhammad Adeel Tajamul
bee0a98613 feat: added new thread notifications behind new course wide waffle flag (#33602) 2023-11-07 11:47:43 +05:00
Rodrigo Martin
e51c01bf4e feat: add support for user feedback on autogenerated transcripts (#33518)
* feat: WIP transcript feedback

* feat: Add UI mock for Transcript Feedbacks (#33416)

* feat: Add UI mock for Transcript Feedbacks

* fix: Fix mongo tests

* feat: Get video_uuid, user_uuid and language for request (#33445)

* feat: make call to ai-translations to obtain feedback

* feat: Show widget if transcript was AI generated

* feat: bind all class methods

* fix: async calls

* feat: send request when choosing feedback

* feat: update showing condition (#33474)

* fix: ajax success lint

* fix: video caption specs errors fixed

* feat: add coverage to feedback widget

* chore: connect XT to LMS and CMS

* feat: use url

* chore: add vars to devstack

* chore: fix url name

* feat: update unit tests regarding env vars

* fix: fix test_video_mongo

* feat: add more tests

* feat: remove console log

Co-authored-by: Jesper Hodge <19345795+jesperhodge@users.noreply.github.com>

* fix: rename shouldShowWidget to loadAndSetVisibility

---------

Co-authored-by: María Guillermina Véscovo <mvescovo@2u.com>
Co-authored-by: Jesper Hodge <19345795+jesperhodge@users.noreply.github.com>
2023-11-06 16:33:53 +00:00
Rebecca Graber
ddabba458b feat: remove manual sends of events (#33642) 2023-11-03 10:36:50 -04:00
Feanil Patel
9ba9935fb6 Merge pull request #32802 from openedx/feanil/default_drf_auth_class
feat: Add JwtAuthentication as a default DRF auth class.
2023-11-02 10:05:50 -04:00
Feanil Patel
66e987997c Revert "Revert "chore: remove bok-choy settings"" 2023-11-01 13:41:37 -04:00
KyryloKireiev
258f3fc8a0 fix: [FC-0031] Add limit the number of returned results for mobile_search 2023-11-01 17:07:52 +02:00
Kyrylo Kireiev
763b102ac9 fix: [AXIM-50] Fix count items in pagination 2023-11-01 17:07:52 +02:00
Feanil Patel
ac2cc158f8 test: Update tests to the new return code.
When including `JwtAuthentication`, the auth_header becomes `JWT
realm="api"`. Without it, it is `None`. This changes the behavior of the
code in DRF and returns a slightly different auth response.

Relevant Code: 56946fac8f/rest_framework/views.py (L456C3-L456C3)
2023-11-01 11:03:03 -04:00
Feanil Patel
7af2b1db24 feat!: Add JwtAuthentication as a default DRF auth class.
By default DRF sets 'DEFAULT_AUTHENTICATION_CLASSES' to:

```
[
    'rest_framework.authentication.SessionAuthentication',
    'rest_framework.authentication.BasicAuthentication'
]
```

We also want to allow for JWT Authentication as a valid default auth
choice.  This will allow users to send JWT tokens in the authorization
header to any existing API endpoints and access them. If any APIs have
set custom authentication classes, this will not override that.

I believe this is a fairly safe change to make since it only adds one
authentication class and does not impact authorization of any of the
endpoints that might be affected.

Note: This change changes the default for both the LMS and CMS because
`cms/envs/common.py` imports this value from the LMS.

BREAKING CHANGE: For any affected endpoint that also required the user
to be authenticated, the endpoint will now return a 401 in place of a
403 when the user is not authenticated.

- See [these DRF docs](https://github.com/encode/django-rest-framework/blob/master/docs/api-guide/authentication.md#unauthorized-and-forbidden-responses) for a deeper explanation about why this changes.

- Here is [an example endpoint](b8ecfed67d/openedx/core/djangoapps/embargo/views.py (L20-L21)) that does not override defaults and checks for IsAuthenticated.

Generally speaking, this is should not be a problem. An issue would
appear only if the caller of the endpoint is specifically handling 403s
in a way that would be missed for 401s.
2023-11-01 11:03:03 -04:00
muhammad-ammar
55442ec2a9 feat: add enterprise customer related setting 2023-11-01 15:53:28 +05:00
Robert Raposa
083ccbf09b Revert "chore: remove bok-choy settings" 2023-10-31 15:27:44 -04:00
Feanil Patel
3003abb092 Merge pull request #33350 from salman2013/salman/remove-bok-choy
chore: remove bok-choy settings
2023-10-31 11:19:56 -04:00
lunyachek
9649e55502 fix: Absent message after submiting "Generate Exception Certificates" button at Instructor tab 2023-10-30 18:58:32 +02:00
Cristhian Garcia
9e65024744 feat: emit signal for thread, response, and comment created events (#33395) 2023-10-30 11:46:39 -04:00
Moeez Zahid
ba1f382471 feat: Add scope user_id to JWT payload (#33455) 2023-10-30 07:56:58 +05:00
salman2013
942e713ff0 chore: resolve conflicts 2023-10-26 14:20:26 +05:00
thezaeemaanwar
216f8df0d2 feat: Migrations for badges deletion 2023-10-26 01:03:26 +05:00
Muhammad Umar Khan
5b469371d5 chore: update connect_timeout for memcache server (#33594) 2023-10-25 17:11:12 +00:00
Muhammad Adeel Tajamul
07ae24aaab feat: added sender_id to notification generated events (#33544) 2023-10-24 11:09:00 +05:00
salman2013
8d7e451c98 Merge remote-tracking branch 'upstream/master' into salman/remove-bok-choy 2023-10-24 09:06:15 +05:00
Sarina Canelake
b917e627ab fix: Use Open edX as a noun on the default Open edX homepage 2023-10-23 13:15:57 -04:00
salman2013
9452cef97d chore: resolve conflicts 2023-10-23 12:05:25 +05:00