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
4feb8327
Commit
4feb8327
authored
Aug 13, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polling rerenders problem when individual queued items return
parent
6c29b424
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+8
-3
No files found.
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
4feb8327
...
@@ -32,7 +32,8 @@ class @Problem
...
@@ -32,7 +32,8 @@ class @Problem
queueing
:
=>
queueing
:
=>
@
queued_items
=
@
$
(
".xqueue"
)
@
queued_items
=
@
$
(
".xqueue"
)
if
@
queued_items
.
length
>
0
@
num_queued_items
=
@
queued_items
.
length
if
@
num_queued_items
>
0
if
window
.
queuePollerID
# Only one poller 'thread' per Problem
if
window
.
queuePollerID
# Only one poller 'thread' per Problem
window
.
clearTimeout
(
window
.
queuePollerID
)
window
.
clearTimeout
(
window
.
queuePollerID
)
queuelen
=
@
get_queuelen
()
queuelen
=
@
get_queuelen
()
...
@@ -49,12 +50,16 @@ class @Problem
...
@@ -49,12 +50,16 @@ class @Problem
poll
:
=>
poll
:
=>
$
.
postWithPrefix
"
#{
@
url
}
/problem_get"
,
(
response
)
=>
$
.
postWithPrefix
"
#{
@
url
}
/problem_get"
,
(
response
)
=>
@
queued_items
=
$
(
response
.
html
).
find
(
".xqueue"
)
# If queueing status changed, then render
if
@
queued_items
.
length
==
0
@
new_queued_items
=
$
(
response
.
html
).
find
(
".xqueue"
)
if
@
new_queued_items
.
length
isnt
@
num_queued_items
@
el
.
html
(
response
.
html
)
@
el
.
html
(
response
.
html
)
@
executeProblemScripts
()
=>
@
executeProblemScripts
()
=>
@
setupInputTypes
()
@
setupInputTypes
()
@
bind
()
@
bind
()
@
num_queued_items
=
@
new_queued_items
.
length
if
@
num_queued_items
==
0
delete
window
.
queuePollerID
delete
window
.
queuePollerID
else
else
# TODO: Some logic to dynamically adjust polling rate based on queuelen
# TODO: Some logic to dynamically adjust polling rate based on queuelen
...
...
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