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
09ed3d12
Commit
09ed3d12
authored
Dec 14, 2012
by
Diana Huang
Committed by
Vik Paruchuri
Jan 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hook up the backend into the new feedback response for scores
parent
c87d0f11
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
common/lib/capa/capa/responsetypes.py
+3
-1
common/lib/capa/capa/templates/openendedinput.html
+1
-1
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+4
-2
No files found.
common/lib/capa/capa/responsetypes.py
View file @
09ed3d12
...
...
@@ -1928,7 +1928,7 @@ class OpenEndedResponse(LoncapaResponse):
Returns a boolean success/fail and an error message
"""
survey_responses
=
event_info
[
'survey_responses'
]
for
tag
in
[
'feedback'
,
'submission_id'
,
'grader_id'
]:
for
tag
in
[
'feedback'
,
'submission_id'
,
'grader_id'
,
'score'
]:
if
tag
not
in
survey_responses
:
return
False
,
"Could not find needed tag {0}"
.
format
(
tag
)
try
:
...
...
@@ -1936,6 +1936,7 @@ class OpenEndedResponse(LoncapaResponse):
submission_id
=
int
(
survey_responses
[
'submission_id'
])
grader_id
=
int
(
survey_responses
[
'grader_id'
])
feedback
=
str
(
survey_responses
[
'feedback'
])
score
=
int
(
survey_responses
[
'score'
])
except
:
error_message
=
"Could not parse submission id, grader id, or feedback from message_post ajax call."
log
.
exception
(
error_message
)
...
...
@@ -1961,6 +1962,7 @@ class OpenEndedResponse(LoncapaResponse):
'feedback'
:
feedback
,
'submission_id'
:
submission_id
,
'grader_id'
:
grader_id
,
'score'
:
score
,
'student_info'
:
json
.
dumps
(
student_info
),
}
...
...
common/lib/capa/capa/templates/openendedinput.html
View file @
09ed3d12
...
...
@@ -34,7 +34,7 @@
<a
href=
"#"
>
Respond to Feedback
</a>
</header>
<section
id=
"evaluation_${id}"
class=
"evaluation"
>
<p>
How accurate do you
think this feedback is
?
</p>
<p>
How accurate do you
find this feedback
?
</p>
<div
class=
"evaluation-scoring"
>
<ul
class=
"scoring-list"
>
<li><input
type=
"radio"
name=
"evaluation-score"
id=
"evaluation-score-5"
value=
"5"
/>
<label
for=
"evaluation-score-5"
>
Excellent
</label></li>
...
...
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
09ed3d12
...
...
@@ -209,9 +209,11 @@ class @Problem
fd
.
append
(
'feedback'
,
feedback
)
fd
.
append
(
'submission_id'
,
submission_id
)
fd
.
append
(
'grader_id'
,
grader_id
)
if
(
!
score
||
parseInt
(
score
)
==
NaN
)
@
gentle_alert
"You need to pick a rating
to
submit."
if
(
!
score
)
@
gentle_alert
"You need to pick a rating
before you can
submit."
return
else
fd
.
append
(
'score'
,
score
)
settings
=
...
...
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