Skip to content

Commit 176512a

Browse files
committed
build!: Switch to openedx-core (renamed from openedx-learning)
Instead of installing openedx-learning==0.32.0, we install openedx-core==0.34.1. We update various class names, function names, docstrings, and comments to represent the rename. BREAKING CHANGE: for openedx-learning/openedx-core developers: You may need to uninstall openedx-learning and re-install openedx-core from your venv. If running tutor, you may need to un-mount openedx-learning, rename the directory to openedx-core, re-mount it, and re-build. Part of: openedx/openedx-core#470
1 parent 4369055 commit 176512a

69 files changed

Lines changed: 217 additions & 217 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cms/djangoapps/contentstore/views/component.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def get_unit_tags(usage_key):
614614
Get the tags of a Unit and build a json to be read by the UI
615615
616616
Note: When migrating the `TagList` subview from `container_subview.js` to the course-authoring MFE,
617-
this function can be simplified to use the REST API of openedx-learning,
617+
this function can be simplified to use the REST API of openedx-core,
618618
which already provides this grouping + sorting logic.
619619
"""
620620
# Get content tags from content tagging API

cms/djangoapps/contentstore/views/transcripts_ajax.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,18 @@ def link_video_to_component(video_component, user):
9191
return edx_video_id
9292

9393

94-
def save_video_transcript_in_learning_core(
94+
def save_video_transcript_in_oex_core(
9595
usage_key,
9696
input_format,
9797
transcript_content,
9898
language_code
9999
):
100100
"""
101-
Saves a video transcript to the learning core.
101+
Saves a video transcript with the openedx-core Content API.
102102
103-
Learning Core uses the standard `.srt` format for subtitles.
103+
openedx-core uses the standard `.srt` format for subtitles.
104104
Note: SJSON is an edx-specific format that we're trying to move away from,
105-
so for all new stuff related to Learning Core should only use `.srt`.
105+
so for all new stuff related to openedx-core should only use `.srt`.
106106
107107
Arguments:
108108
usage_key: UsageKey of the block
@@ -615,7 +615,7 @@ def choose_transcripts(request):
615615

616616
# 3. Upload the retrieved transcript to DS for the linked video ID.
617617
if isinstance(video.usage_key.context_key, LibraryLocatorV2):
618-
success = save_video_transcript_in_learning_core(
618+
success = save_video_transcript_in_oex_core(
619619
video.usage_key,
620620
input_format,
621621
transcript_content,
@@ -669,7 +669,7 @@ def rename_transcripts(request):
669669

670670
# 3. Upload the retrieved transcript to DS for the linked video ID.
671671
if isinstance(video.usage_key.context_key, LibraryLocatorV2):
672-
success = save_video_transcript_in_learning_core(
672+
success = save_video_transcript_in_oex_core(
673673
video.usage_key,
674674
input_format,
675675
transcript_content,
@@ -725,7 +725,7 @@ def replace_transcripts(request):
725725
for transcript in transcript_content:
726726
[language_code, json_content] = transcript
727727
if isinstance(video.usage_key.context_key, LibraryLocatorV2):
728-
success = save_video_transcript_in_learning_core(
728+
success = save_video_transcript_in_oex_core(
729729
video.usage_key,
730730
Transcript.SJSON,
731731
json_content,

cms/djangoapps/modulestore_migrator/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
A nice little admin interface for migrating courses and libraries from modulstore to Learning Core.
2+
A nice little admin interface for migrating courses and libraries from modulstore to openedx-core.
33
"""
44
import logging
55

cms/djangoapps/modulestore_migrator/api/read_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

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

8080
def is_forwarded(source_key: SourceContextKey) -> bool:
8181
"""
82-
Has this course or legacy library been authoratively migrated to Learning Core,
82+
Has this course or legacy library been authoratively migrated to openedx-core,
8383
such that references to the source course/library should be forwarded to the target library?
8484
"""
8585
return get_forwarding(source_key) is not None
8686

8787

8888
def get_forwarding(source_key: SourceContextKey) -> ModulestoreMigration | None:
8989
"""
90-
Authoritatively determine how some Modulestore course or legacy library has been migrated to Learning Core.
90+
Authoritatively determine how some Modulestore course or legacy library has been migrated to openedx-core.
9191
9292
If no such successful migration exists, returns None.
9393
@@ -123,7 +123,7 @@ def get_migrations(
123123
is_failed: bool | None = None,
124124
) -> t.Generator[ModulestoreMigration]:
125125
"""
126-
Given some criteria, get all modulestore->LearningCore migrations.
126+
Given some criteria, get all modulestore->OexCore migrations.
127127
128128
Returns an iterable, ordered from NEWEST to OLDEST.
129129

cms/djangoapps/modulestore_migrator/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def default(cls) -> RepeatHandlingStrategy:
9292
@dataclass(frozen=True)
9393
class ModulestoreMigration:
9494
"""
95-
Metadata on a migration of a course or legacy library to a v2 library in learning core.
95+
Metadata on a migration of a course or legacy library to a v2 library in openedx-core.
9696
"""
9797
pk: int
9898
source_key: SourceContextKey
@@ -107,7 +107,7 @@ class ModulestoreMigration:
107107
@dataclass(frozen=True)
108108
class ModulestoreBlockMigrationResult:
109109
"""
110-
Base class for a modulestore block that was part of an attempted migration to learning core.
110+
Base class for a modulestore block that was part of an attempted migration to openedx-core.
111111
"""
112112
source_key: UsageKey
113113
is_failed: t.ClassVar[bool]

cms/djangoapps/modulestore_migrator/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __str__(self):
6868
class ModulestoreMigration(models.Model):
6969
"""
7070
Tracks the action of a user importing a Modulestore-based course or legacy library into a
71-
learning-core based learning package
71+
Open-edX-core based learning package
7272
7373
Notes:
7474
* As of Ulmo, a learning package is always associated with a v2 content library, but we

cms/djangoapps/modulestore_migrator/rest_api/v1/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
)
7676
class MigrationViewSet(StatusViewSet):
7777
"""
78-
JSON HTTP API to create and check on ModuleStore-to-Learning-Core migration tasks.
78+
JSON HTTP API to create and check on ModuleStore-to-OeX-Core migration tasks.
7979
"""
8080

8181
authentication_classes = (
@@ -257,7 +257,7 @@ def create(self, request, *args, **kwargs):
257257

258258
class BulkMigrationViewSet(StatusViewSet):
259259
"""
260-
JSON HTTP API to bulk-create ModuleStore-to-Learning-Core migration tasks.
260+
JSON HTTP API to bulk-create ModuleStore-to-OeX-Core migration tasks.
261261
"""
262262

263263
authentication_classes = (

cms/djangoapps/modulestore_migrator/tasks.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
class MigrationStep(Enum):
6363
"""
64-
Strings representation the state of an in-progress modulestore-to-learning-core import.
64+
Strings representation the state of an in-progress modulestore-to-OeX-core import.
6565
6666
We use these values to set UserTaskStatus.state.
6767
The other possible UserTaskStatus.state values are the built-in ones:
@@ -313,16 +313,16 @@ def _import_structure(
313313
status: UserTaskStatus,
314314
) -> tuple[t.Any, _MigratedNode]:
315315
"""
316-
Import the staged content structure into the target Learning Core library.
316+
Import the staged content structure into the target openedx-core library.
317317
318318
Args:
319319
migration (ModulestoreMigration):
320-
The migration record representing the ongoing modulestore-to-learning-core migration.
320+
The migration record representing the ongoing modulestore-to-OeX-core migration.
321321
source_data (_MigrationSourceData):
322322
Data extracted from the legacy modulestore, including the source root usage key.
323323
Use `_validate_input()` to generate this data.
324324
target_library (libraries_api.ContentLibraryMetadata):
325-
The target library where the new Learning Core content will be created.
325+
The target library where the new openedx-core content will be created.
326326
content_by_filename (dict[str, int]):
327327
A mapping between OLX file names and their associated file IDs in the staging area.
328328
Use `_import_assets` to generate this content.
@@ -338,7 +338,7 @@ def _import_structure(
338338
`content_api.bulk_draft_changes_for`, containing all the imported changes.
339339
- The second element (`root_migrated_node`): a `_MigratedNode` object that
340340
represents the mapping between the legacy root node and its newly created
341-
Learning Core equivalent.
341+
openedx-core equivalent.
342342
"""
343343
migration = source_data.migration
344344
migration_context = _MigrationContext(

cms/envs/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ def make_lms_template_path(settings):
712712
'cms.djangoapps.export_course_metadata.apps.ExportCourseMetadataConfig',
713713
'cms.djangoapps.modulestore_migrator',
714714

715-
# New (Learning-Core-based) XBlock runtime
715+
# New (openedx-core-based) XBlock runtime
716716
'openedx.core.djangoapps.xblock.apps.StudioXBlockAppConfig',
717717

718718
'openedx.core.djangoapps.util.apps.UtilConfig',

cms/envs/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210

211211
RATELIMIT_RATE = '2/m'
212212

213-
############## openedx-learning (Learning Core) config ##############
213+
############## Open edX Core (openedx-core) config ##############
214214
OPENEDX_LEARNING = {
215215
"MEDIA": {"BACKEND": "django.core.files.storage.InMemoryStorage", "OPTIONS": {"location": MEDIA_ROOT + "_private"}}
216216
}

0 commit comments

Comments
 (0)