diff options
Diffstat (limited to 'kpov_judge')
-rw-r--r-- | kpov_judge/tasks/copy_rename_100_files/task.py | 5 | ||||
-rw-r--r-- | kpov_judge/tasks/mock_entrance_exam/task.py | 2 | ||||
-rwxr-xr-x | kpov_judge/web/kpov_judge/kpov_judge.py | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/kpov_judge/tasks/copy_rename_100_files/task.py b/kpov_judge/tasks/copy_rename_100_files/task.py index 1b8326b..457e57d 100644 --- a/kpov_judge/tasks/copy_rename_100_files/task.py +++ b/kpov_judge/tasks/copy_rename_100_files/task.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# # TODO: # - check if everything is filled in (computers, params, preparation) # - improve scoring @@ -118,7 +121,7 @@ def task_check(results, params): score += 4 else: hints += ["wrong files"] - return hints, score + return score, hints def prepare_disks(templates, params): pass diff --git a/kpov_judge/tasks/mock_entrance_exam/task.py b/kpov_judge/tasks/mock_entrance_exam/task.py index 493366b..8a0f80f 100644 --- a/kpov_judge/tasks/mock_entrance_exam/task.py +++ b/kpov_judge/tasks/mock_entrance_exam/task.py @@ -226,7 +226,7 @@ def task_check(results, params): hints += ['C executable not found'] else: score += 1 - return hints, score + return score, hints def prepare_disks(templates, params): c_source = '''#include<stdio.h> diff --git a/kpov_judge/web/kpov_judge/kpov_judge.py b/kpov_judge/web/kpov_judge/kpov_judge.py index 26d3b1d..d5669d8 100755 --- a/kpov_judge/web/kpov_judge/kpov_judge.py +++ b/kpov_judge/web/kpov_judge/kpov_judge.py @@ -72,7 +72,7 @@ def results_post(task_id, results): task_check_code = compile(task_check_source, 'checker.py', 'exec') exec(task_check_code) # raise Exception(str(params)) - hints, res = task_check(results, params) + res, hints = task_check(results, params) except Exception as e: hints = ["Checker died: " + str(e)] res = 0 |