|
@ -127,7 +127,10 @@ class TabulkaOdevzdanychReseniView(ListView): |
|
|
ctx['resitele'] = self.resitele |
|
|
ctx['resitele'] = self.resitele |
|
|
tabulka: dict[m.Problem, dict[m.Resitel, SouhrnReseni]] = dict() |
|
|
tabulka: dict[m.Problem, dict[m.Resitel, SouhrnReseni]] = dict() |
|
|
|
|
|
|
|
|
def pridej_reseni(problem, resitel, body, cas): |
|
|
def pridej_reseni(resitel, hodnoceni): |
|
|
|
|
|
problem = hodnoceni.problem |
|
|
|
|
|
body = hodnoceni.body |
|
|
|
|
|
cas = hodnoceni.reseni.cas_doruceni |
|
|
if problem not in tabulka: |
|
|
if problem not in tabulka: |
|
|
tabulka[problem] = dict() |
|
|
tabulka[problem] = dict() |
|
|
if resitel not in tabulka[problem]: |
|
|
if resitel not in tabulka[problem]: |
|
@ -143,7 +146,7 @@ class TabulkaOdevzdanychReseniView(ListView): |
|
|
|
|
|
|
|
|
for hodnoceni in self.get_queryset(): |
|
|
for hodnoceni in self.get_queryset(): |
|
|
for resitel in hodnoceni.reseni.resitele.all(): |
|
|
for resitel in hodnoceni.reseni.resitele.all(): |
|
|
pridej_reseni(hodnoceni.problem, resitel, hodnoceni.body, hodnoceni.reseni.cas_doruceni) |
|
|
pridej_reseni(resitel, hodnoceni) |
|
|
|
|
|
|
|
|
hodnoty: list[list[SouhrnReseni]] = [] |
|
|
hodnoty: list[list[SouhrnReseni]] = [] |
|
|
resitele_do_tabulky: list[m.Resitel] = [] |
|
|
resitele_do_tabulky: list[m.Resitel] = [] |
|
|