Skip to content

Commit

Permalink
refactor: update post course import signal name
Browse files Browse the repository at this point in the history
  • Loading branch information
navinkarkera committed Feb 8, 2025
1 parent e4ad89d commit dfd6190
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cms/djangoapps/contentstore/signals/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions xmodule/modulestore/xml_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dfd6190

Please sign in to comment.