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
fb6e7417
Commit
fb6e7417
authored
Mar 06, 2022
by
Vladimír Štill
Browse files
evalweb: Add link support for convert
parent
29057a88
Changes
2
Hide whitespace changes
Inline
Side-by-side
evalweb/evalweb.py
View file @
fb6e7417
...
...
@@ -151,10 +151,16 @@ def convert() -> str:
"task_form"
:
task_form
,
"student_area"
:
""
}
if
request
.
method
==
'POST'
and
'submit_button'
in
request
.
form
:
student_string
=
request
.
form
[
'student_string'
]
student_type
=
student_form
.
make
.
data
task
=
task_form
.
make
.
data
if
(
request
.
method
==
'POST'
and
'submit_button'
in
request
.
form
)
\
or
(
request
.
method
==
'GET'
and
'link'
in
request
.
args
):
if
request
.
method
==
'POST'
:
student_string
=
request
.
form
[
'student_string'
]
student_type
=
student_form
.
make
.
data
task
=
task_form
.
make
.
data
else
:
student_string
=
request
.
args
[
'inval'
]
student_type
=
request
.
args
[
'inty'
]
task
=
request
.
args
[
'outty'
]
convert_args
[
"student_area"
]
=
student_string
if
student_string
==
""
:
...
...
@@ -175,6 +181,8 @@ def convert() -> str:
student_string
=
student_string
,
student_type
=
types
[
student_type
],
task
=
tasks
[
task
],
raw_in_type
=
student_type
,
raw_out_type
=
task
,
output
=
output
,
is_task
=
is_task
)
...
...
evalweb/templates/result_convert.html
View file @
fb6e7417
{% extends 'base.html' %}
{% block header %}
<h1>
Výsledek převodu
</h1>
<h1>
Výsledek převodu
<a
class=
"anchor"
href=
"?link&inty={{raw_in_type | urlencode}}&inval={{student_string | urlencode}}&outty={{raw_out_type | urlencode}}"
>
⚓
</a></h1>
{% endblock %}
{% 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