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
4e5af13d
Commit
4e5af13d
authored
Aug 09, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #374 from MITx/kimth/lms-coderesponse
Kimth/lms coderesponse
parents
f2c8d5b4
062eff12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
common/lib/capa/capa/responsetypes.py
+1
-1
common/lib/xmodule/xmodule/tests/__init__.py
+9
-3
No files found.
common/lib/capa/capa/responsetypes.py
View file @
4e5af13d
...
@@ -818,7 +818,7 @@ class CodeResponse(LoncapaResponse):
...
@@ -818,7 +818,7 @@ class CodeResponse(LoncapaResponse):
'''
'''
Configure CodeResponse from XML. Supports both CodeResponse and ExternalResponse XML
Configure CodeResponse from XML. Supports both CodeResponse and ExternalResponse XML
Determines whether in synchronous or asynchronous (queued) mode
TODO:
Determines whether in synchronous or asynchronous (queued) mode
'''
'''
xml
=
self
.
xml
xml
=
self
.
xml
self
.
url
=
xml
.
get
(
'url'
,
None
)
# XML can override external resource (grader/queue) URL
self
.
url
=
xml
.
get
(
'url'
,
None
)
# XML can override external resource (grader/queue) URL
...
...
common/lib/xmodule/xmodule/tests/__init__.py
View file @
4e5af13d
...
@@ -9,6 +9,7 @@ import unittest
...
@@ -9,6 +9,7 @@ import unittest
import
os
import
os
import
fs
import
fs
import
json
import
numpy
import
numpy
import
xmodule
import
xmodule
...
@@ -291,9 +292,14 @@ class CodeResponseTest(unittest.TestCase):
...
@@ -291,9 +292,14 @@ class CodeResponseTest(unittest.TestCase):
for
i
in
range
(
numAnswers
):
for
i
in
range
(
numAnswers
):
old_cmap
.
update
(
CorrectMap
(
answer_id
=
answer_ids
[
i
],
queuekey
=
1000
+
i
))
old_cmap
.
update
(
CorrectMap
(
answer_id
=
answer_ids
[
i
],
queuekey
=
1000
+
i
))
# Message format inherited from ExternalResponse
# TODO: Message format inherited from ExternalResponse
correct_score_msg
=
"<edxgrade><awarddetail>EXACT_ANS</awarddetail><message>MESSAGE</message></edxgrade>"
#correct_score_msg = "<edxgrade><awarddetail>EXACT_ANS</awarddetail><message>MESSAGE</message></edxgrade>"
incorrect_score_msg
=
"<edxgrade><awarddetail>WRONG_FORMAT</awarddetail><message>MESSAGE</message></edxgrade>"
#incorrect_score_msg = "<edxgrade><awarddetail>WRONG_FORMAT</awarddetail><message>MESSAGE</message></edxgrade>"
# New message format common to external graders
correct_score_msg
=
json
.
dumps
({
'correct'
:
True
,
'score'
:
1
,
'msg'
:
'MESSAGE'
})
incorrect_score_msg
=
json
.
dumps
({
'correct'
:
False
,
'score'
:
0
,
'msg'
:
'MESSAGE'
})
xserver_msgs
=
{
'correct'
:
correct_score_msg
,
xserver_msgs
=
{
'correct'
:
correct_score_msg
,
'incorrect'
:
incorrect_score_msg
,
'incorrect'
:
incorrect_score_msg
,
}
}
...
...
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