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
674b8988
Commit
674b8988
authored
Apr 14, 2015
by
Zia Fazal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for publish button not working in studio
parent
bb07f436
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
cms/djangoapps/contentstore/views/item.py
+17
-4
No files found.
cms/djangoapps/contentstore/views/item.py
View file @
674b8988
...
...
@@ -511,11 +511,24 @@ def _save_xblock(user, xblock, data=None, children_strings=None, metadata=None,
if
grader_type
is
not
None
:
result
.
update
(
CourseGradingModel
.
update_section_grader_type
(
xblock
,
grader_type
,
user
))
# notify the xblocks that they have been published
_notify_xblocks
(
xblock
,
xblock
.
location
.
course_key
,
'on_studio_published'
)
# Note that children aren't being returned until we have a use case.
return
JsonResponse
(
result
,
encoder
=
EdxJSONEncoder
)
# If publish is set to 'republish' and this item is not in direct only categories and has previously been published,
# then this item should be republished. This is used by staff locking to ensure that changing the draft
# value of the staff lock will also update the published version, but only at the unit level.
if
publish
==
'republish'
and
xblock
.
category
not
in
DIRECT_ONLY_CATEGORIES
:
if
modulestore
()
.
has_published_version
(
xblock
):
publish
=
'make_public'
# Make public after updating the xblock, in case the caller asked for both an update and a publish.
# Used by Bok Choy tests and by republishing of staff locks.
if
publish
==
'make_public'
:
modulestore
()
.
publish
(
xblock
.
location
,
user
.
id
)
# notify the xblocks that they have been published
_notify_xblocks
(
xblock
,
xblock
.
location
.
course_key
,
'on_studio_published'
)
# Note that children aren't being returned until we have a use case.
return
JsonResponse
(
result
,
encoder
=
EdxJSONEncoder
)
def
_notify_xblocks
(
xblock
,
course_id
,
callback_name
):
...
...
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