Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
fja
eval
Commits
bce0026f
Commit
bce0026f
authored
Feb 25, 2021
by
Vladimír Štill
Browse files
evalweb: Add support for links to compare results
parent
113c495f
Pipeline
#67307
passed with stage
in 49 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
evalweb/evalweb.py
View file @
bce0026f
...
@@ -60,11 +60,19 @@ def compare() -> str:
...
@@ -60,11 +60,19 @@ def compare() -> str:
student_area
=
""
# areas remembers user input or replace it with examples
student_area
=
""
# areas remembers user input or replace it with examples
teacher_area
=
""
teacher_area
=
""
if
request
.
method
==
'POST'
and
'submit_button'
in
request
.
form
:
print
(
request
.
form
)
teacher_type
=
teacher_form
.
make
.
data
if
(
request
.
method
==
'POST'
and
'submit_button'
in
request
.
form
)
\
teacher_string
=
request
.
form
[
'teacher_string'
]
or
(
request
.
method
==
'GET'
and
'link'
in
request
.
args
):
student_type
=
student_form
.
make
.
data
if
request
.
method
==
'POST'
:
student_string
=
request
.
form
[
'student_string'
]
teacher_type
=
teacher_form
.
make
.
data
teacher_string
=
request
.
form
[
'teacher_string'
]
student_type
=
student_form
.
make
.
data
student_string
=
request
.
form
[
'student_string'
]
else
:
teacher_type
=
request
.
args
[
"tt"
]
teacher_string
=
request
.
args
[
"ta"
]
student_type
=
request
.
args
[
"st"
]
student_string
=
request
.
args
[
"sa"
]
student_area
=
student_string
student_area
=
student_string
teacher_area
=
teacher_string
teacher_area
=
teacher_string
...
@@ -114,7 +122,11 @@ def compare() -> str:
...
@@ -114,7 +122,11 @@ def compare() -> str:
teacher
=
checker
.
teacher
,
teacher
=
checker
.
teacher
,
student
=
checker
.
student
,
student
=
checker
.
student
,
teacher_type_string
=
types
[
checker
.
teacher
.
task
],
teacher_type_string
=
types
[
checker
.
teacher
.
task
],
student_type_string
=
tasks
[
checker
.
student
.
task
])
student_type_string
=
tasks
[
checker
.
student
.
task
],
teacher_type
=
teacher_type
,
student_type
=
student_type
,
teacher_string
=
teacher_string
,
student_string
=
student_string
)
if
request
.
method
==
'POST'
and
'example_button'
in
request
.
form
:
if
request
.
method
==
'POST'
and
'example_button'
in
request
.
form
:
# of which types examples should be
# of which types examples should be
...
...
evalweb/static/style.css
View file @
bce0026f
...
@@ -33,6 +33,13 @@ a {
...
@@ -33,6 +33,13 @@ a {
color
:
#377ba8
;
color
:
#377ba8
;
}
}
a
.anchor
{
text-decoration
:
none
;
color
:
gray
;
vertical-align
:
sub
;
font-size
:
60%
;
}
hr
{
hr
{
border
:
none
;
border
:
none
;
border-top
:
1px
solid
lightgray
;
border-top
:
1px
solid
lightgray
;
...
...
evalweb/templates/result_compare.html
View file @
bce0026f
{% extends 'base.html' %}
{% extends 'base.html' %}
{% block header %}
{% block header %}
<h1>
Výsledek porovnání
</h1>
<h1>
Výsledek porovnání
<a
class=
"anchor"
href=
"?link&tt={{teacher_type | urlencode}}&ta={{teacher_string | urlencode}}&st={{student_type | urlencode}}&sa={{student_string | urlencode}}"
>
⚓
</a></h1>
{% endblock %}
{% endblock %}
{% block content %}
{% block content %}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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