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
f2898f8c
Commit
f2898f8c
authored
Jul 16, 2013
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #407 from edx/renzo/problem-check-event
Reinstate problem_check event as Problem Checked event
parents
d4f8ab3f
92ae50d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+6
-4
No files found.
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
f2898f8c
...
@@ -22,7 +22,6 @@ class @Problem
...
@@ -22,7 +22,6 @@ class @Problem
@
$
(
'section.action input:button'
).
click
@
refreshAnswers
@
$
(
'section.action input:button'
).
click
@
refreshAnswers
@
$
(
'section.action input.check'
).
click
@
check_fd
@
$
(
'section.action input.check'
).
click
@
check_fd
#@$('section.action input.check').click @check
@
$
(
'section.action input.reset'
).
click
@
reset
@
$
(
'section.action input.reset'
).
click
@
reset
@
$
(
'section.action button.show'
).
click
@
show
@
$
(
'section.action button.show'
).
click
@
show
@
$
(
'section.action input.save'
).
click
@
save
@
$
(
'section.action input.save'
).
click
@
save
...
@@ -162,9 +161,6 @@ class @Problem
...
@@ -162,9 +161,6 @@ class @Problem
# maybe preferable to consolidate all dispatches to use FormData
# maybe preferable to consolidate all dispatches to use FormData
###
###
check_fd
:
=>
check_fd
:
=>
# Calling check from check_fd will result in firing the 'problem_check' event twice, since it is also called in the check function.
#Logger.log 'problem_check', @answers
# If there are no file inputs in the problem, we can fall back on @check
# If there are no file inputs in the problem, we can fall back on @check
if
$
(
'input:file'
).
length
==
0
if
$
(
'input:file'
).
length
==
0
@
check
()
@
check
()
...
@@ -239,6 +235,12 @@ class @Problem
...
@@ -239,6 +235,12 @@ class @Problem
check
:
=>
check
:
=>
@
check_waitfor
()
@
check_waitfor
()
Logger
.
log
'problem_check'
,
@
answers
Logger
.
log
'problem_check'
,
@
answers
# Segment.io
analytics
.
track
"Problem Checked"
,
problem_id
:
@
id
answers
:
@
answers
$
.
postWithPrefix
"
#{
@
url
}
/problem_check"
,
@
answers
,
(
response
)
=>
$
.
postWithPrefix
"
#{
@
url
}
/problem_check"
,
@
answers
,
(
response
)
=>
switch
response
.
success
switch
response
.
success
when
'incorrect'
,
'correct'
when
'incorrect'
,
'correct'
...
...
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