diff options
author | pl9506@student.uni-lj.si <pl9506@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-12 17:02:37 +0000 |
---|---|---|
committer | pl9506@student.uni-lj.si <pl9506@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-12 17:02:37 +0000 |
commit | 6d8d125adc395f837e45e24e9fa878506a286176 (patch) | |
tree | 2c491f8b456fd3eda161cd78742459c379721c7c /kpov_judge/tasks | |
parent | 1f6212005b9d3367635844c25ae52b97071ef91e (diff) |
Adjusted task_check a bit, but I still require task and gen_params to be complete before I can finish since dict keys need to be declared and variables format. + My mother made me do it =(
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@52 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks')
-rw-r--r-- | kpov_judge/tasks/copy_rename_20_files_tail_env/task.py | 40 |
1 files changed, 31 insertions, 9 deletions
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 4fa40ab..fc05b7f 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 @@ -114,16 +114,38 @@ def gen_params(user_id, params_meta): def task_check(results, params): import re - score = -9 - if results['NM_nslookup'].find('Server:\t\t{0}\r'.format(params['DNS_NM'])) > -1: - score += 3 - if results['static_nslookup'].find('Server:\t\t{0}\r'.format(params['DNS_static'])) > -1: - score += 3 - if re.search(r'eth0 +802-.*connected', results['NM_nmcli']): - score += 2 - if not re.search(r'eth0 +802-.*connected', results['static_nmcli']): - score += 2 score = 0 + + #TO FINISH SCORING WE REQUIRE DICT KEYS AND FUNCTIONS gen_params AND task TO BE FINISHED + #POINTS FOR EACH TASK MAY BE ADJUSTED IN THE FUTURE + #TASK 1 + if results['NoNameATM'].find('NoFormatATM'.format(params['NoNameAtm'])) > -1: + score += 1 + #TASK 2 + if results['NoNameATM'].find('NoFormatATM'.format(params['NoNameAtm'])) > -1: + score += 1 + #TASK 3 + if results['NoNameATM'].find('NoFormatATM'.format(params['NoNameAtm'])) > -1: + score += 1 + #TASK 4 + if results['NoNameATM'].find('NoFormatATM'.format(params['NoNameAtm'])) > -1: + score += 1 + #TAKS 5 + if results['NoNameATM'].find('NoFormatATM'.format(params['NoNameAtm'])) > -1: + score += 1 + #TASK 6 + if results['NoNameATM'].find('NoFormatATM'.format(params['NoNameAtm'])) > -1: + score += 1 + #TASK 7 + if results['NoNameATM'].find('NoFormatATM'.format(params['NoNameAtm'])) > -1: + score += 1 + #TASK 8 + if results['NoNameATM'].find('NoFormatATM'.format(params['NoNameAtm'])) > -1: + score += 1 + #TASK 9 + if results['NoNameATM'].find('NoFormatATM'.format(params['NoNameAtm'])) > -1: + score += 2 + return score def prepare_disks(templates, params): |