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
0c69c466
Commit
0c69c466
authored
Nov 15, 2012
by
Vik Paruchuri
Committed by
Victor Shnayder
Nov 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove need for msg
parent
14403103
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
common/lib/capa/capa/responsetypes.py
+6
-1
No files found.
common/lib/capa/capa/responsetypes.py
View file @
0c69c466
...
@@ -1959,6 +1959,7 @@ class OpenEndedResponse(LoncapaResponse):
...
@@ -1959,6 +1959,7 @@ class OpenEndedResponse(LoncapaResponse):
msg
=
'Invalid grader reply. Please contact the course staff.'
)
msg
=
'Invalid grader reply. Please contact the course staff.'
)
return
oldcmap
return
oldcmap
correctness
=
'correct'
if
correct
else
'incorrect'
correctness
=
'correct'
if
correct
else
'incorrect'
# TODO: Find out how this is used elsewhere, if any
# TODO: Find out how this is used elsewhere, if any
...
@@ -2025,6 +2026,10 @@ class OpenEndedResponse(LoncapaResponse):
...
@@ -2025,6 +2026,10 @@ class OpenEndedResponse(LoncapaResponse):
# 2) TODO: Is the message actually HTML?
# 2) TODO: Is the message actually HTML?
feedback
=
score_result
[
'feedback'
]
feedback
=
score_result
[
'feedback'
]
correct
=
False
if
score_result
[
'correct'
]
==
"True"
:
correct
=
True
try
:
try
:
etree
.
fromstring
(
feedback
)
etree
.
fromstring
(
feedback
)
except
etree
.
XMLSyntaxError
as
err
:
except
etree
.
XMLSyntaxError
as
err
:
...
@@ -2033,7 +2038,7 @@ class OpenEndedResponse(LoncapaResponse):
...
@@ -2033,7 +2038,7 @@ class OpenEndedResponse(LoncapaResponse):
return
fail
return
fail
#Currently ignore msg and only return feedback (which takes the place of msg)
#Currently ignore msg and only return feedback (which takes the place of msg)
return
(
True
,
score_result
[
'correct'
]
,
score_result
[
'score'
],
feedback
)
return
(
True
,
correct
,
score_result
[
'score'
],
feedback
)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# TEMPORARY: List of all response subclasses
# TEMPORARY: List of all response subclasses
...
...
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