From c5a8b2c72841ad0b58fb36870624737634778056 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 13 Oct 2018 03:10:03 +0200 Subject: HTMLize instructions and use jinja2 to render them Only fixed tasks for the kpov_2018 class for now. --- kpov_judge/tasks/custom_rdate/task.py | 49 +++++++++++++++-------------------- 1 file changed, 21 insertions(+), 28 deletions(-) (limited to 'kpov_judge/tasks/custom_rdate/task.py') diff --git a/kpov_judge/tasks/custom_rdate/task.py b/kpov_judge/tasks/custom_rdate/task.py index 4959266..4c5ff9f 100644 --- a/kpov_judge/tasks/custom_rdate/task.py +++ b/kpov_judge/tasks/custom_rdate/task.py @@ -2,34 +2,27 @@ # TODO: finish this! instructions = { - 'si':""" -Postavite dva navidezna racunalnika: -- SimpleArbiterDhcpRdate s slike diska simpleArbiterRdate ter -- rdateClient. - -Na rdateClient ustvarite uporabnika test z geslom test. Nastavite cas na -rdateClient tako, da kot rdate strežnik uporabite SimpleArbiterDhcpRdate. -Nato v domacem imeniku uporabnika test ustvarite program z imenom -{PROGRAM_FILENAME}. -Program naj prebere 4 byte podatkov s standardnega vhoda in jih pretvori v -predznaceno celo število, pri čemer naj uporablja zapis z debelim koncem -(big endian). -Število naj program izpiše na standardni izhod v obliki niza. -""", - 'en':""" -Setup two virtual machines: -- SimpleArbiterDhcpRdate from disk image simpleArbiterRdate and -- rdateClient. - -On rdateClient, create a user with the username test and password test. -Set the time on rdateClient using rdate with SimpleArbiterDhcpRdate as -the server. Then, write a program called {PROGRAM_FILENAME} and put it in -user test's home directory. -The program should read 4 bytes of data from standard input, convert -them into a signed integer using big endian byte ordering and output the -resulting integer (as a string) to standard output. -""" - + 'si': '''\ +

+Postavite dva navidezna računalnika: SimpleArbiterDhcpRdate in rdateClient. + +

+Nastavite čas na rdateClient tako, da kot rdate strežnik uporabite SimpleArbiterDhcpRdate. + +

+Na rdateClient ustvarite uporabnika test z geslom test. V domačem imeniku uporabnika test ustvarite program z imenom {{PROGRAM_FILENAME}}. Program naj prebere štiri bajte podatkov s standardnega vhoda in jih pretvori v predznačeno celo število, pri čemer naj uporablja zapis z debelim koncem (angl. big endian). Število naj program izpiše na standardni izhod v obliki niza. +''', + 'en': '''\ +

+Set up two virtual machines: SimpleArbiterDhcpRdate and rdateClient. + +

+Set the time on rdateClient using rdate with SimpleArbiterDhcpRdate as +the server. + +

+On rdateClient create a user with the username test and password test. Then, write a program called {{PROGRAM_FILENAME}} and put it in user test’s home directory. The program should read four bytes of data from standard input, convert them into a signed integer using big endian byte ordering and output the resulting integer (as a string) to standard output. +''', } computers = { -- cgit v1.2.1