Browse Source

Generování hodnocení u více úloh témata

export_seznamu_prednasek
Jonas Havelka 3 years ago
parent
commit
8e0c34ed99
  1. 10
      seminar/testutils.py

10
seminar/testutils.py

@ -581,7 +581,7 @@ def gen_temata(rnd, rocniky, rocnik_cisla, organizatori):
rocnik_temata.append(letosni_temata)
return rocnik_temata
def gen_ulohy_tematu(rnd, organizatori, tema, kod, cislo, cislo_se_vzorakem):
def gen_ulohy_tematu(rnd, organizatori, resitele, tema, kod, cislo, cislo_se_vzorakem):
""" Generování úlohy k danému tématu. """
# Proměnné pro náhodné generování názvů a zadání.
@ -627,10 +627,14 @@ def gen_ulohy_tematu(rnd, organizatori, tema, kod, cislo, cislo_se_vzorakem):
uloha_zadani = UlohaZadaniNode.objects.create(uloha=uloha, first_child = zad, root=tema.temavcislenode_set.first().root)
uloha.ulohazadaninode = uloha_zadani
# Generování řešení a hodnocení k úloze
gen_reseni_ulohy(rnd, [cislo], uloha, len(resitele)//4, 1,
resitele, resitele)
return uloha, uloha_zadani
def gen_ulohy_k_tematum(rnd, rocniky, rocnik_cisla, rocnik_temata, organizatori):
def gen_ulohy_k_tematum(rnd, rocniky, rocnik_cisla, rocnik_temata, organizatori, resitele):
logger.info('Generuji úlohy k tématům...')
# Ke každému ročníku si vezmeme příslušná čísla a témata
@ -860,7 +864,7 @@ def create_test_data(size = 6, rnd = None):
"MFI", 8)
# generování úloh k tématům ve všech číslech
gen_ulohy_k_tematum(rnd, rocniky, rocnik_cisla, rocnik_temata, organizatori)
gen_ulohy_k_tematum(rnd, rocniky, rocnik_cisla, rocnik_temata, organizatori, resitele)
#generování soustředění
soustredeni = gen_soustredeni(rnd, resitele, organizatori)

Loading…
Cancel
Save