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
de060a60
Commit
de060a60
authored
Feb 10, 2013
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1477 from MITx/bugfix/dave/mmlans_check
Make type check for self.code a little more robust,
parents
f94df6e3
fb1e7f3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
common/lib/capa/capa/responsetypes.py
+1
-1
lms/lib/symmath/symmath_check.py
+1
-2
No files found.
common/lib/capa/capa/responsetypes.py
View file @
de060a60
...
@@ -999,7 +999,7 @@ def sympy_check2():
...
@@ -999,7 +999,7 @@ def sympy_check2():
self
.
context
[
'debug'
]
=
self
.
system
.
DEBUG
self
.
context
[
'debug'
]
=
self
.
system
.
DEBUG
# exec the check function
# exec the check function
if
type
(
self
.
code
)
==
str
:
if
isinstance
(
self
.
code
,
basestring
)
:
try
:
try
:
exec
self
.
code
in
self
.
context
[
'global_context'
],
self
.
context
exec
self
.
code
in
self
.
context
[
'global_context'
],
self
.
context
correct
=
self
.
context
[
'correct'
]
correct
=
self
.
context
[
'correct'
]
...
...
lms/lib/symmath/symmath_check.py
View file @
de060a60
...
@@ -238,8 +238,7 @@ def symmath_check(expect, ans, dynamath=None, options=None, debug=None, xml=None
...
@@ -238,8 +238,7 @@ def symmath_check(expect, ans, dynamath=None, options=None, debug=None, xml=None
###### PMathML input ######
###### PMathML input ######
# convert mathml answer to formula
# convert mathml answer to formula
try
:
try
:
if
dynamath
:
mmlans
=
dynamath
[
0
]
if
dynamath
else
None
mmlans
=
dynamath
[
0
]
except
Exception
,
err
:
except
Exception
,
err
:
mmlans
=
None
mmlans
=
None
if
not
mmlans
:
if
not
mmlans
:
...
...
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