Commit Graph

6104 Commits

Author SHA1 Message Date
Kyle McCormick
2bbd8ecd18 feat!: Remove outdated Libraries Relaunch cruft (#35644)
The V2 libraries project had a few past iterations which were never
launched. This commit cleans up pieces from those which we don't need
for the real Libraries Relaunch MVP in Sumac:

* Remove ENABLE_LIBRARY_AUTHORING_MICROFRONTEND,
  LIBRARY_AUTHORING_FRONTEND_URL, and
  REDIRECT_TO_LIBRARY_AUTHORING_MICROFRONTEND, all of which are obsolete
  now that library authoring has been merged into
  https://github.com/openedx/frontend-app-authoring.
  More details on the new Content Libraries configuration settings are
  here: https://github.com/openedx/frontend-app-authoring/issues/1334

* Remove dangling support for syncing V2 (learning core-backed) library
  content using the LibraryContentBlock. This code was all based on an
  older understanding of V2 Content Libraries, where the libraries were
  smaller and versioned as a whole rather then versioned by-item.
  Reference to V2 libraries will be done on a per-block basis using
  the upstream/downstream system, described here:
  https://github.com/openedx/edx-platform/blob/master/docs/decisions/0020-upstream-downstream.rst
  It's important that we remove this support now so that OLX course
  authors don't stuble upon it and use it, which would be buggy and
  complicate future migrations.

* Remove the "mode" parameter from LibraryContentBlock. The only
  supported mode was and is "random". We will not be adding any further
  modes. Going forward for V2, we will have an ItemBank block for
  randomizing items (regardless of source), which can be synthesized
  with upstream referenced as described above. Existing
  LibraryContentBlocks will be migrated.

* Finally, some renamings:

  * LibraryContentBlock -> LegacyLibraryContentBlock
  * LibraryToolsService -> LegacyLibraryToolsService
  * LibrarySummary -> LegacyLibrarySummary

  Module names and the old OLX tag (library_content) are unchanged.

Closes: https://github.com/openedx/frontend-app-authoring/issues/1115
2024-10-15 11:32:01 -04:00
Navin Karkera
70df3deea6 feat: set collections for a library component [FC-0062] (#35600)
* feat: add & remove collections to component

Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
Co-authored-by: Chris Chávez <xnpiochv@gmail.com>
2024-10-15 15:11:54 +00:00
Justin Hynes
17122eb442 refactor: remove PII from log messages in programs tasks (#35623)
* refactor: remove PII from log messages in programs tasks

[APER-3723]

Refactors a number of log statements from the Celery tasks in the Programs Django app. This removes username (considered PII) from the log statements and opts to use LMS User ID instead.

* fix: quality
2024-10-15 08:33:36 -04:00
Braden MacDonald
5b809673b6 refactor: get rid of XBlockRuntimeSystem for v2 libraries (#35624) 2024-10-11 17:23:32 +00:00
Braden MacDonald
7316111b35 fix: Improve v2 library block permissions checks for read-only authors (#35598) 2024-10-08 10:22:41 -07:00
Zachary Hancock
c34ccffc7f feat: rework idv cert trigger (#35580)
* feat: rework idv cert trigger
* feat: separate PhotoVerification events
2024-10-04 12:58:15 -04:00
Deborah Kaplan
8c923bea24 feat!: removes deprecated v1 certificate behavior (#35562)
* feat!: removes deprecated v1 certificate behavior

this removes the long-deprecated v1  certificate behavior. This removes
the old-style date selection behavior  (ie., not a choice between
*Immediately upon passing*, *End date of course*, *A date after the course
end date*), which is no longer reliably maintained or supported in
Studio or Credentials.

FIXES: #35399
2024-10-02 12:06:57 -04:00
Muhammad Adeel Tajamul
38cddab293 feat: added notification grouping (#35368)
Co-authored-by: Ahtisham Shahid <ahtisham300@gmail.com>
2024-10-02 13:35:30 +05:00
Tim McCormack
a100166619 Merge pull request #35559 from openedx/timmc/course-asset-view-cleanup
refactor: Clean up after conversion of contentserver to view
2024-09-30 19:54:50 +00:00
Alison Langston
5043260bd6 feat: deprecate get_verification_details_by_id (#35560) 2024-09-30 11:30:46 -04:00
Tim McCormack
7b1519f82e style: Fix some lint issues that had been amnestied
Several now-irrelevant lint-disables and one legit one that was easy to
fix.
2024-09-30 14:20:39 +00:00
Tim McCormack
660c30bb2b refactor: Fix content server methods and tests (finish method lift)
Some lingering cleanup from the transition from a middleware to a view.
See https://github.com/openedx/edx-platform/issues/34702 for context.

- Remove IMPL and self/StaticContentServer references
- Add newlines to satisfy code style linter
- Fix test references
- Update module docstring
2024-09-30 14:20:39 +00:00
Tim McCormack
8b162b4f36 refactor: Lift methods out of StaticContentServer (unchanged and broken)
Remove class declaration and simply de-indent contents by 4 spaces.

This results in broken code due to lingering `self` references, but
should make diffs easier to understand.
2024-09-30 14:19:49 +00:00
Maham Akif
c67b6980f6 chore: revert learner pathway skeleton implementation (#30355) 2024-09-30 12:05:17 +05:00
Chris Chávez
de7fa09667 chore: delete unused tags_count from LibraryXBlockMetadata (#35510) 2024-09-27 10:10:05 -07:00
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