Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
61de4ffc
Commit
61de4ffc
authored
Apr 26, 2016
by
Waheed Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed celery task.
ECOM-3437
parent
d0b8f5d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
lms/djangoapps/certificates/signals.py
+3
-1
No files found.
lms/djangoapps/certificates/signals.py
View file @
61de4ffc
...
...
@@ -5,6 +5,7 @@ from celery.task import task
from
django.dispatch.dispatcher
import
receiver
from
certificates.models
import
CertificateGenerationCourseSetting
from
opaque_keys.edx.keys
import
CourseKey
from
xmodule.modulestore.django
import
SignalHandler
,
modulestore
...
...
@@ -14,12 +15,13 @@ def _listen_for_course_publish(sender, course_key, **kwargs): # pylint: disable
enable the self-generated certificates by default for self-paced
courses.
"""
enable_self_generated_certs
.
delay
(
course_key
)
enable_self_generated_certs
.
delay
(
unicode
(
course_key
)
)
@task
()
def
enable_self_generated_certs
(
course_key
):
"""Enable the self-generated certificates by default for self-paced courses."""
course_key
=
CourseKey
.
from_string
(
course_key
)
course
=
modulestore
()
.
get_course
(
course_key
)
is_enabled_for_course
=
CertificateGenerationCourseSetting
.
is_enabled_for_course
(
course_key
)
if
course
.
self_paced
and
not
is_enabled_for_course
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment