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
39563c32
Commit
39563c32
authored
Feb 14, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make staff view work w/ pure xblocks (that only have a descriptor system)
parent
a620cc00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
common/djangoapps/xmodule_modifiers.py
+2
-2
common/lib/xmodule/xmodule/x_module.py
+4
-2
No files found.
common/djangoapps/xmodule_modifiers.py
View file @
39563c32
...
...
@@ -173,9 +173,9 @@ def add_staff_debug_info(user, block, view, frag, context): # pylint: disable=u
histogram
=
None
render_histogram
=
False
if
settings
.
FEATURES
.
get
(
'ENABLE_LMS_MIGRATION'
):
if
settings
.
FEATURES
.
get
(
'ENABLE_LMS_MIGRATION'
)
and
hasattr
(
block
.
runtime
,
'filestore'
)
:
[
filepath
,
filename
]
=
getattr
(
block
,
'xml_attributes'
,
{})
.
get
(
'filename'
,
[
''
,
None
])
osfs
=
block
.
system
.
filestore
osfs
=
block
.
runtime
.
filestore
if
filename
is
not
None
and
osfs
.
exists
(
filename
):
# if original, unmangled filename exists then use it (github
# doesn't like symlinks)
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
39563c32
...
...
@@ -142,6 +142,10 @@ class XModuleMixin(XBlockMixin):
)
@property
def
system
(
self
):
return
self
.
runtime
@property
def
course_id
(
self
):
return
self
.
runtime
.
course_id
...
...
@@ -400,7 +404,6 @@ class XModule(XModuleMixin, HTMLSnippet, XBlock): # pylint: disable=abstract-me
self
.
descriptor
=
descriptor
super
(
XModule
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
_loaded_children
=
None
self
.
system
=
self
.
runtime
self
.
runtime
.
xmodule_instance
=
self
def
__unicode__
(
self
):
...
...
@@ -634,7 +637,6 @@ class XModuleDescriptor(XModuleMixin, HTMLSnippet, ResourceTemplates, XBlock):
XModuleDescriptor.__init__ takes the same arguments as xblock.core:XBlock.__init__
"""
super
(
XModuleDescriptor
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
system
=
self
.
runtime
# update_version is the version which last updated this xblock v prev being the penultimate updater
# leaving off original_version since it complicates creation w/o any obv value yet and is computable
# by following previous until None
...
...
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