feat: mgmt cmd to replace v1 libr refs in courses (#32904)
This PR adds a management command to, given a mapping of V1 content libraries to matching v2 content libraries, replaces references to v1 libs in courses (in library source xblocks) with V2 libraries. It does so by manipulating the mongo document directly. it also offers some improvements to the management command which copies all v1 libraries into v2 libraries.
This commit is contained in:
@@ -1951,6 +1951,7 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
|
||||
The implementation tries to detect which, if any changes, actually need to be saved and thus won't version
|
||||
the definition, structure, nor course if they didn't change.
|
||||
"""
|
||||
|
||||
partitioned_fields = self.partition_xblock_fields_by_scope(block)
|
||||
definition_locator = getattr(block, "definition_locator", None)
|
||||
if definition_locator is None and not allow_not_found:
|
||||
|
||||
Reference in New Issue
Block a user