Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lms/djangoapps/ccx/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
from django.shortcuts import redirect
from django.urls import reverse
from django.utils.translation import gettext as _
from django.utils.timezone import timezone
from django.views.decorators.cache import cache_control
from django.views.decorators.csrf import ensure_csrf_cookie
from opaque_keys.edx.keys import CourseKey
from six import StringIO

from openedx_events.content_authoring.data import CourseData
from openedx_events.content_authoring.signals import COURSE_CREATED
from common.djangoapps.edxmako.shortcuts import render_to_response
from common.djangoapps.student.models import CourseEnrollment
from common.djangoapps.student.roles import CourseCcxCoachRole
Expand Down Expand Up @@ -238,6 +241,14 @@ def create_ccx(request, course, ccx=None):
for rec, response in responses:
log.info('Signal fired when course is published. Receiver: %s. Response: %s', rec, response)

# .. event_implemented_name: COURSE_CREATED
COURSE_CREATED.send_event(
time=datetime.datetime.now(tz=timezone.utc),
course=CourseData(
course_key=ccx_id,
)
)

return redirect(url)


Expand Down
Loading