From 53fea983a90447865c429c2573bfb36cba179054 Mon Sep 17 00:00:00 2001 From: "gasperfele@fri1.uni-lj.si" Date: Wed, 1 Apr 2015 20:32:28 +0000 Subject: added hints to task results git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@296 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/copy_rename_20_files_tail_env/task.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'kpov_judge/tasks/copy_rename_20_files_tail_env') diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py index 00d4daf..856d311 100644 --- a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py +++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py @@ -215,6 +215,7 @@ def task_check(results, params): import re import random score = 0 + hints = [] r = random.Random(params['file_creator_random_seed']) fnames = [] for i in xrange(20): @@ -234,6 +235,8 @@ def task_check(results, params): task1_ok = task1_ok and results['preimenuj'].find(fname) > 0 if task1_ok: score += 2 + else: + hints += ["wrong dash rename"] # premakni datoteke s cim krajsim ukazom fnames = [] for i in xrange(40): @@ -253,6 +256,8 @@ def task_check(results, params): task2_ok = task2_ok and len(post_src) < 2 if task2_ok: score += 2 + else: + hints += ["wrong rename cmd"] # mama_ukaz # task3_ok = True @@ -285,11 +290,13 @@ def task_check(results, params): task3_ok = False if task3_ok: score += 2 + else: + hints += ["mama cries"] # sledenje syslog #print( results['syslog_start_time']) #print( results['syslog_result']) #print( results['syslog_end_time']) - return score + return score, hints def prepare_disks(templates, params): # d = templates['simpleArbiterDhcp'] -- cgit v1.2.1