Commit Graph

7112 Commits

Author SHA1 Message Date
Erica Nwoga
a74f510f71 feat: post handler for agreements api (#33488) 2023-12-11 13:58:35 -05:00
Muhammad Adeel Tajamul
cf6a629ee7 fix: discussion tab should be None if discussion tab is disabled (#33861) 2023-12-11 15:06:37 +05:00
Braden MacDonald
4c48f54de7 fix: two bugs with copy/paste functionality (#33897)
* fix: error pasting a unit containing a completely blank problem
* fix: copying an XBlock with emoji content would fail
2023-12-08 10:09:18 -08:00
Juliana Kang
01f60b54e5 feat: Financial assistance form learner privacy update (#33808)
REV-2764
2023-12-08 10:59:45 -05:00
Phillip Shiu
a964f637e7 fix: improve regex for contains_url (#33886)
This regex is used for checking if a field contains a URL. We did this because we didn't want URLs in a user's "full name".

The capturing groups on the current regex are not needed to capture a URL. This commit simplifies and makes the regex stricter by banning the character combination "://".
2023-12-08 10:25:48 -05:00
Kyle McCormick
140f85853d feat!: remove Content Libraries V2 index (#33888)
BREAKING CHANGE: Removes all code, tests, and settings related to
indexing of V2 (blockstore-backed) content libraries in elasticsearch.
This includes indexing of top-level library metadata as well as indexing
of library block metadata. Operators who enabled the experimental
Library Authoring MFE *and* the experimental ENABLE_CONTENT_LIBRARY_INDEX
feature may notice that sorting, filtering, and searching of V2
libraries and their blocks may now be slower and/or less powerful.
The ENABLE_CONTENT_LIBRARY_INDEX feature was already disabled by
default, so most/all operators (including edx.org) should not notice
any difference.

Removed settings include:

* FEATURES['ENABLE_CONTENT_LIBRARY_INDEX']
* ENABLE_ELASTICSEARCH_FOR_TESTS
* TEST_ELASTICSEARCH_USE_SSL
* TEST_ELASTICSEARCH_HOST
* TEST_ELASTICSEARCH_PORT

For rationale, see the updated "Status" section of:
./openedx/core/djangoapps/content_libraries/docs/decisions/0001-index-libraries-in-elasticsearch.rst
2023-12-07 14:57:31 -05:00
Kyle McCormick
27803f51c8 feat!: assume & remove BLOCKSTORE_USE_BLOCKSTORE_APP_API (#33765)
Originally, Blockstore was an independent micro-service, accessed via a REST API.
Then, we changed Blockstore so it could be installed as an in-process Django app.

To support both modes, there existed a blockstore_api wrapper library in edx-platform,
with toggles controlling whether the wrapper called out to the micro-service's REST API versus the
Django app's Python API. Now that the micro-service Blockstore implementation is deprecated,
though, this wrapper library and toggles are just unnecessary complexity.

As a first step towards cleanup, we:

* remove several toggles and settings (details below);
* remove the blocokstore_api wrapper methods which called the REST API and
  marshalled them back into Python objects; and
* remove all test cases which relied on the Blockstore micro-service (and were skippped in CI).

In the future, we will remove the content libraries indexer, 
clean up the remaining bits of blockstore_api, and flatten out all
the Blockstore-related test class hierarchies which are no longer nceessary.

BREAKING CHANGE:
* These Django settings are removed:
  * BLOCKSTORE_PUBLIC_URL_ROOT
  * BLOCKSTORE_API_URL
  * BLOCKSTORE_API_AUTH_TOKEN
  * BLOCKSTORE_USE_BLOCKSTORE_APP_API
* The blockstore.use_blockstore_app_api Waffle switch is removed.
* edx-platform will act as it did when the DJango setting BLOCKSTORE_USE_BLOCKSTORE_APP_API
  or the Waffle switch blockstore.use_blockstore_app_api were enabled. That is, any running Blockstore
  micro-service instance will be ignored, and the Blockstore package which is installed into edx-platform
  will be used instead.

Ref: https://github.com/openedx/blockstore/issues/296
2023-12-06 15:15:18 +00:00
Jorg Are
95959b6447 Merge pull request #33876 from openedx/hajorg/nova-50-use-xpert-translations-waffle-flag
feat: add is_ai_translations_enabled to get_course_videos_context util
2023-12-05 23:52:55 +01:00
hajorg
0190a0cc9e feat: use function to access xpert translations ui waffle flag 2023-12-05 17:56:45 +01:00
Deborah Kaplan
b8bf8af2c5 feat: remove the micro bachelors coaching external ID type
These ids have all been removed, the code that used them as long
deprecated, and they were only ever used within products currently
within the purview of 2U.

FIXES: APER-2942
2023-12-05 16:32:36 +00:00
Deborah Kaplan
5e3bc1ca30 Merge pull request #33879 from openedx/dkaplan1/APER-2941_datamigration-to-remove-the-records
feat:  remove old microbachelor's coaching external IDs
2023-12-05 11:18:14 -05:00
Kiran Chauhan
e78e6d307a fix: Added feature toggle check for account deletion API (#32846) (#33062)
---------

Co-authored-by: Edward Zarecor <ezarecor@tcril.org>
2023-12-04 15:34:51 -08:00
Deborah Kaplan
c43fd10339 feat: remove old microbachelor's coaching external IDs
The microbachelor coaching facility has been deprecated and the external
IDs are no longer supported. Remove existing ones from the DB.

FIXES: APER-2941
2023-12-04 21:32:40 +00:00
Jason Wesson
0650b4ff5e Merge pull request #33501 from Inferato/lytvynenko/additional_name_check
Name length validation
2023-12-04 11:55:21 -08:00
SaadYousaf
fed784a664 feat: add course wide notification event for notifications having wider audience 2023-12-04 15:46:12 +05:00
Tim McCormack
94441861e0 feat!: Remove legacy-ip code and Waffle switch (#33735)
This switch has been kept disabled in edx.org for well over a year with no
trouble, and the migration to `CLOSEST_CLIENT_IP_FROM_HEADERS`
was introduced in Nutmeg.

DEPR issue: https://github.com/openedx/edx-platform/issues/33733
2023-12-01 14:44:59 +00:00
Kyle McCormick
129940b562 fix: load children in a consistent manner when duplicating LC blocks (#33860)
After refactoring the library_content block to use asynchronous tasks
for syncing and duplicating children, we are seeing an error arise
during library_content duplication process on edx.org:

Traceback (most recent call last):
  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/content_libraries/tasks.py", line 305, in duplicate_children
    _copy_overrides(store=store, user_id=user_id, source_block=source_block, dest_block=dest_block)
  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/content_libraries/tasks.py", line 383, in _copy_overrides
    dest_block=dest_block.runtime.get_block(dest_child_key),
  File "/edx/app/edxapp/edx-platform/xmodule/x_module.py", line 1401, in get_block
    block = self.load_item(usage_id, for_parent=for_parent)
  File "/edx/app/edxapp/edx-platform/xmodule/modulestore/split_mongo/caching_descriptor_system.py", line 127, in _load_item
    block_data = self.get_module_data(block_key, course_key)
  File "/edx/app/edxapp/edx-platform/xmodule/modulestore/split_mongo/caching_descriptor_system.py", line 154, in get_module_data
    raise ItemNotFoundError(block_key)
xmodule.modulestore.exceptions.ItemNotFoundError: BlockKey(...)

We cannot reproduce the issue locally.
We are not entirely certain the cause of this, but we think it might
have do with caching. Specifically, the `store.get_item` and
`source_block.runtime.get_block` methods might use a different cache
than `dest_block.runtime.get_block`. It's possible that writes to
Mongo are sitting in one of those caches, causing reads from the
`dest_block.runtime`'s cache to fail to find dest_block's children.

We attempt to fix this by using the same "block getting" method
consistently. So instead of using a mix of `store.get_item`,
`source_block.runtime.get_block`, and `dest_block.runtime.get_block`,
we just use `store.get_item` everywhere.
2023-11-30 14:59:40 -05:00
connorhaugh
183e04d8b1 feat: add duplicate_children logging (#33829)
Add some logging to better capture the failures we've seen in duplication of library blocks.

Co-authored-by: Kyle McCormick <kyle@axim.org>
2023-11-29 12:56:24 -05:00
Awais Qureshi
f852594f54 Upgrading ipware (#33804)
* feat: Upgrade Python dependency django-ipware (#33805)
2023-11-29 16:15:38 +05:00
Jillian
7ff1506d32 fix: allows viewing an ObjectTag even if no taxonomy is provided (#33757) 2023-11-28 09:37:26 -08:00
Rômulo Penido
6d4463db99 fix: overwrite previous tags on taxonomy import (#33752) 2023-11-27 11:43:21 -08:00
Awais Qureshi
9998dc58fe Upgrade pillow (#33769)
* build: upgrading pillow.
2023-11-27 13:45:59 +05:00
Awais Qureshi
7634301111 Upgrading pytz package (#33760)
* chore: upgrading pytz.
2023-11-22 15:04:35 +05:00
Ahtisham Shahid
7165bb528b feat: updated filter logic to send notifications (#33743)
* feat: updated filter logic to send notifications
2023-11-21 13:35:36 +05:00
Muhammad Adeel Tajamul
3fc8e5a9fb test: added tests for send_notification (#33728) 2023-11-21 12:22:05 +05: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
edX requirements bot
c240fd8b52 Python Requirements Update (#33737)
* chore: Updating Python Requirements
* fix: fix test failure occurring due to faker upgrade
---------

Co-authored-by: UsamaSadiq <usama7274@gmail.com>
2023-11-17 23:56:24 +05:00
Braden MacDonald
ed379926c2 feat: display tag counts on course outline page (feature flagged) (#33696)
* feat: display tag counts on outline

* fix: taxonomies should default to allow_multiple=True

* fix: only load counts once per request

* chore: version bump for openedx-learning
2023-11-16 10:03:13 -08: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
Muhammad Adeel Tajamul
1806b290b8 fix: course wide preferences are visible when patch call is sent (#33726) 2023-11-16 14:41:28 +05:00
Phillip Shiu
94658f5890 feat: add ip_chain.safest_client_ip to emitted XForwardedForMiddleware metrics (#33720)
This commit adds the result of get_safest_client_ip() to the emitted metrics of
XForwardedForMiddleware.
2023-11-15 22:13:32 +00:00
Taras Lytvynenko
369903986c Merge branch 'master' of github.com:openedx/edx-platform into HEAD 2023-11-15 16:50:51 +02:00
Glib Glugovskiy
e27f674e12 fix: remove duplicate implementation and correct the docstring 2023-11-14 21:45:18 +02:00
KyryloKireiev
da9266e31d refactor: [FC-0031] Move get_profile_image method to api 2023-11-14 21:45:18 +02:00
Rômulo Penido
034d6322d0 feat: add import taxonomy endpoint to content_tagging (#33663) 2023-11-14 11:12:18 -08:00
Taras Lytvynenko
13d7945370 test: fix tests 2023-11-14 21:11:16 +02:00
Taras Lytvynenko
4fa06c0236 test: test for length validation 2023-11-14 20:25:00 +02:00
Rodrigo Martin
55ee25461a feat: Create video_config.xpert_translations_ui Course Waffleflag (#33688) 2023-11-14 10:44:34 -03:00
edX requirements bot
e46c1d1e61 Python Requirements Update (#33695)
* chore: Updating Python Requirements
* fix: fix completion test query count
---------

Co-authored-by: UsamaSadiq <usama7274@gmail.com>
2023-11-13 14:37:53 +05:00
Jillian
dad31a393a fix: allows taxonomy list to "filter by org" even if org does not exist (#33686)
If the user requests the taxonomies linked to a non-existent org, then
we still want to see the non-org taxonomies.
2023-11-09 11:23:12 -08: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
Rômulo Penido
4b4e370656 feat: add update taxonomy orgs REST API (#33611) 2023-11-07 11:24:43 -08: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
Braden MacDonald
32bb4c5057 chore: update openedx-learning, new object tags API format (unstable) (#33651) 2023-11-06 11:54:16 -08: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
Piotr Surowiec
2cf4d73a98 Merge pull request #33601 from DanielVZ96/dvz/clean-warnings
chore: clean and fix console warnings
2023-11-06 16:50:37 +01: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
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