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
64845801
Commit
64845801
authored
Jun 12, 2017
by
rabia23
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix coursekey error
parent
b29d1e32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
lms/djangoapps/certificates/signals.py
+4
-3
No files found.
lms/djangoapps/certificates/signals.py
View file @
64845801
...
...
@@ -3,6 +3,7 @@ Signal handler for enabling/disabling self-generated certificates based on the c
"""
from
celery.task
import
task
from
django.dispatch
import
receiver
from
opaque_keys.edx.keys
import
CourseKey
from
certificates.models
import
CertificateGenerationCourseSetting
from
openedx.core.djangoapps.models.course_details
import
COURSE_PACING_CHANGE
...
...
@@ -14,7 +15,7 @@ def _listen_for_course_publish(sender, course_key, course_self_paced, **kwargs):
Catches the signal that course pacing has changed and enable/disable
the self-generated certificates according to course-pacing.
"""
enable_self_generated_certs
.
delay
(
course_key
,
course_self_paced
)
enable_self_generated_certs
.
delay
(
unicode
(
course_key
)
,
course_self_paced
)
@task
()
...
...
@@ -22,4 +23,5 @@ def enable_self_generated_certs(course_key, course_self_paced):
"""
Enable or disable self-generated certificates for a course according to pacing.
"""
CertificateGenerationCourseSetting
.
set_enabled_for_course
(
course_key
,
course_self_paced
)
\ No newline at end of file
course_key
=
CourseKey
.
from_string
(
course_key
)
CertificateGenerationCourseSetting
.
set_enabled_for_course
(
course_key
,
course_self_paced
)
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