summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/custom_rdate
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-13 21:58:29 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-13 21:59:11 +0200
commite4e109c16ef27012157cb38cf6375c1ae4d2ef69 (patch)
treeff2350f8f769d92544202cb5d2149155aa1d04cb /kpov_judge/tasks/custom_rdate
parentf2060d5143f5c4b14bfff723d238c497a0053f17 (diff)
parent5439f75ca2e1a38803a96853b6cac0ce5c9f58ce (diff)
Merge branch 'improve-web'
Store instructions in HTML and render with jinja2. Add i18n with gettext / pybabel. Improve styling.
Diffstat (limited to 'kpov_judge/tasks/custom_rdate')
-rw-r--r--kpov_judge/tasks/custom_rdate/task.py49
1 files changed, 21 insertions, 28 deletions
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': '''\
+<p>
+Postavite dva navidezna računalnika: <em>SimpleArbiterDhcpRdate</em> in <em>rdateClient</em>.
+
+<p>
+Nastavite čas na <em>rdateClient</em> tako, da kot rdate strežnik uporabite <em>SimpleArbiterDhcpRdate</em>.
+
+<p>
+Na <em>rdateClient</em> ustvarite uporabnika <code>test</code> z geslom <code>test</code>. V domačem imeniku uporabnika <code>test</code> ustvarite program z imenom <code>{{PROGRAM_FILENAME}}</code>. 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. <em lang="en">big endian</em>). Število naj program izpiše na standardni izhod v obliki niza.
+''',
+ 'en': '''\
+<p>
+Set up two virtual machines: <em>SimpleArbiterDhcpRdate</em> and <em>rdateClient</em>.
+
+<p>
+Set the time on <em>rdateClient</em> using rdate with <em>SimpleArbiterDhcpRdate</em> as
+the server.
+
+<p>
+On <em>rdateClient</em> create a user with the username <code>test</code> and password <code>test</code>. Then, write a program called <code>{{PROGRAM_FILENAME}}</code> and put it in user <code>test</code>’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 = {