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
24fcdad4
Commit
24fcdad4
authored
Jun 26, 2012
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix code convention
parent
c464e184
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lms/static/coffee/src/modules/problem.coffee
+5
-5
No files found.
lms/static/coffee/src/modules/problem.coffee
View file @
24fcdad4
...
@@ -16,7 +16,7 @@ class @Problem
...
@@ -16,7 +16,7 @@ class @Problem
@
$
(
'section.action input.save'
).
click
@
save
@
$
(
'section.action input.save'
).
click
@
save
@
$
(
'input.math'
).
keyup
(
@
refreshMath
).
each
(
@
refreshMath
)
@
$
(
'input.math'
).
keyup
(
@
refreshMath
).
each
(
@
refreshMath
)
update
_p
rogress
:
(
response
)
=>
update
P
rogress
:
(
response
)
=>
if
response
.
progress_changed
if
response
.
progress_changed
@
element
.
attr
progress
:
response
.
progress_status
@
element
.
attr
progress
:
response
.
progress_status
@
element
.
trigger
(
'progressChanged'
)
@
element
.
trigger
(
'progressChanged'
)
...
@@ -36,7 +36,7 @@ class @Problem
...
@@ -36,7 +36,7 @@ class @Problem
switch
response
.
success
switch
response
.
success
when
'incorrect'
,
'correct'
when
'incorrect'
,
'correct'
@
render
(
response
.
contents
)
@
render
(
response
.
contents
)
@
update
_p
rogress
response
@
update
P
rogress
response
else
else
alert
(
response
.
success
)
alert
(
response
.
success
)
...
@@ -44,7 +44,7 @@ class @Problem
...
@@ -44,7 +44,7 @@ class @Problem
Logger
.
log
'problem_reset'
,
@
answers
Logger
.
log
'problem_reset'
,
@
answers
$
.
postWithPrefix
"/modx/problem/
#{
@
id
}
/problem_reset"
,
id
:
@
id
,
(
response
)
=>
$
.
postWithPrefix
"/modx/problem/
#{
@
id
}
/problem_reset"
,
id
:
@
id
,
(
response
)
=>
@
render
(
response
.
html
)
@
render
(
response
.
html
)
@
update
_p
rogress
response
@
update
P
rogress
response
show
:
=>
show
:
=>
if
!
@
element
.
hasClass
'showed'
if
!
@
element
.
hasClass
'showed'
...
@@ -60,7 +60,7 @@ class @Problem
...
@@ -60,7 +60,7 @@ class @Problem
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
]
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
]
@
$
(
'.show'
).
val
'Hide Answer'
@
$
(
'.show'
).
val
'Hide Answer'
@
element
.
addClass
'showed'
@
element
.
addClass
'showed'
@
update
_p
rogress
response
@
update
P
rogress
response
else
else
@
$
(
'[id^=answer_], [id^=solution_]'
).
text
''
@
$
(
'[id^=answer_], [id^=solution_]'
).
text
''
@
$
(
'[correct_answer]'
).
attr
correct_answer
:
null
@
$
(
'[correct_answer]'
).
attr
correct_answer
:
null
...
@@ -72,7 +72,7 @@ class @Problem
...
@@ -72,7 +72,7 @@ class @Problem
$
.
postWithPrefix
"/modx/problem/
#{
@
id
}
/problem_save"
,
@
answers
,
(
response
)
=>
$
.
postWithPrefix
"/modx/problem/
#{
@
id
}
/problem_save"
,
@
answers
,
(
response
)
=>
if
response
.
success
if
response
.
success
alert
'Saved'
alert
'Saved'
@
update
_p
rogress
response
@
update
P
rogress
response
refreshMath
:
(
event
,
element
)
=>
refreshMath
:
(
event
,
element
)
=>
element
=
event
.
target
unless
element
element
=
event
.
target
unless
element
...
...
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