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
5c3c3df1
Commit
5c3c3df1
authored
Aug 02, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unbreak check_fd callback
parent
988136c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+8
-5
No files found.
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
5c3c3df1
...
@@ -46,9 +46,11 @@ class @Problem
...
@@ -46,9 +46,11 @@ class @Problem
$
(
placeholder
).
remove
()
$
(
placeholder
).
remove
()
###
###
'check_fd' uses FormData to allow file submissions through an AJAX call.
# 'check_fd' uses FormData to allow file submissions, in addition to simple,
NOTE: The dispatch 'problem_check' is being singled out for the use of FormData;
# querystring-based answers, in the 'problem_check' dispatch.
can consolidate all dispatches to use FormData consistently
#
# NOTE: The dispatch 'problem_check' is being singled out for the use of FormData;
# perhaps preferrable to consolidate all dispatches to use FormData consistently
###
###
check_fd
:
=>
check_fd
:
=>
Logger
.
log
'problem_check'
,
@
answers
Logger
.
log
'problem_check'
,
@
answers
...
@@ -66,20 +68,21 @@ class @Problem
...
@@ -66,20 +68,21 @@ class @Problem
# Simple (non-file) answers,
# Simple (non-file) answers,
# routed to Django 'request.POST'
# routed to Django 'request.POST'
fd
.
append
(
'
answers
'
,
@
answers
)
fd
.
append
(
'
_answers_querystring
'
,
@
answers
)
settings
=
settings
=
type
:
"POST"
type
:
"POST"
data
:
fd
data
:
fd
processData
:
false
processData
:
false
contentType
:
false
contentType
:
false
success
:
(
response
)
-
>
success
:
(
response
)
=
>
switch
response
.
success
switch
response
.
success
when
'incorrect'
,
'correct'
when
'incorrect'
,
'correct'
@
render
(
response
.
contents
)
@
render
(
response
.
contents
)
@
updateProgress
response
@
updateProgress
response
else
else
alert
(
response
.
success
)
alert
(
response
.
success
)
$
.
ajaxWithPrefix
(
"
#{
@
url
}
/problem_check"
,
settings
)
$
.
ajaxWithPrefix
(
"
#{
@
url
}
/problem_check"
,
settings
)
check
:
=>
check
:
=>
...
...
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