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
b782f712
Commit
b782f712
authored
Dec 12, 2012
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add in more js to handle student feedback
parent
634b5860
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
common/lib/capa/capa/templates/openendedinput.html
+1
-1
common/lib/xmodule/xmodule/capa_module.py
+4
-2
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+14
-2
No files found.
common/lib/capa/capa/templates/openendedinput.html
View file @
b782f712
...
...
@@ -31,7 +31,7 @@
% if status in ['correct','incorrect']:
<section
id=
"evaluation_${id}"
class=
"evaluation"
>
Score Evaluation:
<textarea
rows=
"${rows}"
cols=
"${cols}"
name=
"input_${id}"
class=
"feedback-on-feedback"
id=
"input_${id}"
>
Please enter some comments about the score/feedback you received here.
</textarea>
<textarea
rows=
"${rows}"
cols=
"${cols}"
name=
"input_${id}"
class=
"feedback-on-feedback"
id=
"input_${id}"
></textarea>
<input
name=
"submit-message"
class=
"submit-message"
type=
"button"
value=
"Submit your message"
/>
</section>
% endif
...
...
common/lib/xmodule/xmodule/capa_module.py
View file @
b782f712
...
...
@@ -402,11 +402,13 @@ class CapaModule(XModule):
event_info
=
dict
()
event_info
[
'state'
]
=
self
.
lcp
.
get_state
()
event_info
[
'problem_id'
]
=
self
.
location
.
url
()
event_info
[
'student_id'
]
=
self
.
system
.
anonymous_system_id
event_info
[
'survey_responses'
]
=
get
answers
=
self
.
make_dict_of_responses
(
get
)
log
.
debug
(
answers
)
log
.
debug
(
event_info
)
return
{
'success'
:
True
}
def
closed
(
self
):
''' Is the student still allowed to submit answers? '''
if
self
.
attempts
==
self
.
max_attempts
:
...
...
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
b782f712
...
...
@@ -200,8 +200,20 @@ class @Problem
message_post
:
=>
Logger
.
log
'message_post'
,
@
answers
$
.
postWithPrefix
"
#{
@
url
}
/message_post"
,
@
answers
,
(
response
)
=>
@
gentle_alert
response
.
success
fd
=
new
FormData
()
feedback
=
@
$
(
'section.evaluation textarea.feedback-on-feedback'
)[
0
]
fd
.
append
(
feedback
.
class
,
feedback
.
value
)
settings
=
type
:
"POST"
data
:
fd
processData
:
false
contentType
:
false
success
:
(
response
)
=>
@
gentle_alert
response
.
success
$
.
ajaxWithPrefix
(
"
#{
@
url
}
/message_post"
,
settings
)
reset
:
=>
Logger
.
log
'problem_reset'
,
@
answers
...
...
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