diff --git a/cms/envs/common.py b/cms/envs/common.py index cd92f17b1d..9d246edece 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -201,7 +201,7 @@ STATICFILES_DIRS = [ TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html -USE_I18N = True +USE_I18N = False USE_L10N = True # Localization strings (e.g. django.po) are under this directory diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index e01ae49149..74082df1ce 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -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") @@ -229,7 +229,7 @@ class CombinedOpenEndedFields(object): 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 diff --git a/common/lib/xmodule/xmodule/fields.py b/common/lib/xmodule/xmodule/fields.py index dc2f000286..b7094203c4 100644 --- a/common/lib/xmodule/xmodule/fields.py +++ b/common/lib/xmodule/xmodule/fields.py @@ -82,6 +82,9 @@ TIMEDELTA_REGEX = re.compile(r'^((?P\d+?) day(?:s?))?(\s)?((?P\d+?) class Timedelta(ModelType): + # Timedeltas are immutable, see http://docs.python.org/2/library/datetime.html#available-types + MUTABLE = False + def from_json(self, time_str): """ time_str: A string with the following components: diff --git a/lms/envs/common.py b/lms/envs/common.py index 0579fc94d6..f4ecb318f6 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -378,7 +378,7 @@ FAVICON_PATH = 'images/favicon.ico' # Locale/Internationalization TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html -USE_I18N = True +USE_I18N = False USE_L10N = True # Localization strings (e.g. django.po) are under this directory