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
a8913f9a
Commit
a8913f9a
authored
Jun 13, 2017
by
rabia23
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review Alex
parent
bb219ed4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
lms/djangoapps/certificates/signals.py
+2
-2
openedx/core/djangoapps/models/course_details.py
+2
-6
No files found.
lms/djangoapps/certificates/signals.py
View file @
a8913f9a
...
@@ -15,11 +15,11 @@ def _listen_for_course_publish(sender, course_key, course_self_paced, **kwargs):
...
@@ -15,11 +15,11 @@ def _listen_for_course_publish(sender, course_key, course_self_paced, **kwargs):
Catches the signal that course pacing has changed and enable/disable
Catches the signal that course pacing has changed and enable/disable
the self-generated certificates according to course-pacing.
the self-generated certificates according to course-pacing.
"""
"""
enab
le_self_generated_certs
.
delay
(
unicode
(
course_key
),
course_self_paced
)
togg
le_self_generated_certs
.
delay
(
unicode
(
course_key
),
course_self_paced
)
@task
()
@task
()
def
enab
le_self_generated_certs
(
course_key
,
course_self_paced
):
def
togg
le_self_generated_certs
(
course_key
,
course_self_paced
):
"""
"""
Enable or disable self-generated certificates for a course according to pacing.
Enable or disable self-generated certificates for a course according to pacing.
"""
"""
...
...
openedx/core/djangoapps/models/course_details.py
View file @
a8913f9a
...
@@ -191,7 +191,6 @@ class CourseDetails(object):
...
@@ -191,7 +191,6 @@ class CourseDetails(object):
descriptor
=
module_store
.
get_course
(
course_key
)
descriptor
=
module_store
.
get_course
(
course_key
)
dirty
=
False
dirty
=
False
is_pacing_changed
=
False
# In the descriptor's setter, the date is converted to JSON
# In the descriptor's setter, the date is converted to JSON
# using Date's to_json method. Calling to_json on something that
# using Date's to_json method. Calling to_json on something that
...
@@ -275,7 +274,8 @@ class CourseDetails(object):
...
@@ -275,7 +274,8 @@ class CourseDetails(object):
and
jsondict
[
'self_paced'
]
!=
descriptor
.
self_paced
):
and
jsondict
[
'self_paced'
]
!=
descriptor
.
self_paced
):
descriptor
.
self_paced
=
jsondict
[
'self_paced'
]
descriptor
.
self_paced
=
jsondict
[
'self_paced'
]
dirty
=
True
dirty
=
True
is_pacing_changed
=
True
# sends out the signal that course pacing has changed
COURSE_PACING_CHANGE
.
send
(
sender
=
None
,
course_key
=
course_key
,
course_self_paced
=
descriptor
.
self_paced
)
if
dirty
:
if
dirty
:
module_store
.
update_item
(
descriptor
,
user
.
id
)
module_store
.
update_item
(
descriptor
,
user
.
id
)
...
@@ -290,10 +290,6 @@ class CourseDetails(object):
...
@@ -290,10 +290,6 @@ class CourseDetails(object):
cls
.
update_about_video
(
descriptor
,
jsondict
[
'intro_video'
],
user
.
id
)
cls
.
update_about_video
(
descriptor
,
jsondict
[
'intro_video'
],
user
.
id
)
if
is_pacing_changed
:
# sends out the signal that course pacing has changed
COURSE_PACING_CHANGE
.
send
(
sender
=
None
,
course_key
=
course_key
,
course_self_paced
=
descriptor
.
self_paced
)
# Could just return jsondict w/o doing any db reads, but I put
# Could just return jsondict w/o doing any db reads, but I put
# the reads in as a means to confirm it persisted correctly
# the reads in as a means to confirm it persisted correctly
return
CourseDetails
.
fetch
(
course_key
)
return
CourseDetails
.
fetch
(
course_key
)
...
...
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