Commit 1108137d by Victor Shnayder

Address Cale's comment--make property a simple class var

parent d7f9bdda
......@@ -112,14 +112,9 @@ class FolditDescriptor(XmlDescriptor, EditingDescriptor):
js = {'coffee': [resource_string(__name__, 'js/src/html/edit.coffee')]}
js_module_name = "HTMLEditingDescriptor"
@property
def always_recalculate_grades(self):
"""
The grade changes without any student interaction with the edx website,
so always need to actually check.
"""
return True
# The grade changes without any student interaction with the edx website,
# so always need to actually check.
always_recalculate_grades = True
@classmethod
def definition_from_xml(cls, xml_object, system):
......
......@@ -515,6 +515,16 @@ class XModuleDescriptor(Plugin, HTMLSnippet, ResourceTemplates):
self._child_instances = None
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
def display_name(self):
'''
......@@ -645,17 +655,6 @@ class XModuleDescriptor(Plugin, HTMLSnippet, ResourceTemplates):
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 ===========================
@staticmethod
def load_from_json(json_data, system, default_class=None):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment