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
4b16a7b4
Commit
4b16a7b4
authored
Oct 11, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #863 from MITx/bug/lyla/numerical-tolerance-default
fixed default tolerance on numericalresponse
parents
88f147c7
0cdbd170
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
common/lib/capa/capa/responsetypes.py
+1
-1
common/lib/capa/capa/util.py
+1
-1
No files found.
common/lib/capa/capa/responsetypes.py
View file @
4b16a7b4
...
@@ -746,7 +746,7 @@ class NumericalResponse(LoncapaResponse):
...
@@ -746,7 +746,7 @@ class NumericalResponse(LoncapaResponse):
id
=
xml
.
get
(
'id'
))[
0
]
id
=
xml
.
get
(
'id'
))[
0
]
self
.
tolerance
=
contextualize_text
(
self
.
tolerance_xml
,
context
)
self
.
tolerance
=
contextualize_text
(
self
.
tolerance_xml
,
context
)
except
Exception
:
except
Exception
:
self
.
tolerance
=
0
self
.
tolerance
=
'0'
try
:
try
:
self
.
answer_id
=
xml
.
xpath
(
'//*[@id=$id]//textline/@id'
,
self
.
answer_id
=
xml
.
xpath
(
'//*[@id=$id]//textline/@id'
,
id
=
xml
.
get
(
'id'
))[
0
]
id
=
xml
.
get
(
'id'
))[
0
]
...
...
common/lib/capa/capa/util.py
View file @
4b16a7b4
...
@@ -11,7 +11,7 @@ def compare_with_tolerance(v1, v2, tol):
...
@@ -11,7 +11,7 @@ def compare_with_tolerance(v1, v2, tol):
- v1 : student result (number)
- v1 : student result (number)
- v2 : instructor result (number)
- v2 : instructor result (number)
- tol : tolerance (string
or
number)
- tol : tolerance (string
representing a
number)
'''
'''
relative
=
tol
.
endswith
(
'
%
'
)
relative
=
tol
.
endswith
(
'
%
'
)
...
...
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