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
ff4716ef
Commit
ff4716ef
authored
Jul 19, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further simplification after restricting to one answer field
parent
bff86c32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
common/lib/capa/capa/responsetypes.py
+3
-3
No files found.
common/lib/capa/capa/responsetypes.py
View file @
ff4716ef
...
@@ -773,7 +773,7 @@ class CodeResponse(LoncapaResponse):
...
@@ -773,7 +773,7 @@ class CodeResponse(LoncapaResponse):
# The following process is lifted directly from ExternalResponse
# The following process is lifted directly from ExternalResponse
ad
=
rxml
.
find
(
'awarddetail'
)
.
text
ad
=
rxml
.
find
(
'awarddetail'
)
.
text
admap
=
{
'EXACT_ANS'
:
'correct'
,
# TODO: handle other loncapa responses
admap
=
{
'EXACT_ANS'
:
'correct'
,
# TODO: handle other loncapa responses
'WRONG_FORMAT'
:
'incorrect'
,
'WRONG_FORMAT'
:
'incorrect'
,
}
}
self
.
context
[
'correct'
]
=
[
'correct'
]
self
.
context
[
'correct'
]
=
[
'correct'
]
...
@@ -794,10 +794,10 @@ class CodeResponse(LoncapaResponse):
...
@@ -794,10 +794,10 @@ class CodeResponse(LoncapaResponse):
# does NOT require a queue submission, and the answer is computed (extracted from problem XML) locally.
# does NOT require a queue submission, and the answer is computed (extracted from problem XML) locally.
def
get_answers
(
self
):
def
get_answers
(
self
):
anshtml
=
'<font color="blue"><span class="code-answer"><br/><pre>
%
s</pre><br/></span></font>'
%
self
.
answer
anshtml
=
'<font color="blue"><span class="code-answer"><br/><pre>
%
s</pre><br/></span></font>'
%
self
.
answer
return
dict
(
zip
(
self
.
answer_ids
,[
anshtml
]))
return
{
self
.
answer_id
:
anshtml
}
def
get_initial_display
(
self
):
def
get_initial_display
(
self
):
return
dict
(
zip
(
self
.
answer_ids
,[
self
.
initial_display
]))
return
{
self
.
answer_id
:
self
.
initial_display
}
# CodeResponse._send_to_queue implements the same interface as defined for ExternalResponse's 'get_score'
# CodeResponse._send_to_queue implements the same interface as defined for ExternalResponse's 'get_score'
def
_send_to_queue
(
self
,
extra_payload
):
def
_send_to_queue
(
self
,
extra_payload
):
...
...
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