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
7cc502c8
Commit
7cc502c8
authored
Aug 06, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor list of inputs in ajax
parent
110637c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
common/lib/capa/capa/responsetypes.py
+1
-1
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+4
-3
No files found.
common/lib/capa/capa/responsetypes.py
View file @
7cc502c8
...
...
@@ -891,7 +891,7 @@ class CodeResponse(LoncapaResponse):
msg
=
'Unable to deliver your submission to grader. (Reason:
%
s.) Please try again later.'
%
msg
)
else
:
# Non-null CorrectMap['queuekey'] indicates that the problem has been queued
cmap
.
set
(
self
.
answer_id
,
queuekey
=
queuekey
,
msg
=
'Submitted to grader'
)
cmap
.
set
(
self
.
answer_id
,
queuekey
=
queuekey
,
msg
=
'Submitted to grader
.
'
)
return
cmap
...
...
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
7cc502c8
...
...
@@ -12,6 +12,7 @@ class @Problem
bind
:
=>
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
]
window
.
update_schematics
()
@
inputs
=
@
$
(
"[id^=input_
#{
@
element_id
.
replace
(
/problem_/
,
''
)
}
_]"
)
@
$
(
'section.action input:button'
).
click
@
refreshAnswers
@
$
(
'section.action input.check'
).
click
@
check_fd
#@$('section.action input.check').click @check
...
...
@@ -66,8 +67,8 @@ class @Problem
return
fd
=
new
FormData
()
@
$
(
"[id^=input_
#{
@
element_id
.
replace
(
/problem_/
,
''
)
}
_]"
)
.
each
(
index
,
element
)
->
@
inputs
.
each
(
index
,
element
)
->
if
element
.
type
is
'file'
if
element
.
files
[
0
]
instanceof
File
fd
.
append
(
element
.
id
,
element
.
files
[
0
])
...
...
@@ -155,4 +156,4 @@ class @Problem
element
.
schematic
.
update_value
()
@
$
(
".CodeMirror"
).
each
(
index
,
element
)
->
element
.
CodeMirror
.
save
()
if
element
.
CodeMirror
.
save
@
answers
=
@
$
(
"[id^=input_
#{
@
element_id
.
replace
(
/problem_/
,
''
)
}
_]"
)
.
serialize
()
@
answers
=
@
inputs
.
serialize
()
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