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
9dda977e
Commit
9dda977e
authored
Mar 16, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle days_early_for_beta possibly being a string
parent
b5cf9b32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
lms/xmodule_namespace.py
+8
-1
No files found.
lms/xmodule_namespace.py
View file @
9dda977e
...
...
@@ -8,6 +8,13 @@ class StringyBoolean(Boolean):
return
value
.
lower
()
==
'true'
return
value
class
StringyFloat
(
Float
):
def
from_json
(
self
,
value
):
try
:
return
float
(
value
)
except
:
return
None
class
LmsNamespace
(
Namespace
):
hide_from_toc
=
StringyBoolean
(
...
...
@@ -34,5 +41,5 @@ class LmsNamespace(Namespace):
graceperiod
=
Timedelta
(
help
=
"Amount of time after the due date that submissions will be accepted"
,
scope
=
Scope
.
settings
)
showanswer
=
String
(
help
=
"When to show the problem answer to the student"
,
scope
=
Scope
.
settings
,
default
=
"closed"
)
rerandomize
=
String
(
help
=
"When to rerandomize the problem"
,
default
=
"always"
,
scope
=
Scope
.
settings
)
days_early_for_beta
=
Float
(
help
=
"Number of days early to show content to beta users"
,
default
=
None
,
scope
=
Scope
.
settings
)
days_early_for_beta
=
Stringy
Float
(
help
=
"Number of days early to show content to beta users"
,
default
=
None
,
scope
=
Scope
.
settings
)
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