From dfd619080a1ca8d171e1666b5912bd120ac55022 Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Sat, 8 Feb 2025 19:32:14 +0530 Subject: [PATCH] refactor: update post course import signal name --- cms/djangoapps/contentstore/signals/handlers.py | 4 ++-- xmodule/modulestore/xml_importer.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cms/djangoapps/contentstore/signals/handlers.py b/cms/djangoapps/contentstore/signals/handlers.py index 5f33aabead11..5f6fa2124678 100644 --- a/cms/djangoapps/contentstore/signals/handlers.py +++ b/cms/djangoapps/contentstore/signals/handlers.py @@ -15,7 +15,7 @@ from openedx_events.content_authoring.data import CourseCatalogData, CourseData, CourseScheduleData, XBlockData from openedx_events.content_authoring.signals import ( COURSE_CATALOG_INFO_CHANGED, - POST_COURSE_IMPORT, + COURSE_IMPORT_COMPLETED, XBLOCK_CREATED, XBLOCK_DELETED, XBLOCK_UPDATED, @@ -272,7 +272,7 @@ def delete_upstream_downstream_link_handler(**kwargs): ).delete() -@receiver(POST_COURSE_IMPORT) +@receiver(COURSE_IMPORT_COMPLETED) def handle_new_course_import(**kwargs): """ Automatically create upstream->downstream links for course in database on new import. diff --git a/xmodule/modulestore/xml_importer.py b/xmodule/modulestore/xml_importer.py index 29cc6883b335..05f0a9954ef6 100644 --- a/xmodule/modulestore/xml_importer.py +++ b/xmodule/modulestore/xml_importer.py @@ -36,7 +36,7 @@ from opaque_keys.edx.keys import UsageKey from opaque_keys.edx.locator import LibraryLocator from openedx_events.content_authoring.data import CourseData -from openedx_events.content_authoring.signals import POST_COURSE_IMPORT +from openedx_events.content_authoring.signals import COURSE_IMPORT_COMPLETED from path import Path as path from xblock.core import XBlockMixin from xblock.fields import Reference, ReferenceList, ReferenceValueDict, Scope @@ -730,8 +730,8 @@ def post_course_import(self, dest_id): """ Trigger celery task to create upstream links for newly imported blocks. """ - # .. event_implemented_name: XBLOCK_UPDATED - POST_COURSE_IMPORT.send_event( + # .. event_implemented_name: COURSE_IMPORT_COMPLETED + COURSE_IMPORT_COMPLETED.send_event( time=datetime.now(timezone.utc), course=CourseData( course_key=dest_id