From 772e18428e6f0b78fcbd69c43adc8729d63eeb78 Mon Sep 17 00:00:00 2001 From: kimth Date: Fri, 10 Aug 2012 11:59:45 -0400 Subject: [PATCH 1/5] Student browser polls for queued submission result --- common/lib/capa/capa/inputtypes.py | 26 +++++++++++++-- common/lib/capa/capa/responsetypes.py | 9 +++-- .../capa/capa/templates/filesubmission.html | 3 ++ common/lib/capa/capa/templates/textbox.html | 3 ++ common/lib/capa/capa/xqueue_interface.py | 3 +- .../xmodule/js/src/capa/display.coffee | 33 ++++++++++++++++++- 6 files changed, 69 insertions(+), 8 deletions(-) diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index 5092e5c37821..ea60b3b7bdb5 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -307,7 +307,18 @@ def filesubmission(element, value, status, render_template, msg=''): Upload a single file (e.g. for programming assignments) ''' eid = element.get('id') - context = { 'id': eid, 'state': status, 'msg': msg, 'value': value, } + + # Check if problem has been queued + queued = '' + queue_len = 0 + if status == 'incomplete': # Flag indicating that the problem has been queued, 'msg' is length of queue + queued = 'true' + queue_len = msg + msg = 'Submitted to grader. (Queue length: %s)' % queue_len + + context = { 'id': eid, 'state': status, 'msg': msg, 'value': value, + 'queued': queued, 'queue_len': queue_len + } html = render_template("filesubmission.html", context) return etree.XML(html) @@ -329,10 +340,18 @@ def textbox(element, value, status, render_template, msg=''): hidden = element.get('hidden', '') # if specified, then textline is hidden and id is stored in div of name given by hidden if not value: value = element.text # if no student input yet, then use the default input given by the problem + + # Check if problem has been queued + queued = '' + queue_len = 0 + if status == 'incomplete': # Flag indicating that the problem has been queued, 'msg' is length of queue + queued = 'true' + queue_len = msg + msg = 'Submitted to grader. (Queue length: %s)' % queue_len # For CodeMirror - mode = element.get('mode') or 'python' # mode, eg "python" or "xml" - linenumbers = element.get('linenumbers','true') # for CodeMirror + mode = element.get('mode','python') + linenumbers = element.get('linenumbers','true') tabsize = element.get('tabsize','4') tabsize = int(tabsize) @@ -340,6 +359,7 @@ def textbox(element, value, status, render_template, msg=''): 'mode': mode, 'linenumbers': linenumbers, 'rows': rows, 'cols': cols, 'hidden': hidden, 'tabsize': tabsize, + 'queued': queued, 'queue_len': queue_len, } html = render_template("textbox.html", context) try: diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 66212f1e8736..25b99fc00aa5 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -898,7 +898,7 @@ def get_score(self, student_answers): 'processor': self.code, } - # Submit request + # Submit request. When successful, 'msg' is the prior length of the queue if is_file(submission): contents.update({'edX_student_response': submission.name}) (error, msg) = qinterface.send_to_queue(header=xheader, @@ -914,8 +914,11 @@ def get_score(self, student_answers): cmap.set(self.answer_id, queuekey=None, msg='Unable to deliver your submission to grader. (Reason: %s.) Please try again later.' % msg) else: - # Non-null CorrectMap['queuekey'] indicates that the problem has been queued - cmap.set(self.answer_id, queuekey=queuekey, msg='Submitted to grader. (Queue length: %s)' % msg) + # Queueing mechanism flags: + # 1) Backend: Non-null CorrectMap['queuekey'] indicates that the problem has been queued + # 2) Frontend: correctness='incomplete' eventually trickles down through inputtypes.textbox + # and .filesubmission to inform the browser to poll the LMS + cmap.set(self.answer_id, queuekey=queuekey, correctness='incomplete', msg=msg) return cmap diff --git a/common/lib/capa/capa/templates/filesubmission.html b/common/lib/capa/capa/templates/filesubmission.html index ff9fc992fdf8..09bc287923ac 100644 --- a/common/lib/capa/capa/templates/filesubmission.html +++ b/common/lib/capa/capa/templates/filesubmission.html @@ -9,6 +9,9 @@ % elif state == 'incomplete': % endif + % if queued: + ${queue_len} + % endif (${state})
${msg|n} diff --git a/common/lib/capa/capa/templates/textbox.html b/common/lib/capa/capa/templates/textbox.html index f201bd6947c9..f31b98b5801a 100644 --- a/common/lib/capa/capa/templates/textbox.html +++ b/common/lib/capa/capa/templates/textbox.html @@ -19,6 +19,9 @@ % if hidden:
% endif + % if queued: + ${queue_len} + % endif
(${state})
diff --git a/common/lib/capa/capa/xqueue_interface.py b/common/lib/capa/capa/xqueue_interface.py index 70f086120e23..6a38a88796b1 100644 --- a/common/lib/capa/capa/xqueue_interface.py +++ b/common/lib/capa/capa/xqueue_interface.py @@ -10,7 +10,8 @@ # TODO: Collection of parameters to be hooked into rest of edX system XQUEUE_LMS_AUTH = { 'username': 'LMS', 'password': 'PaloAltoCA' } -XQUEUE_URL = 'http://xqueue.edx.org' +#XQUEUE_URL = 'http://xqueue.edx.org' +XQUEUE_URL = 'http://ec2-50-17-47-60.compute-1.amazonaws.com' log = logging.getLogger('mitx.' + __name__) diff --git a/common/lib/xmodule/xmodule/js/src/capa/display.coffee b/common/lib/xmodule/xmodule/js/src/capa/display.coffee index 18bec8a7d102..484acd5c8538 100644 --- a/common/lib/xmodule/xmodule/js/src/capa/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/capa/display.coffee @@ -4,6 +4,12 @@ class @Problem @id = @el.data('problem-id') @element_id = @el.attr('id') @url = @el.data('url') + + # Destroy any existing polling threads on Problem change + if window.queuePollerID + window.clearTimeout(window.queuePollerID) + delete window.queuePollerID + @render() $: (selector) -> @@ -12,7 +18,10 @@ class @Problem bind: => MathJax.Hub.Queue ["Typeset", MathJax.Hub] window.update_schematics() - @inputs = @$("[id^=input_#{@element_id.replace(/problem_/, '')}_]") + + problem_prefix = @element_id.replace(/problem_/,'') + @inputs = @$("[id^=input_#{problem_prefix}_]") + @$('section.action input:button').click @refreshAnswers @$('section.action input.check').click @check_fd #@$('section.action input.check').click @check @@ -26,15 +35,37 @@ class @Problem @el.attr progress: response.progress_status @el.trigger('progressChanged') + queueing: => + @queued_items = @$(".xqueue") + if @queued_items.length > 0 + if window.queuePollerID # Only one poller 'thread' per Problem + window.clearTimeout(window.queuePollerID) + window.queuePollerID = window.setTimeout(@poll, 100) + + poll: => + $.postWithPrefix "#{@url}/problem_get", (response) => + @el.html(response.html) + @executeProblemScripts() + @bind() + + @queued_items = @$(".xqueue") + if @queued_items.length == 0 + delete window.queuePollerID + else + # TODO: Dynamically adjust timeout interval based on @queued_items.value + window.queuePollerID = window.setTimeout(@poll, 1000) + render: (content) -> if content @el.html(content) @bind() + @queueing() else $.postWithPrefix "#{@url}/problem_get", (response) => @el.html(response.html) @executeProblemScripts() @bind() + @queueing() executeProblemScripts: -> @el.find(".script_placeholder").each (index, placeholder) -> From ce7f9757032031f26ead166048d2981f37bba82f Mon Sep 17 00:00:00 2001 From: kimth Date: Fri, 10 Aug 2012 12:01:53 -0400 Subject: [PATCH 2/5] Remove temp xqueue url --- common/lib/capa/capa/xqueue_interface.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/lib/capa/capa/xqueue_interface.py b/common/lib/capa/capa/xqueue_interface.py index 6a38a88796b1..70f086120e23 100644 --- a/common/lib/capa/capa/xqueue_interface.py +++ b/common/lib/capa/capa/xqueue_interface.py @@ -10,8 +10,7 @@ # TODO: Collection of parameters to be hooked into rest of edX system XQUEUE_LMS_AUTH = { 'username': 'LMS', 'password': 'PaloAltoCA' } -#XQUEUE_URL = 'http://xqueue.edx.org' -XQUEUE_URL = 'http://ec2-50-17-47-60.compute-1.amazonaws.com' +XQUEUE_URL = 'http://xqueue.edx.org' log = logging.getLogger('mitx.' + __name__) From 3512d7b5d43c85b84a271effd34159954b578812 Mon Sep 17 00:00:00 2001 From: kimth Date: Fri, 10 Aug 2012 13:10:53 -0400 Subject: [PATCH 3/5] Position change in sequence kills polling thread, rather than new Problem creation --- common/lib/xmodule/xmodule/js/src/capa/display.coffee | 6 ------ common/lib/xmodule/xmodule/js/src/sequence/display.coffee | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/capa/display.coffee b/common/lib/xmodule/xmodule/js/src/capa/display.coffee index 484acd5c8538..ae589b8b0433 100644 --- a/common/lib/xmodule/xmodule/js/src/capa/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/capa/display.coffee @@ -4,12 +4,6 @@ class @Problem @id = @el.data('problem-id') @element_id = @el.attr('id') @url = @el.data('url') - - # Destroy any existing polling threads on Problem change - if window.queuePollerID - window.clearTimeout(window.queuePollerID) - delete window.queuePollerID - @render() $: (selector) -> diff --git a/common/lib/xmodule/xmodule/js/src/sequence/display.coffee b/common/lib/xmodule/xmodule/js/src/sequence/display.coffee index 0b17111d8140..832a5ec7eb74 100644 --- a/common/lib/xmodule/xmodule/js/src/sequence/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/sequence/display.coffee @@ -91,6 +91,13 @@ class @Sequence event.preventDefault() new_position = $(event.target).data('element') Logger.log "seq_goto", old: @position, new: new_position, id: @id + + # On Sequence chage, destroy any existing polling thread + # for queued submissions, see ../capa/display.coffee + if window.queuePollerID + window.clearTimeout(window.queuePollerID) + delete window.queuePollerID + @render new_position next: (event) => From 93faf0f4144e988a91c79ce4ce0a3bee41109b7c Mon Sep 17 00:00:00 2001 From: Tom Giannattasio Date: Fri, 10 Aug 2012 14:22:34 -0400 Subject: [PATCH 4/5] added spinner class and image --- common/lib/xmodule/xmodule/css/capa/display.scss | 14 ++++++++++++++ common/static/images/spinner.gif | Bin 0 -> 6942 bytes 2 files changed, 14 insertions(+) create mode 100644 common/static/images/spinner.gif diff --git a/common/lib/xmodule/xmodule/css/capa/display.scss b/common/lib/xmodule/xmodule/css/capa/display.scss index 2088e8baa3e7..2713ae995cec 100644 --- a/common/lib/xmodule/xmodule/css/capa/display.scss +++ b/common/lib/xmodule/xmodule/css/capa/display.scss @@ -77,6 +77,20 @@ div { } } + &.processing { + p.status { + @include inline-block(); + background: url('../images/spinner.gif') center center no-repeat; + height: 20px; + width: 20px; + text-indent: -9999px; + } + + input { + border-color: #aaa; + } + } + &.incorrect, &.ui-icon-close { p.status { @include inline-block(); diff --git a/common/static/images/spinner.gif b/common/static/images/spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..b2f94cd12c351160f0a5ec8aa0a9b7f7f2e16d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G&OFOu(JP6~GSfrVa( z`l{>6nI#AMkJdLvGx=|nm4KWOm28PuQBh0bn!V2feZ%!cR-jf`sY3TU-2LS>+BQ*U zE2Tv-JGv5_Vv6A>XVw*(zyP+U5~{^4%`V~u5aytmzGG`elHBXku`|*2Sq|If`7tr+ zQ)zAw^b!^pZ>48*pX!XL4ay-45}4)sHsn@d7+?EnQivUcx&$O*QB66}a{-*!&kfBP z96;L!uU|@Z(C4t*H)7jCG8<(@B_m?z_CZ{GKW#5R1n0tp7aiPbZ^qHk1zpH@#Zt~5 zbar7r7BZNm+_12-`Ysr}5*nHiz3AKU6JNNPTrP*93cg=>8)mRra?#!)eJeTRB>_8g z{#0LmW9Wlz>y{{&f_O=Iez(;idvcfW5q(1jM$Eb_4t7!L&CkSh{#CUl;^<-JApOhZEl@oB?qG7#xv^!_+my_6Dq%1d;=Nh@%y= zo=Eb$j?}DhzS-slQGx+<5YbbLwzi^210B0jYIry*Z0}YF;>5Gxqw=Xv@uIMapiY2( zGK5D=4h}xm36m}eg*2r~6&y7SqmhEiiwnA&d(#yX%H@Veh5wd(E7_|b8b>qHqPqva zgmJ`RrhC#`*ngBz8Q@yS!$?eZ{3P>TD|_cDPgu?igG*L!_gcdZxmrkVYGer2?UhVN zExL|dtY*U53?G)9Yi#S;SfRa_8m?;s>S|21U42spJm1Hx0E(zpKIW2~oy@@@X?fE7tnac5^mMvwvy4lNYcfm8`^8>w&HJw<_JNhG*+ za-d0IeT`JuXFB!?SL~VOY)0zIkv6wysP-z6C04f&E}5~CK4mN3Jg>cKuD7E{qbG}j c+Urdh#iqlzMkC{Kbk4KSn`>Ip Date: Fri, 10 Aug 2012 15:07:08 -0400 Subject: [PATCH 5/5] additional processing class --- .../lib/xmodule/xmodule/css/capa/display.scss | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/common/lib/xmodule/xmodule/css/capa/display.scss b/common/lib/xmodule/xmodule/css/capa/display.scss index 2713ae995cec..6b1c32ae6552 100644 --- a/common/lib/xmodule/xmodule/css/capa/display.scss +++ b/common/lib/xmodule/xmodule/css/capa/display.scss @@ -49,6 +49,8 @@ padding-left: flex-gutter(9); } } + + div { p.status { text-indent: -9999px; @@ -64,30 +66,26 @@ div { } } - &.correct, &.ui-icon-check { + &.processing { p.status { @include inline-block(); - background: url('../images/correct-icon.png') center center no-repeat; + background: url('../images/spinner.gif') center center no-repeat; height: 20px; - width: 25px; - } - - input { - border-color: green; + width: 20px; + text-indent: -9999px; } } - &.processing { + &.correct, &.ui-icon-check { p.status { @include inline-block(); - background: url('../images/spinner.gif') center center no-repeat; + background: url('../images/correct-icon.png') center center no-repeat; height: 20px; - width: 20px; - text-indent: -9999px; + width: 25px; } input { - border-color: #aaa; + border-color: green; } } @@ -148,6 +146,15 @@ div { width: 14px; } + &.processing, &.ui-icon-check { + @include inline-block(); + background: url('../images/spinner.gif') center center no-repeat; + height: 20px; + position: relative; + top: 6px; + width: 25px; + } + &.correct, &.ui-icon-check { @include inline-block(); background: url('../images/correct-icon.png') center center no-repeat;