From 40fa681226d0b75d5062b6c923bdf999eb577888 Mon Sep 17 00:00:00 2001 From: "gasperfele@fri1.uni-lj.si" Date: Mon, 23 Oct 2017 18:56:39 +0000 Subject: Pripravljen pristopni 2017 git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@423 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/edit_find_grep_compile_convert/task.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'kpov_judge/tasks/edit_find_grep_compile_convert') diff --git a/kpov_judge/tasks/edit_find_grep_compile_convert/task.py b/kpov_judge/tasks/edit_find_grep_compile_convert/task.py index 8b8ecb8..7a358b9 100644 --- a/kpov_judge/tasks/edit_find_grep_compile_convert/task.py +++ b/kpov_judge/tasks/edit_find_grep_compile_convert/task.py @@ -14,7 +14,7 @@ Ustvari dva navidezna računalnika s slikama diskov - SimpleArbiter s sliko diska simpleArbiterDhcp in SmallStudent s sliko diska student-entrance2. -Na SimpleArbiter se lahko prijaviš z uporabniškim imenom tester in geslom test. +Na SimpleArbiter se lahko prijaviš z uporabniškim imenom tester in geslom tester. Na SmallStudent se lahko prijaviš kot root z geslom kaboom. Poskrbi, da bo SmallStudent s SimpleArbiter dostopen na naslovu {testip}. @@ -28,7 +28,7 @@ Brati naj jo ima pravico samo lastnik, pisati lastnik in skupina, poganjati nih V {dstfile} zamenjaj vse vrstice oblike poXYZlz, kjer so XYZ poljubni znaki, tako, da bo namesto XYZ niz "kaka". Napiši program v poljubnem programskem jeziku, ki kot argument sprejme število B med 0 in 7. -Program naj prebere znak s standardnega izhoda. +Program naj prebere znak s standardnega vhoda. Če je B-ti bit v znaku nastavljen na 1, naj izpiše "ta". Če je B-ti bit nastavljen na 0, naj program izpiše "ti". Program poimenuj {progname} in ga spravi v domači imenik {testuser}. @@ -38,7 +38,7 @@ Create two virtual machines - SimpleArbiter using simpleArbiterDhcp as the disk image and SmallStudent using student-entrance2 as its disk. -You can log in as testr on SimpleArbiter with the password test. +You can log in as tester on SimpleArbiter with the password tester. You can log in as root on SimpleStudent with the password kaboom. Make sure that SmallStudent is accessible from SimpleArbiter on IP {testip}. @@ -47,7 +47,7 @@ Create a user {testuser} with the password {passwd} on SmallStudent. There is a file containing {magicstr} hidden somewhere in the home directory of user "bilbo". -Copy the into the home directory of user bilbo and name it {dstfile}. +Copy the into the home directory of user {testuser} and name it {dstfile}. Change the owner to {testuser} and leave the group unchanged. Make sure only the owner has the right to read it, only the owner and group members have the right to write to it and noone has the right to execute it. In {dstfile}, replace all lines of the form poXYZlz where XYZ are arbitrary characters so that XYZ is replaced by "kaka". @@ -60,7 +60,7 @@ Name the program {progname} and place it in the home directory of {testuser}. ''', } -instructions = {'si': 'Potrpite.', 'en': 'Have patience.'} +# instructions = {'si': 'Potrpite.', 'en': 'Have patience.'} computers = { 'SimpleArbiter': { @@ -275,7 +275,7 @@ def task_check(results, params): break hints += ["wrong file contents\n" + str(diff_pos[1])] #hints += ["wrong file contents"] - expected_ls = u"ls -l ~/{dstfile}\r\n-rw--w---- 1 {testuser} bilbo .*{dstfile}\r\n".format(**params) + expected_ls = u"ls -l ~/{dstfile}\r\n-rw--w---- 1 {testuser} bilbo .*{dstfile}.*\r\n".format(**params) if re.match(expected_ls, results["dst_ls"]): score += 3 else: @@ -298,6 +298,7 @@ def task_check(results, params): if results["tita_return"] == expected_tita: score += 2 else: + #hints += [u"program output incorrect\n" + results["tita_return"] + expected_tita] hints += [u"program output incorrect\n" + results["tita_return"]] return score, hints -- cgit v1.2.1