|
@ -50,6 +50,7 @@ class TabulkaOdevzdanychReseniView(TemplateView): |
|
|
hodnoceni__problem__in=[problem], # ditto |
|
|
hodnoceni__problem__in=[problem], # ditto |
|
|
).order_by('-cas_doruceni') |
|
|
).order_by('-cas_doruceni') |
|
|
pocet_reseni = reseni_k_tomuto_problemu.count() |
|
|
pocet_reseni = reseni_k_tomuto_problemu.count() |
|
|
|
|
|
if pocet_reseni > 0: |
|
|
nejnovejsi = reseni_k_tomuto_problemu.first().cas_doruceni |
|
|
nejnovejsi = reseni_k_tomuto_problemu.first().cas_doruceni |
|
|
pocet_bodu = max( |
|
|
pocet_bodu = max( |
|
|
[h.body for h in m.Hodnoceni.objects.filter( |
|
|
[h.body for h in m.Hodnoceni.objects.filter( |
|
@ -58,6 +59,9 @@ class TabulkaOdevzdanychReseniView(TemplateView): |
|
|
) |
|
|
) |
|
|
] |
|
|
] |
|
|
) |
|
|
) |
|
|
|
|
|
else: |
|
|
|
|
|
nejnovejsi = None |
|
|
|
|
|
pocet_bodu = None |
|
|
ctx['radky'][resitel].append( |
|
|
ctx['radky'][resitel].append( |
|
|
SouhrnReseni( |
|
|
SouhrnReseni( |
|
|
pocet_reseni=pocet_reseni, |
|
|
pocet_reseni=pocet_reseni, |
|
|