113 lines
4.2 KiB
Python
113 lines
4.2 KiB
Python
#!/usr/bin/env python
|
|
# encoding: utf-8
|
|
|
|
import dash_html_components as html
|
|
import dash_core_components as dcc
|
|
from .models import get_tribes, get_exams
|
|
from .callbacks import *
|
|
|
|
layout = html.Div(
|
|
children=[
|
|
html.Header(
|
|
children=[
|
|
html.H1("Analyse des notes"),
|
|
html.P("Dernière sauvegarde", id="lastsave"),
|
|
],
|
|
),
|
|
html.Main(
|
|
children=[
|
|
html.Section(
|
|
children=[
|
|
html.Div(
|
|
children=[
|
|
"Classe: ",
|
|
dcc.Dropdown(
|
|
id="tribe",
|
|
options=[
|
|
{"label": t["name"], "value": t["name"]}
|
|
for t in get_tribes().values()
|
|
],
|
|
value=next(iter(get_tribes().values()))["name"],
|
|
),
|
|
],
|
|
),
|
|
html.Div(
|
|
children=[
|
|
"Evaluation: ",
|
|
dcc.Dropdown(id="exam_select"),
|
|
],
|
|
),
|
|
],
|
|
id="selects",
|
|
),
|
|
html.Section(
|
|
children=[
|
|
html.Div(
|
|
children=[
|
|
dash_table.DataTable(
|
|
id="final_score_table",
|
|
columns=[
|
|
{"name": "Étudiant", "id": "student_name"},
|
|
{"name": "Note", "id": "mark"},
|
|
{"name": "Barème", "id": "score_rate"},
|
|
],
|
|
)
|
|
],
|
|
id="final_score_table_container",
|
|
),
|
|
html.Div(
|
|
children=[
|
|
dash_table.DataTable(
|
|
id="score_statistics_table",
|
|
columns=[],
|
|
)
|
|
],
|
|
id="score_statistics_table_container",
|
|
),
|
|
html.Div(
|
|
children=[
|
|
dcc.Graph(
|
|
id="fig_exam_histo",
|
|
config={"displayModeBar": False},
|
|
)
|
|
],
|
|
id="fig_exam_histo_container",
|
|
),
|
|
html.Div(
|
|
children=[
|
|
dcc.Graph(
|
|
id="fig_questions_bar",
|
|
config={"displayModeBar": False},
|
|
)
|
|
],
|
|
id="fig_questions_bar_container",
|
|
),
|
|
],
|
|
id="analysis",
|
|
),
|
|
html.Section(
|
|
children=[
|
|
dash_table.DataTable(
|
|
id="scores_table",
|
|
columns=[],
|
|
style_data_conditional=[],
|
|
fixed_columns={},
|
|
editable=True,
|
|
style_table={"minWidth": "100%"},
|
|
style_cell={
|
|
"minWidth": "100px",
|
|
"width": "100px",
|
|
"maxWidth": "100px",
|
|
"overflow": "hidden",
|
|
"textOverflow": "ellipsis",
|
|
},
|
|
)
|
|
],
|
|
id="edit",
|
|
),
|
|
],
|
|
),
|
|
dcc.Store(id="scores"),
|
|
],
|
|
)
|