Compare commits
No commits in common. "3250a600c92ce46a5d75e7d74f669d01e223f572" and "1fe76657534e9ba13e8da5be5abaf316e626524b" have entirely different histories.
3250a600c9
...
1fe7665753
@ -19,8 +19,6 @@ main {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* Exam analysis */
|
||||
|
||||
#select {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@ -41,20 +39,3 @@ main {
|
||||
width: 45vw;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* Create new exam */
|
||||
|
||||
#new-exam {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#new-exam label {
|
||||
width: 20%;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
|
@ -135,19 +135,7 @@ def add_exercise(n_clicks, children):
|
||||
if n_clicks is None:
|
||||
return children
|
||||
element_table = pd.DataFrame(columns=[c["id"] for c in QUESTION_COLUMNS])
|
||||
element_table = element_table.append(
|
||||
pd.Series(
|
||||
data={
|
||||
"id": 1,
|
||||
"competence": "Rechercher",
|
||||
"theme": "",
|
||||
"comment": "",
|
||||
"score_rate": 1,
|
||||
"is_leveled": 1,
|
||||
},
|
||||
name=0,
|
||||
)
|
||||
)
|
||||
element_table = element_table.append(pd.Series(name=0))
|
||||
new_exercise = html.Div(
|
||||
children=[
|
||||
html.Div(
|
||||
@ -174,7 +162,7 @@ def add_exercise(n_clicks, children):
|
||||
editable=True,
|
||||
row_deletable=True,
|
||||
dropdown={
|
||||
"competence": {
|
||||
"Competence": {
|
||||
"options": [
|
||||
{"label": i, "value": i} for i in config["competences"]
|
||||
]
|
||||
@ -217,19 +205,7 @@ def add_element(n_clicks, elements):
|
||||
return elements
|
||||
|
||||
df = pd.DataFrame.from_records(elements)
|
||||
df = df.append(
|
||||
pd.Series(
|
||||
data={
|
||||
"id": len(df) + 1,
|
||||
"competence": "",
|
||||
"theme": "",
|
||||
"comment": "",
|
||||
"score_rate": 1,
|
||||
"is_leveled": 1,
|
||||
},
|
||||
name=n_clicks,
|
||||
)
|
||||
)
|
||||
df = df.append(pd.Series(name=n_clicks))
|
||||
return df.to_dict("records")
|
||||
|
||||
|
||||
@ -276,6 +252,7 @@ def store_exam(tribe, exam_name, date, term, exercices, elements, elements_id):
|
||||
ex_elements = elements[index]
|
||||
exam.add_exercise(name, ex_elements)
|
||||
|
||||
print(yaml.dump(exam.to_dict()))
|
||||
return exam.to_dict()
|
||||
|
||||
|
||||
|
@ -127,22 +127,12 @@ layout = html.Div(
|
||||
dash_table.DataTable(
|
||||
id="scores_table",
|
||||
columns=[
|
||||
{"id": "id", "name": "Question"},
|
||||
{
|
||||
"id": "competence",
|
||||
"name": "Competence",
|
||||
},
|
||||
{"id": "theme", "name": "Domaine"},
|
||||
{"id": "comment", "name": "Commentaire"},
|
||||
{"id": "score_rate", "name": "Bareme"},
|
||||
{"id": "is_leveled", "name": "Est_nivele"},
|
||||
{"id": c, "name": c} for c in NO_ST_COLUMNS.values()
|
||||
],
|
||||
style_cell={
|
||||
"whiteSpace": "normal",
|
||||
"height": "auto",
|
||||
},
|
||||
fixed_columns={"headers": True, "data": 7},
|
||||
style_table={"minWidth": "100%"},
|
||||
style_data_conditional=[],
|
||||
editable=True,
|
||||
),
|
||||
@ -389,11 +379,7 @@ def update_scores_table(csv, add_element, data):
|
||||
)
|
||||
stack = stack.append(infos)
|
||||
return (
|
||||
[
|
||||
{"id": c, "name": c}
|
||||
for c in stack.columns
|
||||
if c not in ["Trimestre", "Nom", "Date"]
|
||||
],
|
||||
[{"id": c, "name": c} for c in stack.columns],
|
||||
stack.to_dict("records"),
|
||||
highlight_value(stack),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user