Files
edx-platform/openedx/core/djangoapps/discussions/signals.py
Kshitij Sobti 285e2c4f29 feat: Adds a new discussion topic configuration mechanism [BD-38] [TNL-8623] [BB-4968] (#29082)
* feat: Adds a new discussion topic configuration mechanism

The new discussion configuration system links discussion topics directly to the course structure. This change adds a new task that sends a discussion update signal if there are any changes to the course. This signal includes all the context needed to update the configuration of the course.

The handler for this new event will create a new entry for each unit that needs a topic in the database. In the future this will be used to see the topics in the course.

* fix: add support for marking a provider as supporting LTI

* fix: review feedback
2021-11-12 19:08:43 +05:00

19 lines
738 B
Python

"""
Signals for discussions
"""
from openedx_events.tooling import OpenEdxPublicSignal
from openedx.core.djangoapps.discussions.data import CourseDiscussionConfigurationData
# TODO: This will be moved to openedx_events. It's currently here to simplify the PR.
# .. event_type: org.openedx.learning.discussions.configuration.change.v1
# .. event_name: COURSE_DISCUSSIONS_UPDATED
# .. event_description: emitted when the configuration for a course's discussions changes in the course
# .. event_data: CourseDiscussionConfigurationData
COURSE_DISCUSSIONS_UPDATED = OpenEdxPublicSignal(
event_type="org.openedx.learning.discussions.configuration.change.v1",
data={
"configuration": CourseDiscussionConfigurationData
}
)