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
f438922a
Commit
f438922a
authored
Aug 14, 2013
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error seen in combinedopenended modules
parent
7b6dcbba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
common/lib/xmodule/xmodule/combined_open_ended_module.py
+2
-2
common/lib/xmodule/xmodule/fields.py
+3
-0
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
f438922a
...
...
@@ -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
...
...
common/lib/xmodule/xmodule/fields.py
View file @
f438922a
...
...
@@ -82,6 +82,9 @@ TIMEDELTA_REGEX = re.compile(r'^((?P<days>\d+?) day(?:s?))?(\s)?((?P<hours>\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:
...
...
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