Commit Graph

7185 Commits

Author SHA1 Message Date
salmannawaz
57b480b04f Update all edx-platform REST endpoints to support JWT Auth (#34152)
* chore: update API endpoints to support default JWT auth

The default DRF Auth classes were recently updated to allow for both JWT and Session auth by default. Any endpoint that overrides the AUTHENTICATION_CLASSES but has just session, just JWT or just both of those should be updated to remove the override.

Details in https://github.com/openedx/edx-platform/issues/33662
2024-02-13 10:46:58 -05:00
Rômulo Penido
c2d91c343e refactor: remove ContentObjectTag model and related functions (#34146) 2024-02-08 11:55:39 -08:00
Chris Chávez
e22b938b27 feat: Export ID on Taxonomy (in Studio's tagging API) (#34143) 2024-02-08 10:01:55 -08:00
Priyanshu
81611a7a8e fix: change deprecated defusedxml.lxml to defusedxml.common (#34177) 2024-02-08 08:41:42 +10:30
Agrendalath
c1bd558ad6 fix: handle countries not recognized by geoip2 DB
The `geoip2` library returns `None` when it only identifies the continent
related to the IP address.
2024-02-07 17:14:39 +01:00
ayesha waris
48f74fd8f3 feat: make notification channel headings clickable (#34194)
* feat: make notification channel headings clickable in notification preferences

* refactor: serializer code updated for better readability

* test: added a test for UserNotificationChannelPreferenceView API

* fix: updated the api test that was failing due to conflicts

---------

Co-authored-by: eemaanamir <eemaan.amir@gmail.com>
2024-02-07 14:40:55 +05:00
Muhammad Adeel Tajamul
d9d5531db6 feat: skip notification creation if context is not valid (#34133) 2024-02-06 12:17:12 +05:00
Ben Lu
2de48c1177 fix: auth JWKS endpoint
The original implementation of the endpoint returned
a string instead of a JSON object. This fixes the
return value to be the JSON object.
2024-02-02 16:46:07 -06:00
Benny
43747ee8f0 Merge pull request #34153 from hilltop16/hilltop16/add-auth-JWKS-endpoint
feat: add auth JWKS endpoint
2024-02-02 09:16:37 -06:00
Muhammad Soban Javed
e40a01c7cc feat!: upgrade Django version to 4.2 (LTS)
This reverts commit 23659d5ba8.
2024-02-02 17:08:54 +05:00
David Ormsbee
a9bd61d015 fix: make content_libraries ADR headers match doc guidelines
https://docs.openedx.org/en/latest/documentors/references/quick_reference_rst.html#headings
2024-02-01 16:15:42 -05:00
David Ormsbee
9d3625717c docs: ADR for course data independence from libraries
This is an ADR around the idea that course content should not need to
sync metadata from libraries during the import process or when copy and
pasting.
2024-02-01 16:15:42 -05:00
Feanil Patel
e6333d0c3d Merge pull request #33922 from Zeit-Labs/plugins-i18n
feat: atlas pull plugins translation | FC-0012
2024-02-01 13:07:32 -05:00
Usama Sadiq
23659d5ba8 Revert "feat!: upgrade Django version to 4.2 (LTS) (#34162)" (#34165)
This reverts commit 1fc2e8a771.
2024-02-01 19:29:56 +05:00
Muhammad Soban Javed
1fc2e8a771 feat!: upgrade Django version to 4.2 (LTS) (#34162)
* feat!: upgrade Django version to 4.2 (LTS)
---------

Co-authored-by: iamsobanjaved <iamsobanjaved@users.noreply.github.com>
2024-02-01 16:10:34 +05:00
ayesha waris
9f136a4149 feat: added notifications when response is endorsed or answered (#34082)
* feat: added notification when response is endorsed or answered

* test: added and fixed test cases

* fix: fixed lint errors

* refactor: changed method name for readibility

* feat: added notification when my response is endorsed

* test: fixed failed test cases
2024-02-01 13:33:16 +05:00
Deborah Kaplan
33cd62e68c Merge pull request #34129 from openedx/dkaplan1/APER-3146_investigate-fix-exception-handling-in-program-cert-revocation
feat: fix exception handling in program cert revocation
2024-01-31 13:59:20 -05:00
Ben Lu
a189bdd9fb feat: add auth JWKS endpoint
Adds an endpoint to expose JWT_PUBLIC_SIGNING_JWK_SET to other services
2024-01-31 10:15:42 -06:00
Muhammad Soban Javed
790e364097 Revert "chore!: upgrade Django version to 4.2 (LTS)" 2024-01-31 17:14:43 +05:00
Awais Qureshi
82edbc635c Merge branch 'master' into iamsobanjaved/django-42-lts 2024-01-31 13:46:58 +05:00
Deborah Kaplan
b75f8b0ed1 feat: tweaks from code review
wording, switching to using a constant, fixing a string concat

FIXES: APER-3146
2024-01-30 21:34:56 +00:00
Alejandro Cardenas
4b7ef2697e feat: add state sent to state column (#34127) 2024-01-30 15:14:14 -05:00
Alejandro Cardenas
3bf3aeaf31 refactor: change survey report message location (#34126)
* refactor: change survey report message location
2024-01-30 15:13:54 -05:00
Adolfo R. Brandes
cbe865a77f Merge pull request #34036 from raccoongang/ruzniaievdm/feat/unit-page-drf
feat: [FC-0044] Unit page API as DRF
2024-01-30 19:23:12 +00:00
Deborah Kaplan
f7a9efbf6b feat: lint
autoformat errors

FIXES: APER-3146
2024-01-30 18:59:13 +00:00
Deborah Kaplan
a387737daf Merge branch 'master' into dkaplan1/APER-3146_investigate-fix-exception-handling-in-program-cert-revocation 2024-01-30 12:40:34 -05:00
Deborah Kaplan
adae7e3e25 feat: relinting
Trying with new autoformat settings.

FIXES: APER-3146
2024-01-30 17:39:57 +00:00
Asespinel
76330b36b0 feat: added setting to disable the survey report banner entirely (#34092)
* feat: added setting to disable the survey report banner entirely

* fix: fixed unit test with new setting

* refactor: changed conditions for better code readability

* feat: added exception to stop the report from generating if the setting is set to false

* chore: updated the readme file to include the new setting

* refactor: move survey settings to common and disable admin by setting

* docs: typos in README

Co-authored-by: Tim McCormack <tmccormack@edx.org>

* refactor: set default values to survey report settings

* refactor: rename ENABLE_SURVEY_REPORT setting to SURVEY_REPORT_ENABLE

* test: fix quality tests

---------

Co-authored-by: Alejandro Cardenas <alecar.main@gmail.com>
Co-authored-by: Tim McCormack <tmccormack@edx.org>
2024-01-30 12:29:09 -05:00
Deborah Kaplan
bde84117c3 feat: linting error
* unused import
* format

FIXES: APER-3146
2024-01-30 16:36:14 +00:00
Deborah Kaplan
02baf07a03 Merge branch 'master' into dkaplan1/APER-3146_investigate-fix-exception-handling-in-program-cert-revocation 2024-01-30 10:56:16 -05:00
Deborah Kaplan
918f32ab40 feat: fixed one test
* fixed one test to accommodate a slightly modified workflow
* allowed the automated linter  to match current standards

Note:  as part of this process, I realized a lot of the tests in `programs/tests/test_tasks.py` are somewhat problematic. Some aren't real unit tests (allow calls to something other than the system under test), at least one for that reason it won't run on local at all, and some mock the wrong part of the system  or just don't match current flow.  I'm not modifying them as part of this, but they should be looked at.

FIXES: APER-3146
2024-01-30 15:53:29 +00:00
Awais Qureshi
79f1c66553 Merge branch 'master' into iamsobanjaved/django-42-lts 2024-01-30 12:53:33 +05:00
Ahtisham Shahid
039583f88f feat: added reported notification type (#34067) 2024-01-30 12:07:49 +05:00
Syed Sajjad Hussain Shah
cb2a34e51f feat: logout other sessions on email change (#33846)
* feat: logout other sessions on email change

* fix: updated the approach for session invalidation

* fix: update and add tests

* fix: update tests with descriptive comments

* feat: add integration tests

* fix: store email in session update

* fix: add setting for tests

* fix: fix tests

* feat: Upgrade Python dependency edx-drf-extensions (#34135)

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

Co-authored-by: syedsajjadkazmii <syedsajjadkazmii@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: syedsajjadkazmii <syedsajjadkazmii@users.noreply.github.com>
2024-01-29 14:43:51 +05:00
Saad Yousaf
928e810b33 Revert "temp: add temporary logs for course wide notifications" 2024-01-29 12:42:39 +05:00
Omar Al-Ithawi
867eeff993 feat: atlas pull plugins translation 2024-01-27 12:05:05 +03:00
Deborah Kaplan
ae3ce9c498 feat: fix exception handling in program cert revocation
To determine whether or not we need to  revoke any program certificates, we first run get_revokable_program_uuids. This calls get_certified_programs, which calls get_credentials, which uses the OpenEdx Core  utility method get_api_data. get_api_data makes the API call inside a try block, does raise_for_status  also inside the try block, and then catches the exception, logs it, and returns an empty result to the caller.

This means that on a failure to call the credentials API, get_credentials can’t  tell the difference between a failure to hit the API (because credentials is, as it sometimes is during a notify_programs run, overloaded), or a learner with no program certificates. In this particular case, this is absolute failure, incorrect behavior.

* Adds a new flag, `raise_on_error`  which will make `get_api_data` log the exception and then re-raise the HTTPError,  defaulting to false in order to avoid changing the behavior on any other callers
* Also: my editor reformatted all of the touched files to our modern code standards, and it seemed appropriate to let it do that.
* Also: added type hints in some cases, because they helped me write the code and debug. Our test suite definitely  reports mypy  results on type errors so we are verifying that hints are correct.

FIXES: APER-3146
2024-01-26 22:20:30 +00:00
Chris Chávez
5838d68efc feat: Tagging UX refinements - refresh tag count on edit (#34059)
* style: drawer-cover color updated for all tagging drawers
* feat: Update TagList component when a tag is updated on Manage tags drawer
* feat: Refactor TagCount to be able to refresh the count
* feat: Sync tag count in units
2024-01-25 10:33:47 -08:00
Jillian
7535f9d581 feat: tagging: serialize object permissions to REST API (#34004) 2024-01-25 10:12:17 -08:00
Muhammad Soban Javed
67d53dce26 chore!: upgrade Django version to 4.2 (LTS)
This reverts commit 6f32d0e6f1.
2024-01-25 18:17:43 +05:00
Brian Beggs
48d9f29cb9 Revert "refactor: changed survey report message location and added a new info…" 2024-01-24 17:26:08 -05:00
Justin Hynes
426ee163bc revert: add brand_color variable for the email templates (#33421)"
This reverts commit 4ec70eb98b.

This commit introduced a new setting (`brand_color`) that does not appear to be set and is causing issues with account deletion and other parts of the courseware.

Reverting until we can understand the change better.
2024-01-24 18:47:02 +00:00
Yusuf Musleh
2323b3b21a feat: Add lang auto tagging for v2 library blocks (#34056) 2024-01-23 10:00:40 -08:00
Muhammad Soban Javed
6f32d0e6f1 Revert "chore!: upgrade Django version to 4.2 (LTS)" (#34095) 2024-01-23 19:07:53 +05:00
Muhammad Soban Javed
fc8e40fb10 chore!: upgrade Django version to 4.2 (LTS) (#33969)
* chore!: upgrade Django version to 4.2 (LTS)

* feat: Upgrade Python dependency Django

chore!: upgrade Django version to 4.2

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

* chore: Update common.py

* chore: Update common.py

---------

Co-authored-by: Muhammad Soban Javed <iamsobanjaved@gmai.com>
Co-authored-by: iamsobanjaved <iamsobanjaved@users.noreply.github.com>
Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2024-01-23 16:53:34 +05:00
bydawen
4ec70eb98b feat: add brand_color variable for the email templates (#33421)
* feat: add brand_color variable for the email templates

* test: fix tests assertations

---------

Co-authored-by: Eugene Dyudyunov <evgen.dyudyunov@raccoongang.com>
2024-01-23 13:21:06 +05:00
Justin Hynes
ee380b7563 feat: Use built-in retry features of Celery when retrying Credentials grading tasks 2024-01-22 18:09:44 +00:00
Asespinel
00630cf22d refactor: changed survey report message location and added a new info… (#34033)
* refactor: changed survey report message location and added a new informative sent state

* chore: added Generate and Send text on button

* chore: added comment to new state column and added reference to static jquery.

* fix: fixed non Attribute error when a report hasn't been sent yet
2024-01-16 16:25:05 -05:00
Kyle D. McCormick
ef0fc97a2d fix: in generate_block_key, get the usage key's block_id, not usage_id
UsageKeys don't have a usage_id field. This line would have crashed
if run.
2024-01-16 09:37:40 -05:00
Kyle D. McCormick
e8b60aef60 fix: move BlockKey and derived_key to avoid cyclical import
After we merged this PR: https://github.com/openedx/edx-platform/pull/33920
this error began popping up in logs:

    Unable to load XBlock 'staffgradedxblock'
    ....
    ImportError: cannot import name 'get_course_blocks' from
    partially initialized module 'lms.djangoapps.course_blocks.api'
    (most likely due to a circular import) ...

The root cause was the new imports of `derived_key` and `BlockKey` into
xmodule/library_content_block.py. Those new imports come from
xmodule/modulestore/store_utilities.py, which runs
`XBlock.load_classes()` at the module level, which fails because we are
still in the process of loading xmodule/library_content_block.

As a solution, we move both `derived_key` and `BlockKey` to
xmodule/util/keys.py. We could potentially move that file to opaque-keys
eventually, depending on how well we think that those concepts generalize.

Also:

* We rename the function from derived_key to derive_key, as
  functions should be verbs.
* We combine the first to parameters of derive_key (a source ContextKey
  and a source BlockKey) into a single parameter (a source UsageKey). In
  my opinion, this makes the function call easier to understand.
2024-01-16 09:37:40 -05:00