Skip to content

Commit

Permalink
temp: logs for course export issue (#31481)
Browse files Browse the repository at this point in the history
Co-authored-by: adeel.tajamul <adeel.tajamul@arbisoft.com>
  • Loading branch information
muhammadadeeltajamul and adeel.tajamul authored Dec 29, 2022
1 parent 70f4d34 commit c9562fc
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit c9562fc

Please sign in to comment.