Skip to content

Commit 172a6d5

Browse files
Irfan Ahmadclaude
authored andcommitted
docs: fix Copilot review issues in V1-to-V2 migration guide
- Replace incomplete Atlassian /pages/ URL with the public GitHub DEPR issue (edx-platform#32457) for the V1 library deprecation timeline - Add conditional cp command to handle both V1 XML export layouts (subdirectory definition.xml and flat <block_id>.xml) - Clarify that the <type>/ directory for the entity TOML is already created by step 4b's mkdir -p Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 214bb68 commit 172a6d5

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

docs/how_tos/migrate_v1_libraries_to_v2.rst

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,19 @@ b. **Create the version directory**::
121121
TYPE=html # e.g. html, problem, video
122122
mkdir -p "v2_library/entities/xblock.v1/${TYPE}/${UUID}/component_versions/v1/static"
123123

124-
c. **Copy the block XML** — the V1 export stores each block's XML at
125-
``<type>/<block_id>/definition.xml`` (or sometimes directly as
126-
``<type>/<block_id>.xml``). Copy it to the V2 path::
127-
128-
cp "v1_library_A/${TYPE}/${BLOCK_ID}/definition.xml" \
129-
"v2_library/entities/xblock.v1/${TYPE}/${UUID}/component_versions/v1/block.xml"
124+
c. **Copy the block XML** — the V1 export stores each block's XML either at
125+
``<type>/<block_id>/definition.xml`` (subdirectory layout) or directly as
126+
``<type>/<block_id>.xml`` (flat layout). Copy it to the V2 path::
127+
128+
# Subdirectory layout (most common):
129+
if [ -f "v1_library_A/${TYPE}/${BLOCK_ID}/definition.xml" ]; then
130+
cp "v1_library_A/${TYPE}/${BLOCK_ID}/definition.xml" \
131+
"v2_library/entities/xblock.v1/${TYPE}/${UUID}/component_versions/v1/block.xml"
132+
else
133+
# Flat layout:
134+
cp "v1_library_A/${TYPE}/${BLOCK_ID}.xml" \
135+
"v2_library/entities/xblock.v1/${TYPE}/${UUID}/component_versions/v1/block.xml"
136+
fi
130137

131138
The XML content itself is unchanged — V2 uses the same XBlock XML format.
132139

@@ -138,7 +145,8 @@ d. **Copy static assets** — any files from ``v1_library_A/static/`` that are
138145
"v2_library/entities/xblock.v1/${TYPE}/${UUID}/component_versions/v1/static/"
139146

140147
e. **Write the entity TOML** at
141-
``v2_library/entities/xblock.v1/<type>/<uuid>.toml``:
148+
``v2_library/entities/xblock.v1/<type>/<uuid>.toml``
149+
(the ``<type>/`` directory was already created by step 4b):
142150

143151
.. code-block:: toml
144152
@@ -216,5 +224,5 @@ Further Reading
216224

217225
* :ref:`backup-restore-format` — full reference for the V2 archive schema
218226
(in the ``openedx-core`` documentation).
219-
* `Legacy Libraries Deprecation <https://openedx.atlassian.net/wiki/spaces/COMM/pages/>`_
220-
— deprecation timeline for V1 (legacy) content libraries.
227+
* `Legacy Libraries Deprecation <https://github.com/openedx/edx-platform/issues/32457>`_
228+
— deprecation tracking issue for V1 (legacy) content libraries.

0 commit comments

Comments
 (0)