Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
39563c32
Commit
39563c32
authored
11 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Make staff view work w/ pure xblocks (that only have a descriptor system)
parent
a620cc00
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/djangoapps/xmodule_modifiers.py
+2
-2
2 additions, 2 deletions
common/djangoapps/xmodule_modifiers.py
common/lib/xmodule/xmodule/x_module.py
+4
-2
4 additions, 2 deletions
common/lib/xmodule/xmodule/x_module.py
with
6 additions
and
4 deletions
common/djangoapps/xmodule_modifiers.py
+
2
−
2
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)
...
...
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/x_module.py
+
4
−
2
View file @
39563c32
...
...
@@ -141,6 +141,10 @@ class XModuleMixin(XBlockMixin):
default
=
None
)
@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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment