Commit e4bcfa5c by Vik Paruchuri

Fix indents and copy behavior

parent 687ab3dd
......@@ -8,7 +8,7 @@ from .x_module import XModule
from xblock.core import Integer, Scope, String, List, Float, Boolean
from xmodule.open_ended_grading_classes.combined_open_ended_modulev1 import CombinedOpenEndedV1Module, CombinedOpenEndedV1Descriptor
from collections import namedtuple
from .fields import Date
from .fields import Date, Timedelta
import textwrap
log = logging.getLogger("mitx.courseware")
......@@ -226,12 +226,10 @@ class CombinedOpenEndedFields(object):
)
due = Date(
help="Date that this problem is due by",
default=None,
scope=Scope.settings
)
graceperiod = String(
graceperiod = Timedelta(
help="Amount of time after the due date that submissions will be accepted",
default=None,
scope=Scope.settings
)
version = VersionInteger(help="Current version number", default=DEFAULT_VERSION, scope=Scope.settings)
......
......@@ -46,7 +46,6 @@ class PeerGradingFields(object):
)
due = Date(
help="Due date that should be displayed.",
default=None,
scope=Scope.settings)
graceperiod = Timedelta(
help="Amount of grace to give on the due date.",
......
......@@ -353,6 +353,7 @@ class LmsKeyValueStore(KeyValueStore):
for field in kv_dict:
# Check field for validity
if field.field_name in self._descriptor_model_data:
if field.field_name not in ["due","graceperiod"]:
raise InvalidWriteError("Not allowed to overwrite descriptor model data", field.field_name)
if field.scope not in self._allowed_scopes:
......
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