3333log = logging .getLogger (__name__ )
3434
3535
36- class LearningCoreFieldData (FieldData ):
36+ class OexCoreFieldData (FieldData ):
3737 """
3838 FieldData for the Learning Core XBlock Runtime
3939
40- LearningCoreFieldData only supports the ``content`` and ``settings`` scopes.
40+ OexCoreFieldData only supports the ``content`` and ``settings`` scopes.
4141 Any attempt to read or write fields with other scopes will raise a
4242 ``NotImplementedError``. This class does NOT support the parent and children
4343 scopes.
4444
45- LearningCoreFieldData should only live for the duration of one request. The
46- interaction between LearningCoreXBlockRuntime and LearningCoreFieldData is
45+ OexCoreFieldData should only live for the duration of one request. The
46+ interaction between OexCoreXBlockRuntime and OexCoreFieldData is
4747 as follows:
4848
49- 1. LearningCoreXBlockRuntime knows how retrieve authored content data from
50- the Learning Core APIs in openedx-learning . This content is stored as
51- OLX, and LearningCoreXBlockRuntime won't know how to parse it into
49+ 1. OexCoreXBlockRuntime knows how retrieve authored content data from
50+ the Content API in openedx-core . This content is stored as
51+ OLX, and OexCoreXBlockRuntime won't know how to parse it into
5252 fields, since serialization logic can happen in the XBlock itself.
53- 2. LearningCoreXBlockRuntime will then invoke the block to parse the OLX and
54- then force_save its field data into LearningCoreFieldData .
53+ 2. OexCoreXBlockRuntime will then invoke the block to parse the OLX and
54+ then force_save its field data into OexCoreFieldData .
5555 3. After this point, various handler and API calls might alter fields for
5656 a given block using the XBlock.
57- 4. The main thing that LearningCoreXBlockRuntime will want to know later on
57+ 4. The main thing that OexCoreXBlockRuntime will want to know later on
5858 is whether it needs to write any changes when its save_block method is
59- invoked. To support this, LearningCoreFieldData needs to track which
59+ invoked. To support this, OexCoreFieldData needs to track which
6060 blocks have changes to any of their fields. See the marked_unchanged
6161 method docstring for more details.
6262 """
@@ -74,9 +74,9 @@ def mark_unchanged(self, block):
7474 Calling set or delete on a field always marks the block with that field
7575 as changed, by adding its usage key to self.changed. But set() is also
7676 called at the very beginning, when a block is first loaded from the
77- database by the LearningCoreXBlockRuntime 's get_block call.
77+ database by the OexCoreXBlockRuntime 's get_block call.
7878
79- This method exists so that LearningCoreXBlockRuntime can call it
79+ This method exists so that OexCoreXBlockRuntime can call it
8080 whenever it has either just done a get_block operation (because those
8181 set() calls represent the already-persisted content state), or a
8282 save_block operation (since those changes will have been persisted).
@@ -153,14 +153,14 @@ def _check_field(self, block, name):
153153 if field .scope not in (Scope .content , Scope .settings ):
154154 raise NotImplementedError (
155155 f"Scope { field .scope } (field { name } of { block .scope_ids .usage_id } ) "
156- "is unsupported. LearningCoreFieldData only supports the content"
156+ "is unsupported. OexCoreFieldData only supports the content"
157157 " and settings scopes."
158158 )
159159
160160
161- class LearningCoreXBlockRuntime (XBlockRuntime ):
161+ class OexCoreXBlockRuntime (XBlockRuntime ):
162162 """
163- XBlock runtime that uses openedx-learning apps for content storage .
163+ XBlock runtime that uses openedx-core APIs (not ModuleStore) .
164164
165165 The superclass is doing all the hard stuff. This class only only has to
166166 worry about the block storage, block serialization/de-serialization, and
@@ -173,7 +173,7 @@ def get_block(self, usage_key, for_parent=None, *, version: int | LatestVersion
173173
174174 This method will find the OLX for the content in Learning Core, parse it
175175 into an XBlock (with mixins) instance, and properly initialize our
176- internal LearningCoreFieldData instance with the field values from the
176+ internal OexCoreFieldData instance with the field values from the
177177 parsed OLX.
178178 """
179179 # We can do this more efficiently in a single query later, but for now
0 commit comments