Trocha popisu TabulkaOdevzdanychReseniView, ať se v tom dá vyznat
This commit is contained in:
parent
61e71efcc4
commit
dd5d8886ee
1 changed files with 4 additions and 4 deletions
|
@ -125,7 +125,7 @@ class TabulkaOdevzdanychReseniView(ListView):
|
|||
ctx = super().get_context_data(*args, **kwargs)
|
||||
ctx['problemy'] = self.problemy
|
||||
ctx['resitele'] = self.resitele
|
||||
tabulka = dict()
|
||||
tabulka: dict[m.Problem, dict[m.Resitel, SouhrnReseni]] = dict()
|
||||
|
||||
def pridej_reseni(problem, resitel, body, cas):
|
||||
if problem not in tabulka:
|
||||
|
@ -145,11 +145,11 @@ class TabulkaOdevzdanychReseniView(ListView):
|
|||
for resitel in hodnoceni.reseni.resitele.all():
|
||||
pridej_reseni(hodnoceni.problem, resitel, hodnoceni.body, hodnoceni.reseni.cas_doruceni)
|
||||
|
||||
hodnoty = []
|
||||
resitele_do_tabulky = []
|
||||
hodnoty: list[list[SouhrnReseni]] = []
|
||||
resitele_do_tabulky: list[m.Resitel] = []
|
||||
for resitel in self.resitele:
|
||||
dostal_body = False
|
||||
resiteluv_radek = []
|
||||
resiteluv_radek: list[SourhnReseni] = [] # podle pořadí v self.problemy, pokud daný problém neřešil, pak None
|
||||
for problem in self.problemy:
|
||||
if problem in tabulka and resitel in tabulka[problem]:
|
||||
resiteluv_radek.append(tabulka[problem][resitel])
|
||||
|
|
Loading…
Reference in a new issue