Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Paul
Python3 Automarker
Commits
4dc87546
Commit
4dc87546
authored
Jan 05, 2017
by
David Paul
Browse files
Add warning outside alert, since some students disable alerts
parent
40090274
Changes
3
Hide whitespace changes
Inline
Side-by-side
automarker_client.py
View file @
4dc87546
...
...
@@ -86,6 +86,7 @@ def display_checks(code):
"""Displays alerts for any check that fails - returns True if all checks pass, False otherwise"""
for
check
in
exercise
.
checks
:
if
not
check
.
check
(
code
):
jq
(
"#warning"
).
text
(
check
.
text
)
alert
(
check
.
text
)
return
False
return
True
...
...
@@ -122,6 +123,7 @@ def grade_code():
def
code_change
(
*
args
):
"""Handles any time the code changes - test results become invalid"""
jq
(
"#warning"
).
text
(
""
)
jq
(
"#output-row"
).
addClass
(
"hidden"
)
jq
(
"#test-row"
).
addClass
(
"hidden"
)
for
test
in
exercise
.
tests
:
...
...
css/automarker.css
View file @
4dc87546
...
...
@@ -2,3 +2,7 @@
display
:
none
;
color
:
red
;
}
#warning
{
color
:
red
;
}
index.php
View file @
4dc87546
...
...
@@ -57,6 +57,12 @@ require_once("bower_components/pythonauto/util/lti_util.php");
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12 text-center"
>
<span
id=
"warning"
></span>
</div>
</div>
<div
class=
"row hidden"
id=
"output-row"
>
<div
class=
"col-md-12"
>
<h3
class=
"text-center"
>
Output
</h3>
...
...
Write
Preview
Supports
Markdown
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