* 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
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
Python
"""
|
|
Configure the django app
|
|
"""
|
|
from django.apps import AppConfig
|
|
from edx_django_utils.plugins import PluginSettings
|
|
from edx_django_utils.plugins import PluginURLs
|
|
|
|
from openedx.core.djangoapps.plugins.constants import ProjectType
|
|
|
|
|
|
class DiscussionsConfig(AppConfig):
|
|
"""
|
|
Configure the discussions django app
|
|
"""
|
|
name = 'openedx.core.djangoapps.discussions'
|
|
plugin_app = {
|
|
PluginURLs.CONFIG: {
|
|
# TODO: Remove the LMS path once its usage has been removed from frontend-app-course-authoring.
|
|
ProjectType.LMS: {
|
|
PluginURLs.NAMESPACE: '',
|
|
PluginURLs.REGEX: r'^discussions/api/',
|
|
PluginURLs.RELATIVE_PATH: 'urls',
|
|
},
|
|
ProjectType.CMS: {
|
|
PluginURLs.NAMESPACE: '',
|
|
PluginURLs.REGEX: r'^api/discussions/',
|
|
PluginURLs.RELATIVE_PATH: 'urls',
|
|
},
|
|
},
|
|
PluginSettings.CONFIG: {
|
|
},
|
|
}
|
|
|
|
def ready(self):
|
|
from . import handlers # pylint: disable=unused-import
|