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