|
@ -786,7 +786,7 @@ def texUploadView(request): |
|
|
meta = json.loads(q["meta"]) |
|
|
meta = json.loads(q["meta"]) |
|
|
html = q["html"] |
|
|
html = q["html"] |
|
|
|
|
|
|
|
|
if meta["typ"] in ["uloha", "serial", "reseni"]: |
|
|
if meta["typ"] in ["uloha", "serial", "reseni", "tema"]: |
|
|
|
|
|
|
|
|
# Uložíme soubory |
|
|
# Uložíme soubory |
|
|
if meta["typ"] != "reseni": |
|
|
if meta["typ"] != "reseni": |
|
@ -801,6 +801,7 @@ def texUploadView(request): |
|
|
"uloha": Problem.TYP_ULOHA, |
|
|
"uloha": Problem.TYP_ULOHA, |
|
|
"serial": Problem.TYP_SERIAL, |
|
|
"serial": Problem.TYP_SERIAL, |
|
|
"reseni": Problem.TYP_ULOHA, |
|
|
"reseni": Problem.TYP_ULOHA, |
|
|
|
|
|
"tema": Problem.TYP_TEMA, |
|
|
} |
|
|
} |
|
|
problem_typ = typy[meta["typ"]] |
|
|
problem_typ = typy[meta["typ"]] |
|
|
|
|
|
|
|
@ -852,6 +853,7 @@ def texUploadView(request): |
|
|
else: |
|
|
else: |
|
|
problem.text_zadani = html |
|
|
problem.text_zadani = html |
|
|
problem.nazev = meta["nazev"] |
|
|
problem.nazev = meta["nazev"] |
|
|
|
|
|
if meta["typ"] != "tema": |
|
|
problem.body = meta["body"] |
|
|
problem.body = meta["body"] |
|
|
|
|
|
|
|
|
problem.save() |
|
|
problem.save() |
|
|