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
b5d377ad
Commit
b5d377ad
authored
Aug 10, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #388 from MITx/kimth/lms-coderesponse
Spinner on waiting for queue
parents
c8675606
125bbbf9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
17 deletions
+11
-17
common/lib/capa/capa/inputtypes.py
+4
-6
common/lib/capa/capa/templates/filesubmission.html
+3
-5
common/lib/capa/capa/templates/textbox.html
+4
-6
No files found.
common/lib/capa/capa/inputtypes.py
View file @
b5d377ad
...
...
@@ -309,15 +309,14 @@ def filesubmission(element, value, status, render_template, msg=''):
eid
=
element
.
get
(
'id'
)
# 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
'
status
=
'queued
'
queue_len
=
msg
msg
=
'Submitted to grader. (Queue length:
%
s)'
%
queue_len
context
=
{
'id'
:
eid
,
'state'
:
status
,
'msg'
:
msg
,
'value'
:
value
,
'queue
d'
:
queued
,
'queue
_len'
:
queue_len
'queue_len'
:
queue_len
}
html
=
render_template
(
"filesubmission.html"
,
context
)
return
etree
.
XML
(
html
)
...
...
@@ -342,10 +341,9 @@ def textbox(element, value, status, render_template, msg=''):
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'
status
=
'queued'
queue_len
=
msg
msg
=
'Submitted to grader. (Queue length:
%
s)'
%
queue_len
...
...
@@ -359,7 +357,7 @@ def textbox(element, value, status, render_template, msg=''):
'mode'
:
mode
,
'linenumbers'
:
linenumbers
,
'rows'
:
rows
,
'cols'
:
cols
,
'hidden'
:
hidden
,
'tabsize'
:
tabsize
,
'queue
d'
:
queued
,
'queue
_len'
:
queue_len
,
'queue_len'
:
queue_len
,
}
html
=
render_template
(
"textbox.html"
,
context
)
try
:
...
...
common/lib/capa/capa/templates/filesubmission.html
View file @
b5d377ad
...
...
@@ -6,11 +6,9 @@
<span
class=
"correct"
id=
"status_${id}"
></span>
% elif state == 'incorrect':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
% elif state == 'incomplete':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
% endif
% if queued:
<span
class=
"xqueue"
id=
"${id}"
>
${queue_len}
</span>
% elif state == 'queued':
<span
class=
"processing"
id=
"status_${id}"
></span>
<span
style=
"display:none;"
class=
"xqueue"
id=
"${id}"
>
${queue_len}
</span>
% endif
<span
class=
"debug"
>
(${state})
</span>
<br/>
...
...
common/lib/capa/capa/templates/textbox.html
View file @
b5d377ad
...
...
@@ -13,14 +13,12 @@
<span
class=
"correct"
id=
"status_${id}"
></span>
% elif state == 'incorrect':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
% elif state == 'incomplete':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
% elif state == 'queued':
<span
class=
"processing"
id=
"status_${id}"
></span>
<span
style=
"display:none;"
class=
"xqueue"
id=
"${id}"
>
${queue_len}
</span>
% endif
% if hidden:
<div
style=
"display:none;"
name=
"${hidden}"
inputid=
"input_${id}"
/>
% endif
% if queued:
<span
class=
"xqueue"
id=
"${id}"
>
${queue_len}
</span>
<div
style=
"display:none;"
name=
"${hidden}"
inputid=
"input_${id}"
/>
% endif
<br/>
<span
class=
"debug"
>
(${state})
</span>
...
...
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