Uprava testu na Clanky
This commit is contained in:
parent
070145eda4
commit
b2b7b02bf3
1 changed files with 7 additions and 4 deletions
|
@ -448,10 +448,10 @@ def check_res_clanek():
|
|||
JOIN seminar_problemy AS problem ON problem_ptr_id = problem.id
|
||||
INNER JOIN seminar_hodnoceni AS hodn ON problem.id = hodn.problem_id
|
||||
INNER JOIN seminar_reseni AS rese ON rese.id = hodn.reseni_id
|
||||
INNER JOIN seminar_nodes_otistene_reseni AS resnode ON resnode.reseni_id = rese.id
|
||||
INNER JOIN seminar_nodes_treenode AS tn ON resnode.treenode_ptr_id = tn.id
|
||||
INNER JOIN seminar_nodes_obsah AS son ON son.treenode_ptr_id = tn.first_child_id
|
||||
INNER JOIN seminar_texty AS text ON text.id = son.text_id
|
||||
INNER JOIN seminar_nodes_treenode AS tn ON rese.text_cely_id = tn.id
|
||||
-- Nektere clanky vubec nemely text, tak jim migr 0058 nevyrobila dalsi treenody
|
||||
LEFT OUTER JOIN seminar_nodes_obsah AS son ON son.treenode_ptr_id = tn.first_child_id
|
||||
LEFT OUTER JOIN seminar_texty AS text ON text.id = son.text_id
|
||||
|
||||
ORDER BY problem_ptr_id"""
|
||||
same_fields = ['text_zadani']
|
||||
|
@ -465,6 +465,9 @@ def check_res_clanek():
|
|||
res = zip(old_res,new_res)
|
||||
|
||||
for o,n in res:
|
||||
# text_zadani po novu mohl byt None
|
||||
if n['text_zadani'] is None:
|
||||
n['text_zadani'] = ''
|
||||
check_same(o,n, old_fields, new_fields)
|
||||
|
||||
def check_untyped_problem():
|
||||
|
|
Loading…
Reference in a new issue