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
1108137d
Commit
1108137d
authored
Feb 14, 2013
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address Cale's comment--make property a simple class var
parent
d7f9bdda
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
19 deletions
+13
-19
common/lib/xmodule/xmodule/foldit_module.py
+3
-8
common/lib/xmodule/xmodule/x_module.py
+10
-11
No files found.
common/lib/xmodule/xmodule/foldit_module.py
View file @
1108137d
...
@@ -112,14 +112,9 @@ class FolditDescriptor(XmlDescriptor, EditingDescriptor):
...
@@ -112,14 +112,9 @@ class FolditDescriptor(XmlDescriptor, EditingDescriptor):
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/html/edit.coffee'
)]}
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/html/edit.coffee'
)]}
js_module_name
=
"HTMLEditingDescriptor"
js_module_name
=
"HTMLEditingDescriptor"
@property
# The grade changes without any student interaction with the edx website,
def
always_recalculate_grades
(
self
):
# so always need to actually check.
"""
always_recalculate_grades
=
True
The grade changes without any student interaction with the edx website,
so always need to actually check.
"""
return
True
@classmethod
@classmethod
def
definition_from_xml
(
cls
,
xml_object
,
system
):
def
definition_from_xml
(
cls
,
xml_object
,
system
):
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
1108137d
...
@@ -515,6 +515,16 @@ class XModuleDescriptor(Plugin, HTMLSnippet, ResourceTemplates):
...
@@ -515,6 +515,16 @@ class XModuleDescriptor(Plugin, HTMLSnippet, ResourceTemplates):
self
.
_child_instances
=
None
self
.
_child_instances
=
None
self
.
_inherited_metadata
=
set
()
self
.
_inherited_metadata
=
set
()
# Class level variable
always_recalculate_grades
=
False
"""
Return whether this descriptor always requires recalculation of grades, for
example if the score can change via an extrnal service, not just when the
student interacts with the module on the page. A specific example is
FoldIt, which posts grade-changing updates through a separate API.
"""
@property
@property
def
display_name
(
self
):
def
display_name
(
self
):
'''
'''
...
@@ -645,17 +655,6 @@ class XModuleDescriptor(Plugin, HTMLSnippet, ResourceTemplates):
...
@@ -645,17 +655,6 @@ class XModuleDescriptor(Plugin, HTMLSnippet, ResourceTemplates):
return
False
return
False
@property
def
always_recalculate_grades
(
self
):
"""
Return whether this descriptor always requires recalculation of grades,
for example if the score can change via an extrnal service, not just
when the student interacts with the module on the page. A specific
example is FoldIt, which posts grade-changing updates through a separate
API.
"""
return
False
# ================================= JSON PARSING ===========================
# ================================= JSON PARSING ===========================
@staticmethod
@staticmethod
def
load_from_json
(
json_data
,
system
,
default_class
=
None
):
def
load_from_json
(
json_data
,
system
,
default_class
=
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