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
695f48a6
Commit
695f48a6
authored
Aug 09, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests with new score_msg format
parent
3fcf5498
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
common/lib/xmodule/xmodule/tests/__init__.py
+9
-3
No files found.
common/lib/xmodule/xmodule/tests/__init__.py
View file @
695f48a6
...
@@ -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