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/set_motd/task.py | 51 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'kpov_judge/tasks/set_motd') diff --git a/kpov_judge/tasks/set_motd/task.py b/kpov_judge/tasks/set_motd/task.py index f2b65fb..ea5d686 100644 --- a/kpov_judge/tasks/set_motd/task.py +++ b/kpov_judge/tasks/set_motd/task.py @@ -1,41 +1,40 @@ # kpov_util should be imported by add_assignment.py instructions = { - "si":""" -Ustvari dva navidezna računalnika - imenujmo ju SimpleArbiterDhcpGW in -Student. Za računalnik SimpleArbiterDhcpGW uporabite sliko diska, poimenovano -SimpleArbiterDhcpGW. + 'si': '''\ +

+Ustvari dva navidezna računalnika - imenujmo ju SimpleArbiterDhcpGW in Student. +Na računalniku Student ustvarite uporabnika z uporabniškim imenom {{peer_user}}. IP navideznega računalnika Student ter geslo za uporabnika {{peer_user}} nastavite sami. -Na računalniku Student ustvarite uporabnika z uporabniškim imenom {peer_user}. +

+Poskrbite, da se bo v sporočilu, ki se ob prijavi izpiše na računalniku Student, pojavil niz -Poskrbite, da se bo v sporočilu, ki se ob prijavi izpiše na računalniku -Student, pojavil niz "{niz}". Temu sporočilu v angleščini rečemo -"message of the day" - MOTD. +

{{niz}}
-IP navideznega računalnika Student ter geslo za {peer_user} nastavite sami. +

+Temu sporočilu v angleščini rečemo message of the day oziroma MOTD. Ocenjevalni program pričakuje, da se bo ob koncu prijave pojavila ukazna vrstica oblike -Ocenjevalni program pričakuje, da se bo ob koncu prijave pojavila ukazna -vrstica oblike uporabnisko_ime@ime_racunalnika:~$ . +

username@hostname:~$ 
-Pazite, da se bo takšna vrstica pojavila šele po nizu, ki ste ga dobili v -teh navodilih. - """, - 'en':""" -Create two virtual machines - named SimpleArbiterDhcpGW and Student. -For the 'SimpleArbiterDhcpGW', use disc image named SimpleArbiterDhcpGW. +Pazite, da se bo takšna vrstica pojavila šele po nizu, ki ste ga dobili v teh navodilih. + ''', + 'en': '''\ +

+Create two virtual machines named SimpleArbiterDhcpGW and Student. On Student, create a user with the username {{peer_user}}. Set the IP of Student and the password for {{peer_user}} yourself. -On Student, create a user with the username {peer_user}. +

+Set the message of the day (MOTD) on Student to -Set the message of the day (MOTD) on Student to "{niz}". This is the message -which is displayed when you log in. +

{{niz}}
-Set the IP of Student and the password for {peer_user} yourself. +

+This is the message which is displayed when you log in. The grading system expects that after login a prompt similar to -The grading system expects that at the end of login, -a prompt similar to username@name_of_computer:~$ appears. -Make sure that this line shows up only after the -string you got in these instructions. -""" +

username@hostname:~$ 
+ +

+appears. Make sure that this line shows up only after the string you got in these instructions. +''' } computers = { -- cgit v1.2.1