-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Upstream Sync with Content Library Blocks
This introdues the idea of "upstream" and "downstream" content, where downstreams (like course components) can pull content updates from upstreams (like learning core-backed content library blocks). This supports the upcoming Content Libraries Relaunch Beta for Sumac. New features include: * A new XBlockMixin: UpstreamSyncMixin. * A new CMS Python API: cms.lib.xblock.upstream_sync * A new CMS JSON API: /api/contentstore/v2/downstreams * A temporary, very basic UI for syncing from Content Library blocks Implements: https://github.com/kdmccormick/edx-platform/blob/kdmccormick/upstream-proto/docs/decisions/0020-upstream-block.rst Co-Authored-By: Braden MacDonald <braden@opencraft.com>
- Loading branch information
1 parent
568fe84
commit cae9506
Showing
22 changed files
with
1,562 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,31 @@ | ||
"""Contenstore API v2 URLs.""" | ||
|
||
from django.urls import path | ||
|
||
from cms.djangoapps.contentstore.rest_api.v2.views import HomePageCoursesViewV2 | ||
from django.conf import settings | ||
from django.urls import path, re_path | ||
|
||
from cms.djangoapps.contentstore.rest_api.v2.views import home, downstreams | ||
app_name = "v2" | ||
|
||
urlpatterns = [ | ||
path( | ||
"home/courses", | ||
HomePageCoursesViewV2.as_view(), | ||
home.HomePageCoursesViewV2.as_view(), | ||
name="courses", | ||
), | ||
# TODO: Potential future path. | ||
# re_path( | ||
# fr'^downstreams/$', | ||
# downstreams.DownstreamsListView.as_view(), | ||
# name="downstreams_list", | ||
# ), | ||
re_path( | ||
fr'^downstreams/{settings.USAGE_KEY_PATTERN}$', | ||
downstreams.DownstreamView.as_view(), | ||
name="downstream" | ||
), | ||
re_path( | ||
fr'^downstreams/{settings.USAGE_KEY_PATTERN}/sync$', | ||
downstreams.SyncFromUpstreamView.as_view(), | ||
name="sync_from_upstream" | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
"""Module for v2 views.""" | ||
|
||
from cms.djangoapps.contentstore.rest_api.v2.views.home import HomePageCoursesViewV2 | ||
Oops, something went wrong.