Cache table recap aussi en mode jury

This commit is contained in:
Emmanuel Viennet 2023-02-21 00:45:27 +01:00
parent b924be56bb
commit 76257f1794
2 changed files with 17 additions and 8 deletions

View File

@ -449,13 +449,12 @@ def gen_formsemestre_recapcomplet_html_table(
"""
table = None
table_html = None
if not (mode_jury or selected_etudid):
if not selected_etudid:
if include_evaluations:
table_html = sco_cache.TableRecapWithEvalsCache.get(formsemestre.id)
else:
table_html = sco_cache.TableRecapCache.get(formsemestre.id)
# en mode jury ne cache pas la table html
if mode_jury or (table_html is None):
if table_html is None:
table = _gen_formsemestre_recapcomplet_table(
formsemestre,
res,
@ -465,11 +464,10 @@ def gen_formsemestre_recapcomplet_html_table(
selected_etudid=selected_etudid,
)
table_html = table.html()
if not mode_jury:
if include_evaluations:
sco_cache.TableRecapWithEvalsCache.set(formsemestre.id, table_html)
else:
sco_cache.TableRecapCache.set(formsemestre.id, table_html)
if include_evaluations:
sco_cache.TableRecapWithEvalsCache.set(formsemestre.id, table_html)
else:
sco_cache.TableRecapCache.set(formsemestre.id, table_html)
return table_html, table

View File

@ -2066,6 +2066,17 @@ table#formation_list_table tr.gt_hl {
background-color: rgb(96%, 96%, 96%);
}
table.formation_list_table td.buttons {
white-space: nowrap;
}
table.formation_list_table td.buttons a {
margin-left: 8px;
}
table.formation_list_table td.buttons span.but_placeholder {
display: inline-block;
width: 15px;
}
.formation_list_table img.delete_small_img {
width: 16px;
height: 16px;