Commit Graph

7419 Commits

Author SHA1 Message Date
Feanil Patel
cec9499cdb Merge pull request #35551 from openedx/repo-tools/upgrade-python-requirements-45d328f
chore: Upgrade Python requirements
2024-09-26 14:13:23 -04:00
Feanil Patel
2a3a0c489d test: Update a test based on changes to pytz.
pytz dropped the Asia/Almaty timezone according to IANA

640c9bd426 (diff-16061815f611262054e469307ca063a4ef47e158a97784f1e91d254f074324bfR72)
2024-09-26 12:59:15 -04:00
Feanil Patel
ad78699605 test: Use the correct exception.
This test doesn't actually care about the type of the exception but use
the Requests exception that you're likely to get instead of the
edx-restapi-client/slumber one from before we dropped them.
2024-09-26 12:46:10 -04:00
Braden MacDonald
8f47c0b274 fix: whitespace issues in some capa problem index_dictionary content (#35543) 2024-09-26 09:34:58 -07:00
Rômulo Penido
d4dbc354bc feat: return modified field on get component endpoint (#35508) 2024-09-25 14:32:35 -05:00
Jillian
5446877a86 Soft delete collections (#35496)
* refactor: use django signals to trigger LIBRARY_COLLECTION events

* refactor: use collection usage_key as search document id

This change standardises the search document "id" to be a meilisearch ID
generated from the usage key, for all types of indexed objects.

This is important for collections so we can locate the collection
document in the search index solely from the data provided by the
LIBRARY_COLLECTION_DELETED event (library_key + collection_key), even if
the collection has been deleted from the database.

* refactor: avoid fetching more data than we have to.

* get_library_collection_usage_key and
  searchable_doc_tags_for_collection do not need a Collection object;
  the usage key can be created from the library_key and collection_key.

* updated searchable_doc_for_collection to require the parts of the
  collection usage key + an optional collection. This allows us to
  identify the collection's search document from its usage key without
  requiring an existing Collection object (in case it's been deleted).
  Also removes the edge case for indexing Collections not associated
  with a ContentLibrary -- this won't ever really happen.

* feat: remove soft- and hard-deleted collections from search index

* feat: adds library_component_usage_key to content_libraries.api

* refactor: send CONTENT_OBJECT_ASSOCIATON_CHANGED on django model signals

so that added/removed collections are removed/re-added to component documents.

Special case: When a collection is soft-deleted/restored, we detect this
in the search index and update the collection's component documents
directly, without a CONTENT_OBJECT_ASSOCIATON_CHANGED signal.


* chore: bumps openedx-learning to 0.13.0
2024-09-25 13:29:18 -05:00
Kyle McCormick
f65403975a fix: don't wrap HTML data with newlines when serializing for LC (#35532)
When serializing to OLX, the Learning Core runtime wraps HTML content in
CDATA to avoid having to escape every individual `<`, `>`, and `&`. The
runtime also puts newlines around the content within the CDATA,
So, given HTML content `...`, we get `<![CDATA[\n...\n]]>`.

The problem is that every time you serialize an HTML block to OLX, it
adds another pair of newlines. These newlines aren't visible to the end
users, but they do make it so that importing and exporting content never
reached a stable, aka "canonical" form. It also makes unit testing
difficult, because the value of `html_block.data` becomes a moving
target.

We do not believe these newlines are necessary, so we have removed them
from the `CDATA` block, and added a unit test to ensure that HTML blocks
having a canonical serialization.

Closes: https://github.com/openedx/edx-platform/issues/35525
2024-09-25 14:32:25 +00:00
Ahtisham Shahid
b50c42318c feat: added country disabling feature (#35451)
* feat: added country disabling feature
2024-09-25 14:40:08 +05:00
Eemaan Amir
a2e2959617 chore: update default notification preference for ora_grade_assigned (#35522)
* chore: update default notification preference for ora_grade_assigned

* test: updated tests
2024-09-23 18:06:03 +05:00
Navin Karkera
c71414a247 feat: add block_id field to filterable attributes of meilisearch (#35493) 2024-09-20 12:12:41 -05:00
Brian Mesick
471bdd232a Merge pull request #34971 from raccoongang/NiedielnitsevIvan/FC-0047/feature/implement-push-notifications-chanel
feat: [FC-0047] add mobile push notifications functionality
2024-09-20 10:02:24 -04:00
Zachary Hancock
0196def99d feat: use idv approved event (#35470)
* feat: replace LEARNER_NOW_VERIFIED signal with new openedx-event
2024-09-19 09:24:20 -04:00
Eemaan Amir
ad23992a5d feat: added ORA graded notification (#35389)
* feat: added ORA graded by staff notification

* test: updated and added new unit tests

* feat: added waffle flag and updated notification
2024-09-19 13:09:09 +05:00
Braden MacDonald
00632d9cae feat: When editing a v2 library xblock, update search index synchronously (#35495) 2024-09-18 10:06:36 -07:00
Chris Chávez
5927be7e0e feat: Add collection tags to index [FC-0062] (#35483)
* feat: Add collection tags to index

* feat: Add api functions to update tags in collections

* feat: Update tags on index when tag_object
2024-09-17 11:52:02 -05:00
Rômulo Penido
a94b5af403 feat: return publishing information on get component endpoint [FC-0062] (#35476)
* feat: return publishing information on get component endpoint

* feat: read data from component.versioning.draft

* test: update tests

* chore: update openedx-learning

---------

Co-authored-by: Jillian <jill@opencraft.com>
Co-authored-by: Chris Chávez <xnpiochv@gmail.com>
2024-09-16 14:03:08 -05:00
Mohammad Ahtasham ul Hassan
6a63cfcaa4 feat: add override option to upgrade CTA utils and add course_run_key identifier (#35441)
* feat: add override option to upgrade CTAs and send course_run_key identifier
2024-09-16 13:15:51 +05:00
Rômulo Penido
bb6ac5a898 feat: new unstable URL to render a v2 library xblock in an iframe (#35473) 2024-09-13 11:45:33 -07:00
Chris Chávez
dd59dc634a Tag in Collections [FC-0062] (#35383)
* feat: Allow tag in collections

* chore: Bump version of opaque-keys
2024-09-13 09:19:25 -05:00
Jillian
c41fe89918 Store content object collections in search index [FC-0062] (#35469)
* feat: Add Library Collections REST endpoints

* test: Add tests for Collections REST APIs

* chore: Add missing __init__ files

* docs: Add warning about unstable REST APIs

* feat: emit CONTENT_OBJECT_ASSOCIATIONS_CHANGED
whenever a content object's tags or collections have changed,
and handle that event in content/search.

The deprecated CONTENT_OBJECT_TAGS_CHANGED event is still emitted when
tags change; to be removed after Sumac.

* docs: replaces CONTENT_OBJECT_TAGS_CHANGED with CONTENT_OBJECT_ASSOCIATIONS_CHANGED

* chore: updates openedx-events==9.14.0

* chore: updates openedx-learning==0.11.4

Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>
Co-authored-by: Chris Chávez <xnpiochv@gmail.com>
Co-authored-by: Rômulo Penido <romulo@thinkdash.dev>
2024-09-13 08:20:54 -05:00
Ivan Niedielnitsev
5fe7a2e2bb Merge branch 'master' into NiedielnitsevIvan/FC-0047/feature/implement-push-notifications-chanel 2024-09-12 12:26:50 +03:00
Yusuf Musleh
7665f13547 feat: Add Library Collections REST endpoints [FC-0062] (#35321)
* feat: Add Library Collections REST endpoints

* test: Add tests for Collections REST APIs

* chore: Add missing __init__ files

* feat: Add events emitting for Collections

* feat: Add REST endpoints to update Components in a Collections (temp) (#674)

* feat: add/remove components to/from a collection

* docs: Add warning about unstable REST APIs

* chore: updates openedx-events==9.14.0

* chore: updates openedx-learning==0.11.4

* fix: assert collection doc have unique id

---------

Co-authored-by: Jillian <jill@opencraft.com>
Co-authored-by: Chris Chávez <xnpiochv@gmail.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
2024-09-11 13:21:10 -05:00
Ivan Niedielnitsev
6a2fe8cd03 Merge branch 'master' into NiedielnitsevIvan/FC-0047/feature/implement-push-notifications-chanel 2024-09-11 15:26:22 +03:00
Tim McCormack
b615a8767f feat: Convert contentserver to view permanently (drop middleware and flag) (#35420)
Final planned portion of https://github.com/openedx/edx-platform/issues/34702 -- waffle flag and middleware are removed.

Commits:

1. Feature change
    - Delete `content_server.use_view` waffle flag in favor of always using view
    - Delete the husk of `StaticContentServerMiddleware` and references to it
    - Update views module docstring
2. Refactor (move)
    - Move contentserver implementation into views.py
3. Lint cleanup
    - Fix import ordering (from refactor debris + amnestied lint)
2024-09-06 14:42:32 +00:00
Іван Нєдєльніцев
13e3024ae3 style: [FC-0047] fix code style issues 2024-09-06 17:40:26 +03:00
Glib Glugovskiy
c733dc8584 fix: remove docs from app level 2024-09-05 15:32:06 +03:00
Glib Glugovskiy
69078f3eed refactor: change name of the policy to course push optout 2024-09-05 15:30:07 +03:00
Іван Нєдєльніцев
742a878698 docs: [FC-0047] add docs for setting up mobile push notifications 2024-09-05 15:29:48 +03:00
Ivan Niedielnitsev
28eb406f8d feat: [FC-0047] add settings for edx-ace push notifications
feat: [FC-0047] Add push notifications for user enroll

feat: [FC-0047] Add push notifications for user unenroll

feat: [FC-0047] Add push notifications for add course beta testers

feat: [FC-0047] Add push notifications for remove course beta testers

feat: [FC-0047] Add push notification event to discussions
2024-09-05 15:29:48 +03:00
Muhammad Adeel Tajamul
f8bf592483 fix: added course_id in email sent event (#35422) 2024-09-05 15:01:43 +05:00
Juliana Kang
51d538cbe7 fix: Remove B2C Subscriptions (#35303)
REV-3697
2024-09-04 14:01:45 -04:00
Navin Karkera
ec34753043 fix: update library v2 search index synchronously (#35367)
Discarded components need to be removed from index in sync to make sure
that users see the latest updated data.
2024-08-30 12:16:02 -07:00
Robert Raposa
311da82ff9 feat: DEPR USE-JWT-COOKIE header - Part 1 (#35401)
This repo is no longer using USE-JWT-COOKIE header,
since it has the required edx-drf-extensions>10.2.0,
where it was fully removed.

This removes all uses of the header, except updating
CORS_ALLOW_HEADERS, which can't be done before all
MFEs and other callers stop sending the header.

See "[DEPR]: USE-JWT-COOKIE header" for more details:
- https://github.com/openedx/edx-drf-extensions/issues/371
2024-08-30 10:40:21 -04:00
Robert Raposa
01c718dfb2 Revert "feat: DEPR USE-JWT-COOKIE header (#35393)" (#35397)
This reverts commit 1c2b804ef7.
2024-08-29 11:23:05 -04:00
Muhammad Adeel Tajamul
b323e65eeb feat: added content block in email notification template (#35391) 2024-08-29 18:08:20 +05:00
Muhammad Adeel Tajamul
481a50717a feat: updated content in course_update notification (#35373) 2024-08-29 18:07:57 +05:00
Robert Raposa
1c2b804ef7 feat: DEPR USE-JWT-COOKIE header (#35393)
This repo is no longer using USE-JWT-COOKIE header,
since it has the required edx-drf-extensions>10.2.0,
where it was fully removed.

This is final clean-up for this repo.

See "[DEPR]: USE-JWT-COOKIE header" for more details:
- https://github.com/openedx/edx-drf-extensions/issues/371
2024-08-29 08:27:47 -04:00
Blue
ea596d6a25 fix: convert totalRegistrationTime to snake case (#35333)
* fix: convert totalRegistrationTime to snake case
Description:
Convert totalRegistrationTime to snake case
VAN-1816

* fix: link issue

---------

Co-authored-by: Ahtesham Quraish <ahtesham.quraish@192.168.1.4>
Co-authored-by: Syed Sajjad  Hussain Shah <ssajjad@2u.com>
2024-08-28 14:58:14 +05:00
Navin Karkera
c65478e487 feat: index library collections in studio meilisearch index (#35324) 2024-08-27 10:45:46 -07:00
Rômulo Penido
9124e7bca4 feat: allow update xblock fields without passing data (#35320) 2024-08-27 12:31:13 -05:00
Chris Chávez
2e77e65d1c feat: Problem types added as filterable attribute [FC-0059] (#35242) 2024-08-27 11:43:29 -05:00
Deborah Kaplan
0f177e4666 feat: linting only (#35370)
Editing this file is going to cause a lot of automatic linting, so lint-only commit for nicer code review.
2024-08-26 10:20:03 -04:00
Muhammad Adeel Tajamul
71f410eb40 feat: added snowflake events for email digest unsubscribe (#35329) 2024-08-26 11:24:05 +05:00
Deborah Kaplan
6071992281 feat: lint this file (#35348)
I'm about to make a bunch of changes to this file, and before I do I'm
saving it and letting the linter reformatted to our current code style
standards, so that code reviewers won't have to read a mix of lint and
code changes.

FIXES: APER-3554
2024-08-22 14:56:51 -04:00
Navin Karkera
c3480b8f0b chore: add comment 2024-08-19 17:01:25 +05:30
Navin Karkera
fed8a803f1 test: delete documents that were never published on discard 2024-08-19 17:01:25 +05:30
Navin Karkera
e1495398e2 refactor: delete documents that were never published on discard 2024-08-19 17:01:25 +05:30
Navin Karkera
140b9bb968 refactor: delete all documents on discard 2024-08-19 17:01:25 +05:30
Navin Karkera
2efff2697b refactor: parallelize content block update on discard 2024-08-19 17:01:25 +05:30
Navin Karkera
65258117d8 fix: delete discarded drafts from meilisearch index 2024-08-19 17:01:25 +05:30