From fa27253eba52955049b1f969b5a16fd5a7188ee7 Mon Sep 17 00:00:00 2001 From: "adeel.tajamul" Date: Thu, 29 Dec 2022 11:17:27 +0500 Subject: [PATCH] temp: logs for course export issue --- xmodule/modulestore/xml_exporter.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xmodule/modulestore/xml_exporter.py b/xmodule/modulestore/xml_exporter.py index 33771de5dcdd..a048f9685ef1 100644 --- a/xmodule/modulestore/xml_exporter.py +++ b/xmodule/modulestore/xml_exporter.py @@ -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: @@ -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):