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
f670ff74
Commit
f670ff74
authored
Jun 30, 2014
by
Ben McMorran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uses ModuleStoreEnum in is_xblock_visible_to_students
parent
5d37ea83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
cms/djangoapps/contentstore/utils.py
+2
-2
No files found.
cms/djangoapps/contentstore/utils.py
View file @
f670ff74
...
...
@@ -12,7 +12,7 @@ from django.core.urlresolvers import reverse
from
xmodule.contentstore.content
import
StaticContent
from
xmodule.contentstore.django
import
contentstore
from
xmodule.modulestore
import
REVISION_OPTION_PUBLISHED_ONLY
from
xmodule.modulestore
import
ModuleStoreEnum
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.mixed
import
store_bulk_write_operations_on_course
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
...
...
@@ -139,7 +139,7 @@ def is_xblock_visible_to_students(xblock):
"""
try
:
published
=
modulestore
()
.
get_item
(
xblock
.
location
,
revision
=
REVISION_OPTION_PUBLISHED_ONLY
)
published
=
modulestore
()
.
get_item
(
xblock
.
location
,
revision
=
ModuleStoreEnum
.
RevisionOption
.
published_only
)
# If there's no published version then the xblock is clearly not visible
except
ItemNotFoundError
:
return
False
...
...
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