Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temp: logs for course export issue #31481

Merged
merged 1 commit into from
Dec 29, 2022
Merged
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
8 changes: 8 additions & 0 deletions xmodule/modulestore/xml_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,13 @@ def adapt_references(subtree, destination_course_key, export_fs):
Map every reference in the subtree into destination_course_key and set it back into the xblock fields
"""
subtree.runtime.export_fs = export_fs # ensure everything knows where it's going!
# TODO: Remove logging statements after export issue is resolved (INF-667)
node_id = subtree.scope_ids.usage_id.html_id()
logging.debug(f"Exporting {destination_course_key} node {node_id}")
for field_name, field in subtree.fields.items():
logging.debug(f"Exporting {destination_course_key} node {node_id} field {field_name}")
if field.is_set_on(subtree):
logging.debug(f"Exporting {destination_course_key} node {node_id} field_on {field_name}")
if isinstance(field, Reference):
value = field.read_from(subtree)
if value is not None:
Expand All @@ -375,6 +380,9 @@ def adapt_references(subtree, destination_course_key, export_fs):
key: ele.map_into_course(destination_course_key) for key, ele in field.read_from(subtree).items() # lint-amnesty, pylint: disable=line-too-long
}
)
logging.debug(f"Export_successful {destination_course_key} node {node_id} field_on {field_name}")
logging.debug(f"Export_successful {destination_course_key} node {node_id} field {field_name}")
logging.debug(f"Export_successful {destination_course_key} node {node_id}")


def _export_field_content(xblock_item, item_dir):
Expand Down