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
0a9065f2
Commit
0a9065f2
authored
Aug 16, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CustomResponse for 6.002x
parent
bea9aec6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
common/lib/capa/capa/responsetypes.py
+2
-0
common/lib/capa/capa/templates/textinput.html
+2
-0
No files found.
common/lib/capa/capa/responsetypes.py
View file @
0a9065f2
...
...
@@ -873,6 +873,7 @@ def sympy_check2():
msg
=
'<font color="red">No answer entered!</font>'
if
self
.
xml
.
get
(
'empty_answer_err'
)
else
''
return
CorrectMap
(
idset
[
0
],
'incorrect'
,
msg
=
msg
)
# NOTE: correct = 'unknown' could be dangerous. Inputtypes such as textline are not expecting 'unknown's
correct
=
[
'unknown'
]
*
len
(
idset
)
messages
=
[
''
]
*
len
(
idset
)
...
...
@@ -898,6 +899,7 @@ def sympy_check2():
if
type
(
self
.
code
)
==
str
:
try
:
exec
self
.
code
in
self
.
context
[
'global_context'
],
self
.
context
correct
=
self
.
context
[
'correct'
]
except
Exception
as
err
:
print
"oops in customresponse (code) error
%
s"
%
err
print
"context = "
,
self
.
context
...
...
common/lib/capa/capa/templates/textinput.html
View file @
0a9065f2
...
...
@@ -38,5 +38,7 @@
% if msg:
<span
class=
"message"
>
${msg|n}
</span>
% endif
% if state in ['unsubmitted', 'correct', 'incorrect', 'incomplete'] or hidden:
</div>
% endif
</section>
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