Commit 1b8cdcd4 by Victor Shnayder

Add unstyled problem progress per-problem.

needs css
parent 111f7533
......@@ -24,11 +24,17 @@ class @Problem
@$('section.action input.save').click @save
@$('input.math').keyup(@refreshMath).each(@refreshMath)
renderProgressState: () =>
@$(".problem-progress").html(@el.data('progress_detail'))
updateProgress: (response) =>
if response.progress_changed
@el.data('progress_status', response.progress_status)
@el.data('progress_detail', response.progress_detail)
@el.trigger('progressChanged')
@renderProgressState()
queueing: =>
@queued_items = @$(".xqueue")
......@@ -79,6 +85,8 @@ class @Problem
@setupInputTypes()
@bind()
@queueing()
@renderProgressState()
# TODO add hooks for problem types here by inspecting response.html and doing
# stuff if a div w a class is found
......
......@@ -6,6 +6,9 @@
% endif
</h2>
<section class="problem-progress">
</section>
<section class="problem">
${ problem['html'] }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment