* Deprecate `get_block_draft_olx`
* Deprecate get olx view in content libraries
* Create `get_block_olx` in xblock API with support of versions
* Create get olx view in xblock
This commit introduces the new Forum V2 application, allowing users to choose between the legacy Forum V1 and the new Forum V2 at the course level.
Key Changes:
- Added waffle flag `discussions.enable_forum_v2` to enable Forum V2 for selected courses, allowing coexistence with Forum V1.
- Default data storage for Forum V2 is set to MongoDB, with an option to switch to MySQL using the waffle flag `forum_v2.enable_mysql_backend`.
- Introduced management command `forum_migrate_course_from_mongodb_to_mysql` for per-course data migration from MongoDB to MySQL.
Note: This PR does not include all unit tests for the Forum V2 native API due to ongoing migration efforts. Further updates will follow to ensure full test coverage before final release.
Co-authored-by: [Muhammad Faraz Maqsood] <faraz.maqsood@arbisoft.com>
Co-authored-by: [Ali Salman] <ali.salman@arbisoft.com>
Fixed component counter synchronization in these cases:
* When deleting a component inside a collection.
* With the library published, when adding a new component in a collection and reverting library changes.
* With the library published, when deleting a component inside a collection and reverting library changes.
Also adds a published > num_counts field in collections in the search index.
This will allow us to test protocol 2 in a stage environment before
removing the override to make 2 the default.
We may have seen a bug where something in celery (or an
associated library) was adding headers to a v1 message as
if it were a v2 message, which caused a bug in ddtrace; such
things may become more likely over time as code is written
with the assumption of v2 messages. Moving to v2 will avoid
those issues.
See https://github.com/edx/edx-arch-experiments/issues/800 for further details.
Version 0.16.3 of openedx-learning adds support for calling
create_next_component_version with the bytes data of the files to be
added, instead of just the ID of the Content object. This lets us
simplify the code in edx-platform a bit.
PII Annotations are very out of date, this commit adds most that were
missing in edx-platform, and some additional annotations to the
safelist. It is not comprehensive, several other upstream Open edX
packages also need to be updated. It also does not include removing
annotations that have been moved upstream, or been removed entirely.
Those are separate follow-on tasks.
We don't call the modulestore or update the cache here now that we are
backed by the database model. Previously the cache would change because
the `_encode_root_cache_key` function in `BlockStructureStore` class
used the `BlockstoreBlockData.VERSION` as a part of the cache key when
the data was not being cached in a DB model.
Previously, we were not caching BlockStructures to the database when we
were adding them to the store by default. Now that we are doing that,
the BlockStructureFactory test failed because it was taking a shortcut
that would no longer work. It was just creating a blockstructure that
had relations but not any block information.
Now that we're always persisting updates to the database, this broke
because to persist the structure to the database, we have to look up the
block information from the block_structure which now fails.
This change updates the test mixin to add more data so that the content
can be persisted to the database successfully as a part of this test.
This work is part of DEPR https://github.com/openedx/public-engineering/issues/32
Now that we've removed all uses for this switch remove the decleration
as well.
BREAKING CHANGE: The `block_structure.storage_backing_for_cache` will no
longer exist and its value will be ignored. If you have this switch set
in your instance you can remove it. The backing cache is now always ON.
Remove the `enable_storage_backing_for_cache_in_request` function and
its uses in the platform. The function is no longer needed because the
storage backing for the block_structure cache will be ON by default
moving forward.
BREAKING CHANGE: This `enable_storage_backing_for_cache_in_request`
function no longer exists and any calls to it should be removed. The
cache it enables is now always ON.
* feat: update preview url to direct to mfe
* fix: use url builder instead of string formatter
* fix: url redirect for never published units
* fix: remove 404 error when not a preview or staff
* feat: update sequence metadata to allow draft branch
* feat: add more authentication information to swagger
* updates the `docs-settings` to make the generated swagger
`securityDefinitions` include both JWT and CSRF methods, as well as
basic. A few linter fixes happened as a side effect.
* Put in wordier descriptions for all three, since we don't have great
shared documentation about authn/authz.
* Added CSRF to `login_session`, which also serves as a proof of concept
for other endpoits
* Also regenerated the swagger doc, which picked up some extra changes.
Generated swagger now has help and allows extra auth methods so some
preveiously unusable endpoints can be hit.
FIXES: APER-3554
At one point, we envisioned having different kinds of libraries, e.g.
a "Video" library would be distinct from a "Problem" library. Later on,
we decided on a more generalized form of Libraries, where any given
library can hold any combination of content–which would then be
organized using collections and tagging.
Due to this shift in perspective, these values haven't actually been
used for a long time. This is just getting rid of them altogether.
The biggest challenge is dealing with the mismatch between how Libraries store
assets (per-Component) and how Courses store assets (global Files and Uploads
space). To bridge this, we're going to kludge a component-local namespace in
Files and Uploads by making use of the obscure feature that you can create
folders there at an API level, even if no such UI exists.
In this commit:
* Assets work when copy-pasting between library components.
* Assets work when copy-pasting from a library to a course, with the convention
being to put that file in a subdirectory of the form:
components/{block_type}/{block_id}/file.
Note that the Studio course Files page still just shows the filename.
* Assets work when copy-pasting from a course to a library.
Top level assets are put into a static folder in the Component, per Learning
Core conventions.
Limitations:
* Roundtrips don't work properly.
* There's no normalized form, so directories will start nesting if you copy
from library and paste into course, then copy the pasted thing and paste back
into library, etc. This was deemed acceptable for Sumac.
Low level stuff:
* XBlockSerializerForLearningCore has been removed, with the url_name stripping
functionality added as an optional param to XBlockSerializer (the other stuff
was for children and "vertical" -> "unit" conversion, neither of which are
relevant now).
* url_name is now stripped out of anything added to the clipboard, so that we
don't end up writing it in block.xml when it is redundant (and would be
stripped out with the next write anyway).
For the Libraries Relaunch Beta. This should not affect any site which
has kept New Libraries disabled.
Issue: https://github.com/openedx/frontend-app-authoring/issues/1170
Adds a new Studio-only libraries static asset endpoint at
/library_assets/blocks/{usage_key}. This endpoint will serve assets
only from the Draft branch, and is only available to people who have
read permission to the containing library.
This also moves the existing library asset endpoint that did lookups
by Component Version to /library_assets/component_versions/{uuid}
This change was motivated by the desire to make it easier to make the
editor preview work for images by having a single URL that will
consistently point to the latest version of the asset, rather than
having a new URL after every save (which the Component Version lookup