Generování hodnocení u více úloh témata
This commit is contained in:
		
							parent
							
								
									4a521a34fa
								
							
						
					
					
						commit
						8e0c34ed99
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		|  | @ -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…
	
		Reference in a new issue
	
	 Jonas Havelka
						Jonas Havelka