|
@ -30,10 +30,14 @@ def gen_reseni_ulohy(rnd, cisla, uloha, pocet_resitelu, poradi_cisla, resitele_c |
|
|
res.resitele.set(res_vyber) |
|
|
res.resitele.set(res_vyber) |
|
|
res.save() |
|
|
res.save() |
|
|
|
|
|
|
|
|
|
|
|
deadlines = cisla[poradi_cisla -1 ].deadline_v_cisle.all() |
|
|
|
|
|
dline = random.choice(deadlines) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Vytvoření hodnocení. |
|
|
# Vytvoření hodnocení. |
|
|
hod = Hodnoceni.objects.create( |
|
|
hod = Hodnoceni.objects.create( |
|
|
body=rnd.randint(0, uloha.max_body), |
|
|
body=rnd.randint(0, uloha.max_body), |
|
|
cislo_body=cisla[poradi_cisla - 1], |
|
|
deadline_body = dline, |
|
|
reseni=res, |
|
|
reseni=res, |
|
|
problem=uloha |
|
|
problem=uloha |
|
|
) |
|
|
) |
|
|