Commit c7e37887 by cahrens

Merge updates.

parent fae8fd38
...@@ -315,7 +315,7 @@ class CapaModule(CapaFields, XModule): ...@@ -315,7 +315,7 @@ class CapaModule(CapaFields, XModule):
# If the user has forced the save button to display, # If the user has forced the save button to display,
# then show it as long as the problem is not closed # then show it as long as the problem is not closed
# (past due / too many attempts) # (past due / too many attempts)
if self.force_save_button == "true": if self.force_save_button:
return not self.closed() return not self.closed()
else: else:
is_survey_question = (self.max_attempts == 0) is_survey_question = (self.max_attempts == 0)
......
...@@ -54,7 +54,7 @@ class PeerGradingFields(object): ...@@ -54,7 +54,7 @@ class PeerGradingFields(object):
help="Student data for a given peer grading problem.", help="Student data for a given peer grading problem.",
scope=Scope.user_state scope=Scope.user_state
) )
weight = StringyFloat( weight = Float(
display_name="Problem Weight", display_name="Problem Weight",
help="Defines the number of points each problem is worth. If the value is not set, each problem is worth one point.", help="Defines the number of points each problem is worth. If the value is not set, each problem is worth one point.",
scope=Scope.settings, values={"min": 0, "step": ".1"} scope=Scope.settings, values={"min": 0, "step": ".1"}
...@@ -112,7 +112,7 @@ class PeerGradingModule(PeerGradingFields, XModule): ...@@ -112,7 +112,7 @@ class PeerGradingModule(PeerGradingFields, XModule):
if not self.ajax_url.endswith("/"): if not self.ajax_url.endswith("/"):
self.ajax_url = self.ajax_url + "/" self.ajax_url = self.ajax_url + "/"
# StringyInteger could return None, so keep this check. # Integer could return None, so keep this check.
if not isinstance(self.max_grade, int): if not isinstance(self.max_grade, int):
raise TypeError("max_grade needs to be an integer.") raise TypeError("max_grade needs to be an integer.")
......
...@@ -105,7 +105,7 @@ class EditableMetadataFieldsTest(unittest.TestCase): ...@@ -105,7 +105,7 @@ class EditableMetadataFieldsTest(unittest.TestCase):
def test_type_and_options(self): def test_type_and_options(self):
# test_display_name_field verifies that a String field is of type "Generic". # test_display_name_field verifies that a String field is of type "Generic".
# test_integer_field verifies that a StringyInteger field is of type "Integer". # test_integer_field verifies that a Integer field is of type "Integer".
descriptor = self.get_descriptor({}) descriptor = self.get_descriptor({})
editable_fields = descriptor.editable_metadata_fields editable_fields = descriptor.editable_metadata_fields
......
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