|
|
@ -161,8 +161,8 @@ def gen_ulohy_do_cisla(cislo, organizatori, resitele, slovnik_cisel, size): |
|
|
|
# reseni ulohy |
|
|
|
poc_reseni = rnd.randint(size // 2, size * 2) |
|
|
|
poc_resitel = rnd.randint(1, 3) |
|
|
|
res_sel = rnd.sample(resitele, min(poc_reseni, len(resitele) - 2)) |
|
|
|
for resitel in res_sel: |
|
|
|
res_vyber = rnd.sample(resitele, min(poc_reseni, len(resitele) - 2)) |
|
|
|
for resitel in res_vyber: |
|
|
|
res = Reseni.objects.create(problem = p, |
|
|
|
resitele=[resitel], |
|
|
|
forma=rnd.choice(Reseni.FORMA_CHOICES)) |
|
|
|