Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/views/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ def get_unit_tags(usage_key):
Get the tags of a Unit and build a json to be read by the UI
Note: When migrating the `TagList` subview from `container_subview.js` to the course-authoring MFE,
this function can be simplified to use the REST API of openedx-learning,
this function can be simplified to use the REST API of openedx_tagging,
which already provides this grouping + sorting logic.
"""
# Get content tags from content tagging API
Expand Down
14 changes: 7 additions & 7 deletions cms/djangoapps/contentstore/views/transcripts_ajax.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@ def link_video_to_component(video_component, user):
return edx_video_id


def save_video_transcript_in_learning_core(
def save_video_transcript_in_openedx_content(
usage_key,
input_format,
transcript_content,
language_code
):
"""
Saves a video transcript to the learning core.
Saves a video transcript with the openedx_content API.
Learning Core uses the standard `.srt` format for subtitles.
openedx_content uses the standard `.srt` format for subtitles.
Note: SJSON is an edx-specific format that we're trying to move away from,
so for all new stuff related to Learning Core should only use `.srt`.
so for all new stuff related to openedx_content should only use `.srt`.
Arguments:
usage_key: UsageKey of the block
Expand Down Expand Up @@ -615,7 +615,7 @@ def choose_transcripts(request):

# 3. Upload the retrieved transcript to DS for the linked video ID.
if isinstance(video.usage_key.context_key, LibraryLocatorV2):
success = save_video_transcript_in_learning_core(
success = save_video_transcript_in_openedx_content(
video.usage_key,
input_format,
transcript_content,
Expand Down Expand Up @@ -669,7 +669,7 @@ def rename_transcripts(request):

# 3. Upload the retrieved transcript to DS for the linked video ID.
if isinstance(video.usage_key.context_key, LibraryLocatorV2):
success = save_video_transcript_in_learning_core(
success = save_video_transcript_in_openedx_content(
video.usage_key,
input_format,
transcript_content,
Expand Down Expand Up @@ -725,7 +725,7 @@ def replace_transcripts(request):
for transcript in transcript_content:
[language_code, json_content] = transcript
if isinstance(video.usage_key.context_key, LibraryLocatorV2):
success = save_video_transcript_in_learning_core(
success = save_video_transcript_in_openedx_content(
video.usage_key,
Transcript.SJSON,
json_content,
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/modulestore_migrator/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
A nice little admin interface for migrating courses and libraries from modulstore to Learning Core.
A nice little admin interface for migrating courses and libraries from modulstore to openedx_content.
"""
import logging

Expand Down
8 changes: 4 additions & 4 deletions cms/djangoapps/modulestore_migrator/api/read_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

def get_forwarding_for_blocks(source_keys: t.Iterable[UsageKey]) -> dict[UsageKey, ModulestoreBlockMigrationSuccess]:
"""
Authoritatively determine how some Modulestore blocks have been migrated to Learning Core.
Authoritatively determine how some Modulestore blocks have been migrated to openedx_content.
Returns a mapping from source usage keys to block migration data objects. Each block migration object
holds the target usage key and title. If a source key is missing from the mapping, then it has not
Expand Down Expand Up @@ -79,15 +79,15 @@ def get_forwarding_for_blocks(source_keys: t.Iterable[UsageKey]) -> dict[UsageKe

def is_forwarded(source_key: SourceContextKey) -> bool:
"""
Has this course or legacy library been authoratively migrated to Learning Core,
Has this course or legacy library been authoratively migrated to openedx_content,
such that references to the source course/library should be forwarded to the target library?
"""
return get_forwarding(source_key) is not None


def get_forwarding(source_key: SourceContextKey) -> ModulestoreMigration | None:
"""
Authoritatively determine how some Modulestore course or legacy library has been migrated to Learning Core.
Authoritatively determine how some Modulestore course or legacy library has been migrated to openedx_content.
If no such successful migration exists, returns None.
Expand Down Expand Up @@ -123,7 +123,7 @@ def get_migrations(
is_failed: bool | None = None,
) -> t.Generator[ModulestoreMigration]:
"""
Given some criteria, get all modulestore->LearningCore migrations.
Given some criteria, get all modulestore->openedx_content migrations.
Returns an iterable, ordered from NEWEST to OLDEST.
Expand Down
4 changes: 2 additions & 2 deletions cms/djangoapps/modulestore_migrator/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def default(cls) -> RepeatHandlingStrategy:
@dataclass(frozen=True)
class ModulestoreMigration:
"""
Metadata on a migration of a course or legacy library to a v2 library in learning core.
Metadata on a migration of a course or legacy library to a v2 library in openedx_content.
"""
pk: int
source_key: SourceContextKey
Expand All @@ -107,7 +107,7 @@ class ModulestoreMigration:
@dataclass(frozen=True)
class ModulestoreBlockMigrationResult:
"""
Base class for a modulestore block that was part of an attempted migration to learning core.
Base class for a modulestore block that was part of an attempted migration to openedx_content.
"""
source_key: UsageKey
is_failed: t.ClassVar[bool]
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/modulestore_migrator/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __str__(self):
class ModulestoreMigration(models.Model):
"""
Tracks the action of a user importing a Modulestore-based course or legacy library into a
learning-core based learning package
openedx_content based learning package
Notes:
* As of Ulmo, a learning package is always associated with a v2 content library, but we
Expand Down
4 changes: 2 additions & 2 deletions cms/djangoapps/modulestore_migrator/rest_api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
)
class MigrationViewSet(StatusViewSet):
"""
JSON HTTP API to create and check on ModuleStore-to-Learning-Core migration tasks.
JSON HTTP API to create and check on ModuleStore-to-openedx_content migration tasks.
"""

authentication_classes = (
Expand Down Expand Up @@ -257,7 +257,7 @@ def create(self, request, *args, **kwargs):

class BulkMigrationViewSet(StatusViewSet):
"""
JSON HTTP API to bulk-create ModuleStore-to-Learning-Core migration tasks.
JSON HTTP API to bulk-create ModuleStore-to-openedx_content migration tasks.
"""

authentication_classes = (
Expand Down
10 changes: 5 additions & 5 deletions cms/djangoapps/modulestore_migrator/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

class MigrationStep(Enum):
"""
Strings representation the state of an in-progress modulestore-to-learning-core import.
Strings representation the state of an in-progress modulestore-to-openedx_content import.
We use these values to set UserTaskStatus.state.
The other possible UserTaskStatus.state values are the built-in ones:
Expand Down Expand Up @@ -313,16 +313,16 @@ def _import_structure(
status: UserTaskStatus,
) -> tuple[t.Any, _MigratedNode]:
"""
Import the staged content structure into the target Learning Core library.
Import the staged content structure into the target openedx_content library.
Args:
migration (ModulestoreMigration):
The migration record representing the ongoing modulestore-to-learning-core migration.
The migration record representing the ongoing modulestore-to-openedx_content migration.
source_data (_MigrationSourceData):
Data extracted from the legacy modulestore, including the source root usage key.
Use `_validate_input()` to generate this data.
target_library (libraries_api.ContentLibraryMetadata):
The target library where the new Learning Core content will be created.
The target library where the new openedx_content content will be created.
content_by_filename (dict[str, int]):
A mapping between OLX file names and their associated file IDs in the staging area.
Use `_import_assets` to generate this content.
Expand All @@ -338,7 +338,7 @@ def _import_structure(
`content_api.bulk_draft_changes_for`, containing all the imported changes.
- The second element (`root_migrated_node`): a `_MigratedNode` object that
represents the mapping between the legacy root node and its newly created
Learning Core equivalent.
openedx_content equivalent.
"""
migration = source_data.migration
migration_context = _MigrationContext(
Expand Down
2 changes: 1 addition & 1 deletion cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def make_lms_template_path(settings):
'cms.djangoapps.export_course_metadata.apps.ExportCourseMetadataConfig',
'cms.djangoapps.modulestore_migrator',

# New (Learning-Core-based) XBlock runtime
# New (openedx_content-based) XBlock runtime
'openedx.core.djangoapps.xblock.apps.StudioXBlockAppConfig',

'openedx.core.djangoapps.util.apps.UtilConfig',
Expand Down
2 changes: 1 addition & 1 deletion cms/envs/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@

RATELIMIT_RATE = '2/m'

############## openedx-learning (Learning Core) config ##############
############## openedx_content config ##############
OPENEDX_LEARNING = {
"MEDIA": {"BACKEND": "django.core.files.storage.InMemoryStorage", "OPTIONS": {"location": MEDIA_ROOT + "_private"}}
}
Expand Down
2 changes: 1 addition & 1 deletion cms/lib/xblock/upstream_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
usages.
At the time of writing, we assume that for any upstream-downstream linkage:
* The upstream is a Component or Container from a Learning Core-backed Content
* The upstream is a Component or Container from a openedx_content-backed Content
Library.
* The downstream is a block of compatible type in a SplitModuleStore-backed
Course.
Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/track/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def course_context_from_course_id(course_id):
"""
Creates a course context from a `course_id`.
For newer parts of the system (i.e. Learning-Core-based libraries/courses/etc.)
For newer parts of the system (i.e. openedx_content-based libraries/courses/etc.)
use context_dict_for_learning_context instead of this method.
Example Returned Context::
Expand Down
10 changes: 5 additions & 5 deletions common/templates/xblock_v2/xblock_iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
// Does the XBlock HTML contain arguments to pass to the InitFunction?
let data = {};
[].forEach.call(element.children, (childNode) => {
// The newer/pure/LearningCore runtime uses 'xblock_json_init_args'
// The newer/pure/openedx_content runtime uses 'xblock_json_init_args'
// while the LMS runtime uses 'xblock-json-init-args'.
if (
childNode.matches('script.xblock_json_init_args')
Expand Down Expand Up @@ -405,13 +405,13 @@
//
// Here that is an issue because we show a confirmation modal when clicking cancel,
// if the user stays to edit all TinyMCE editors are no longer there.
//
//
// We uncouple the listener to avoid remove the TinyMCE editors
const extraCancelSelector = '.cancel-button';
const elements = $(extraCancelSelector).first();
if (elements.length) {
elements.first().unbind("click");
elements.on('click', function() {
elements.on('click', function() {
event.preventDefault();
runtime.notify('cancel', {});
});
Expand All @@ -421,7 +421,7 @@

// Recursively initialize the JavaScript code of each XBlock:
function initializeXBlockAndChildren(element, callback) {
// The newer/pure/LearningCore runtime uses the 'data-usage' attribute, while the LMS uses 'data-usage-id'
// The newer/pure/openedx_content runtime uses the 'data-usage' attribute, while the LMS uses 'data-usage-id'
const usageId = element.getAttribute('data-usage') || element.getAttribute('data-usage-id');
if (usageId !== null) {
element[USAGE_ID_KEY] = usageId;
Expand Down Expand Up @@ -461,7 +461,7 @@
}

// Find the root XBlock node.
// The newer/pure/LearningCore runtime uses '.xblock-v1' while the LMS runtime uses '.xblock'.
// The newer/pure/openedx_content runtime uses '.xblock-v1' while the LMS runtime uses '.xblock'.
const rootNode = document.querySelector('.xblock, .xblock-v1'); // will always return the first matching element
initializeXBlockAndChildren(rootNode, () => {
});
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/extension_points.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Here are the different integration points that python plugins can use:
- By default, the registration page for each instance of Open edX has fields that ask for information such as a user’s name, country, and highest level of education completed. You can add custom fields to the registration page for your own Open edX instance. These fields can be different types, including text entry fields and drop-down lists. See `Adding Custom Fields to the Registration Page`_.
* - Learning Context (``openedx.learning_context``)
- Trial, Limited
- A "Learning Context" is a course, a library, a program, a blog, an external site, or some other collection of content where learning happens. If you are trying to build a totally new learning experience that's not a type of course, you may need to implement a new learning context. Learning contexts are a new abstraction and are only supported in the nascent Learning-Core-based XBlock runtime. Since existing courses use modulestore instead of Learning Core, they are not yet implemented as learning contexts. However, Learning-Core-based content libraries are. See |learning_context.py|_ to learn more.
- A "Learning Context" is a course, a library, a program, a blog, an external site, or some other collection of content where learning happens. If you are trying to build a totally new learning experience that's not a type of course, you may need to implement a new learning context. Learning contexts are a new abstraction and are only supported in the nascent openedx_content-based XBlock runtime. Since existing courses use modulestore instead of openedx_content, they are not yet implemented as learning contexts. However, openedx_content-based content libraries are. See |learning_context.py|_ to learn more.
* - User partition scheme (``openedx.user_partition_scheme`` and ``openedx.dynamic_partition_generator``)
- Unknown, Stable
- A user partition scheme is a named way for dividing users in a course into groups, usually to show different content to different users or to run experiments. Partitions may be added to a course manually, or automatically added by a "dynamic partition generator." The core platform includes partition scheme plugins like ``random``, ``cohort``, and ``enrollment_track``. See the |UserPartition docstring|_ to learn more.
Expand Down
2 changes: 1 addition & 1 deletion docs/decisions/0020-upstream-downstream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Context

We are replacing the existing Legacy ("V1") Content Libraries system, based on
ModuleStore, with a Relaunched ("V2") Content Libraries system, based on
Learning Core. V1 and V2 libraries will coexist for at least one release to
openedx_content. V1 and V2 libraries will coexist for at least one release to
allow for migration; eventually, V1 libraries will be removed entirely.

Content from V1 libraries can only be included into courses using the
Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/edxnotes/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ def test_edxnotes_studio(self):
self.problem.runtime.is_author_mode = True
assert 'original_get_html' == self.problem.get_html()

def test_edxnotes_learning_core_runtime(self):
def test_edxnotes_openedx_content_runtime(self):
"""
Tests that get_html is not wrapped when problem is rendered by the learning core runtime.
Tests that get_html is not wrapped when problem is rendered by the openedx_content runtime.
"""
del self.problem.block.runtime.modulestore
assert 'original_get_html' == self.problem.get_html()
Expand Down
2 changes: 1 addition & 1 deletion lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,7 @@
# User tours
'lms.djangoapps.user_tours',

# New (Learning-Core-based) XBlock runtime
# New XBlock runtime, based on openedx_content
'openedx.core.djangoapps.xblock.apps.LmsXBlockAppConfig',

# Student support tools
Expand Down
2 changes: 1 addition & 1 deletion lms/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
name='xblock_resource_url',
),

# New (Learning-Core-based) XBlock REST API
# New XBlock REST API, based on the openedx_content API
path('', include(('openedx.core.djangoapps.xblock.rest_api.urls', 'openedx.core.djangoapps.xblock'),
namespace='xblock_api')),

Expand Down
4 changes: 2 additions & 2 deletions openedx/core/djangoapps/content/search/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def meili_id_from_opaque_key(key: OpaqueKey) -> str:
hyphens (-) and underscores (_). Since our opaque keys don't meet this
requirement, we transform them to a similar slug ID string that does.
In the future, with Learning Core's data models in place for courseware,
In the future, with openedx_content's data models in place for courseware,
we could use PublishableEntity's primary key / UUID instead.
"""
# The slugified key _may_ not be unique so we append a hashed string to make it unique:
Expand Down Expand Up @@ -232,7 +232,7 @@ class implementation returns only:
if hasattr(block, "edited_on"):
block_data[Fields.modified] = block.edited_on.timestamp()
# Get the breadcrumbs (course, section, subsection, etc.):
if block.usage_key.context_key.is_course: # Getting parent is not yet implemented in Learning Core (for libraries).
if block.usage_key.context_key.is_course: # Getting parent is not yet implemented in openedx_content (for libraries).
cur_block = block
while cur_block.parent:
if not cur_block.has_cached_parent:
Expand Down
14 changes: 7 additions & 7 deletions openedx/core/djangoapps/content_libraries/api/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def _import_staged_block(
# The ``data`` attribute is going to be None because the clipboard
# is optimized to not do redundant file copying when copying/pasting
# within the same course (where all the Files and Uploads are
# shared). Learning Core backed content Components will always store
# shared). openedx_content backed content Components will always store
# a Component-local "copy" of the data, and rely on lower-level
# deduplication to happen in the ``contents`` app.
filename = staged_content_file_data.filename
Expand All @@ -459,23 +459,23 @@ def _import_staged_block(
# Courses don't support having assets that are local to a specific
# component, and instead store all their content together in a
# shared Files and Uploads namespace. If we're pasting that into a
# Learning Core backed data model (v2 Libraries), then we want to
# openedx_content backed data model (v2 Libraries), then we want to
# prepend "static/" to the filename. This will need to get updated
# when we start moving courses over to Learning Core, or if we start
# when we start moving courses over to openedx_content, or if we start
# storing course component assets in sub-directories of Files and
# Uploads.
#
# The reason we don't just search for a "static/" prefix is that
# Learning Core components can store other kinds of files if they
# openedx_content components can store other kinds of files if they
# wish (though none currently do).
source_assumes_global_assets = not isinstance(
source_context_key, LibraryLocatorV2
)
if source_assumes_global_assets:
filename = f"static/{filename}"

# Now construct the Learning Core data models for it...
# TODO: more of this logic should be pushed down to openedx-learning
# Now construct the Core data models for it...
# TODO: more of this logic should be pushed down to openedx_content
media_type_str, _encoding = mimetypes.guess_type(filename)
if not media_type_str:
media_type_str = "application/octet-stream"
Expand Down Expand Up @@ -687,7 +687,7 @@ def get_or_create_olx_media_type(block_type: str) -> MediaType:
"""
Get or create a MediaType for the block type.
Learning Core stores all Content with a Media Type (a.k.a. MIME type). For
openedx_content stores all Content with a Media Type (a.k.a. MIME type). For
OLX, we use the "application/vnd.*" convention, per RFC 6838.
"""
return content_api.get_or_create_media_type(
Expand Down
Loading
Loading