summaryrefslogtreecommitdiff
path: root/kpov_judge/web
diff options
context:
space:
mode:
authorgasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-10-27 16:50:24 +0000
committergasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-10-27 16:50:24 +0000
commita30cb3c64da93b8667ad55213d850eadcbad7844 (patch)
tree6e690db5cbc6ce7a37f3645fbfbf4d2781eaa7c6 /kpov_judge/web
parentd02cd69a8391df327dbfb367d57b8927eeddc6fc (diff)
Fixed encoding in pristopni_kolokvij
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@345 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/web')
-rwxr-xr-xkpov_judge/web/kpov_judge/kpov_judge.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/kpov_judge/web/kpov_judge/kpov_judge.py b/kpov_judge/web/kpov_judge/kpov_judge.py
index 6302c3a..26d3b1d 100755
--- a/kpov_judge/web/kpov_judge/kpov_judge.py
+++ b/kpov_judge/web/kpov_judge/kpov_judge.py
@@ -190,21 +190,24 @@ def task_greeting(task_id, lang):
instr_ok = True
try:
instructions = db.task_instructions.find({'task_id': task_id})[0]
- instructions = instructions.get(lang,
- app.config['DEFAULT_LANG'])
+ instructions = instructions.get(lang, instructions[app.config['DEFAULT_LANG']])
except Exception:
try:
instructions = instructions.values()[0]
except Exception as e:
instructions = str(e)
instr_ok = False
+ instructions = instructions
if instr_ok:
try:
public_params = {}
for k, v in meta.iteritems():
if v.get('public', False):
public_params[k] = params.get(k, "???")
+ # instructions = instructions.format(**public_params).decode('utf8')
instructions = instructions.format(**public_params)
+
+ # instructions = instructions.format(**public_params).encode('utf8')
except Exception as e:
instructions = str(e)
computer_list = db.student_computers.find({'task_id': task_id, 'student_id': student_id})