committed by
Michael Youngstrom
parent
ab8ffe6dac
commit
937fcded38
@@ -1,19 +1,21 @@
|
||||
"""
|
||||
Signal handlers related to discussions.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
|
||||
import six
|
||||
from django.conf import settings
|
||||
from django.dispatch import receiver
|
||||
from opaque_keys.edx.locator import LibraryLocator
|
||||
|
||||
from lms.djangoapps.discussion import tasks
|
||||
from openedx.core.djangoapps.django_comment_common import signals
|
||||
from opaque_keys.edx.locator import LibraryLocator
|
||||
from openedx.core.djangoapps.site_configuration.models import SiteConfiguration
|
||||
from openedx.core.djangoapps.theming.helpers import get_current_site
|
||||
from xmodule.modulestore.django import SignalHandler
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -31,7 +33,7 @@ def update_discussions_on_course_publish(sender, course_key, **kwargs): # pylin
|
||||
return
|
||||
|
||||
context = {
|
||||
'course_id': unicode(course_key),
|
||||
'course_id': six.text_type(course_key),
|
||||
}
|
||||
tasks.update_discussions_map.apply_async(
|
||||
args=[context],
|
||||
@@ -62,7 +64,7 @@ def send_discussion_email_notification(sender, user, post, **kwargs):
|
||||
def send_message(comment, site):
|
||||
thread = comment.thread
|
||||
context = {
|
||||
'course_id': unicode(thread.course_id),
|
||||
'course_id': six.text_type(thread.course_id),
|
||||
'comment_id': comment.id,
|
||||
'comment_body': comment.body,
|
||||
'comment_author_id': comment.user_id,
|
||||
|
||||
Reference in New Issue
Block a user