Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
7fd93c0e
Commit
7fd93c0e
authored
3 years ago
by
Jiří Setnička
Browse files
Options
Downloads
Patches
Plain Diff
Výsledkovky a seznamy účastníků: Exporty umí volit sloupce pro export
Issue
#182
parent
76f5d19d
Branches
Branches containing commit
No related tags found
1 merge request
!115
Výběr sloupečků v exportech
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
mo/web/org_contest.py
+2
-2
2 additions, 2 deletions
mo/web/org_contest.py
mo/web/org_score.py
+8
-4
8 additions, 4 deletions
mo/web/org_score.py
mo/web/templates/org_generic_list.html
+8
-0
8 additions, 0 deletions
mo/web/templates/org_generic_list.html
with
18 additions
and
6 deletions
mo/web/org_contest.py
+
2
−
2
View file @
7fd93c0e
...
...
@@ -552,7 +552,7 @@ def org_generic_list(round_id: Optional[int] = None, hier_id: Optional[int] = No
)
else
:
table
=
make_contestant_table
(
query
,
round
)
return
table
.
send_as
(
format
)
return
table
.
send_as
(
format
,
args
=
request
.
args
)
contest_list_columns
=
(
...
...
@@ -641,7 +641,7 @@ def make_contestant_table(query: Query, round: db.Round, add_checkbox: bool = Fa
cols
:
List
[
Column
]
=
list
(
contest_list_columns
)
if
add_checkbox
:
cols
=
[
Column
(
key
=
'
checkbox
'
,
name
=
'
'
,
title
=
'
'
)]
+
cols
cols
=
[
Column
(
key
=
'
checkbox
'
,
name
=
'
'
,
title
=
'
'
,
in_export
=
None
)]
+
cols
if
add_contest_column
:
cols
.
append
(
Column
(
key
=
'
region_code
'
,
name
=
'
kod_oblasti
'
,
title
=
round
.
get_level
().
name
.
title
()))
...
...
This diff is collapsed.
Click to expand it.
mo/web/org_score.py
+
8
−
4
View file @
7fd93c0e
...
...
@@ -144,11 +144,13 @@ def org_score(round_id: Optional[int] = None, hier_id: Optional[int] = None, ct_
columns
=
[
Column
(
key
=
'
order
'
,
name
=
'
poradi
'
,
title
=
'
Pořadí
'
),
Column
(
key
=
'
status
'
,
name
=
'
stav
'
,
title
=
'
Stav (vítěz, …)
'
,
in_html
=
False
),
Column
(
key
=
'
participant
'
,
name
=
'
ucastnik
'
,
title
=
'
Účastník
'
),
Column
(
key
=
'
participant
'
,
name
=
'
ucastnik
'
,
title
=
'
Účastník
'
,
in_export
=
False
),
Column
(
key
=
'
first_name
'
,
name
=
'
krestni
'
,
title
=
'
Křestní jméno
'
,
in_html
=
False
),
Column
(
key
=
'
last_name
'
,
name
=
'
prijmeni
'
,
title
=
'
Příjmení
'
,
in_html
=
False
),
Column
(
key
=
'
email
'
,
name
=
'
email
'
,
title
=
'
E-mail
'
,
in_html
=
False
),
]
if
not
ct_id
:
columns
.
append
(
Column
(
key
=
'
contest
'
,
name
=
'
oblast
'
,
title
=
round
.
get_level
().
name
.
title
()
))
columns
.
append
(
Column
(
key
=
'
contest
'
,
name
=
'
oblast
'
,
title
=
'
Soutěžní
'
+
round
.
get_level
().
name
))
columns
.
extend
([
Column
(
key
=
'
pion_place
'
,
name
=
'
soutezni_misto
'
,
title
=
'
Soutěžní místo
'
,
in_html
=
False
),
Column
(
key
=
'
school
'
,
name
=
'
skola
'
,
title
=
'
Škola
'
),
...
...
@@ -171,7 +173,7 @@ def org_score(round_id: Optional[int] = None, hier_id: Optional[int] = None, ct_
columns
.
append
(
Column
(
key
=
'
total_points
'
,
name
=
'
celkove_body
'
,
title
=
'
Celkové body
'
))
if
is_edit
:
columns
.
append
(
Column
(
key
=
'
suborder
'
,
name
=
'
zjednoznacneni_poradi
'
,
title
=
'
Zjednoznačnění
'
))
#
columns.append(Column(key='order_key', name='order_key', title='Třídící klíč'))
columns
.
append
(
Column
(
key
=
'
order_key
'
,
name
=
'
order_key
'
,
title
=
'
Třídící klíč
'
,
in_html
=
False
,
in_export
=
False
))
# Construct rows
table_rows
=
[]
...
...
@@ -197,6 +199,8 @@ def org_score(round_id: Optional[int] = None, hier_id: Optional[int] = None, ct_
'
order
'
:
order_cell
,
'
status
'
:
status
,
'
user
'
:
user
,
'
first_name
'
:
user
.
first_name
,
'
last_name
'
:
user
.
last_name
,
'
email
'
:
user
.
email
,
'
participant
'
:
cell_pion_link
(
user
,
local_pion_ct_id
,
user
.
full_name
()),
'
contest
'
:
CellLink
(
pion
.
contest
.
place
.
name
or
"
?
"
,
url_for
(
'
org_contest
'
,
ct_id
=
pion
.
contest_id
)),
...
...
@@ -253,7 +257,7 @@ def org_score(round_id: Optional[int] = None, hier_id: Optional[int] = None, ct_
edit_form
=
edit_form
,
snapshot_form
=
snapshot_form
,
)
else
:
return
table
.
send_as
(
format
)
return
table
.
send_as
(
format
,
args
=
request
.
args
)
class
SetFinalScoretableForm
(
FlaskForm
):
...
...
This diff is collapsed.
Click to expand it.
mo/web/templates/org_generic_list.html
+
8
−
0
View file @
7fd93c0e
...
...
@@ -63,6 +63,14 @@
Celkem
<b>
{{count|inflected('nalezený účastník', 'nalezení účastníci', 'nalezených účastníků')}}
</b>
.
{% endif %}
</div>
<div
class=
"form-row"
>
<div
class=
"collapsible"
><input
type=
"checkbox"
class=
"toggle"
id=
"column-selection-toggle"
>
<label
for=
"column-selection-toggle"
class=
"toggle toggle-small"
>
Vybrat sloupce pro stažení
</label>
<div
class=
"collapsible-inner"
><div
class=
"form-frame"
>
{{ table.get_columns_checkboxes(line_prefix="\t\t\t\t", args=request.args) }}
</div></div>
</div>
</div>
</form>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment