From eda91c50d7dc25520fabee0bddd334b3d02bdedd Mon Sep 17 00:00:00 2001
From: Timotej Lazar
+
-
-
-Lahko si ogledate surove:
+Ogledate si lahko:
{{task_id}}
-Navodila
-
+
+
-Navodila
+
+
{{instructions}}
-Računalniki v vaji
+Računalniki
-{{c['name']}}
+ {{c['name']}}
{% if 'disk_urls' in c %}
{% for u in c['disk_urls'] %}
@@ -27,16 +69,12 @@
{% else %}
Slike navideznih diskov so v izdelavi in bodo kmalu na voljo.
{% endif %}
+
Osnovne slike
+Osnovne slike
{% for b in backing_images %}
Rezultati
{% if openstack %}
Openstack projekt za to vajo je že ustvarjen ali v izdelavi (funkcionalnost še ne deluje).
{% else %}
Ustvari Openstack projekt za to vajo (funkcionalnost še ne deluje).
{% endif %}
+#}
+
--
cgit v1.2.1
From 08a3e2857d1241ec1d908094d7f52e7331f4c738 Mon Sep 17 00:00:00 2001
From: Timotej Lazar
+Zdravo, {{student_id}}.
+
+
+Trenutno so na voljo naloge:
+
+
-Zdravo, {{student_id}}
-
-{{env}}
-
Trenutno so na voljo predmeti:
+
↩ {{clas.name}}
+
+
+{% for t in tasks %}
+
diff --git a/kpov_judge/web/kpov_judge/templates/index.html b/kpov_judge/web/kpov_judge/templates/index.html
index b5149ab..49895b0 100644
--- a/kpov_judge/web/kpov_judge/templates/index.html
+++ b/kpov_judge/web/kpov_judge/templates/index.html
@@ -1,20 +1,17 @@
-
+
+
+KPOV Judge
+
{% for c in classes %}
-
Navodila lahko najdete na strani LUSY. - - diff --git a/kpov_judge/web/kpov_judge/templates/task_greeting.html b/kpov_judge/web/kpov_judge/templates/task_greeting.html index 217c0ca..20da231 100644 --- a/kpov_judge/web/kpov_judge/templates/task_greeting.html +++ b/kpov_judge/web/kpov_judge/templates/task_greeting.html @@ -1,14 +1,7 @@ + -
+Slike diskov za to nalogo:
{% for c in computers %}
-
+Te slike so enake za vse naloge in jih prenesete samo enkrat.
+
Ogledate si lahko:
+
+Postavite dva navidezna računalnika: SimpleArbiter in Student. Oba naj bosta povezana na internet. Poleg tega mora biti Student na naslovu
+Računajte, da se na Student ob zagonu zažene program
+V domačem imeniku uporabnika
+Napišite skripto ali program
+Lastnik vseh ustvarjenih datotek mora biti uporabnik
+Prijavi se na sistem kot uporabnik
+V domači mapi najdeš imenik
+Napiši najkrajši ukaz v
+Napiši ukaz, ki s pomočjo ukaza
+Napiši program (lahko v
+Namesti paket
+S pomočjo programa
+V imeniku
+Log into the system as
+In your home folder you will find a directory called
+Find the shortest command for copying all the files located in
+Come up with a command or sequence of commands in bash which will, using
+Write a program (which may be a shell script) that will track the contents of
+Install the package
+Using the
+In the directory
+Postavite dva navidezna računalnika: SimpleArbiterDhcpRdate in rdateClient.
+
+
+Nastavite čas na rdateClient tako, da kot rdate strežnik uporabite SimpleArbiterDhcpRdate.
+
+
+Na rdateClient ustvarite uporabnika
+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
+Ustvari dva navidezna računalnika: SimpleArbiter SmallStudent.
-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
+Na SmallStudent ustvari uporabnika
+Na SmallStudent je nekje v domačem imeniku uporabnika
+V
+Napiši program v poljubnem programskem jeziku, ki kot argument sprejme število B med 0 in 7. Program naj prebere znak s standardnega vhoda Če je B-ti bit v znaku nastavljen na 1, naj izpiše
+Create two virtual machines: SimpleArbiter and SmallStudent.
-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
+Create a user
+There is a file containing
+In
+Write a program in any programming language. The program should accept a single argument B, which is a number between 0 and 7. It should read a character from standard input and output
+Postavi štiri navidezne računalnike: simpleArbiter, DHCP_server, BootableClientA in BootableClientB.
+
+
+Na DHCP_server postavi strežnik DHCP s pomočjo ISC dhcp 3 na naslovu
+Če se zaganja BootableClientB, naj se sistem zažene v datoteko z imenom
+Živi USB priklopite na na DHCP_server in z njega poberite datoteke, potrebne za zagon. Datoteke z nastavitvami za PXELinux, ki jih najdete na živem USB, morajo biti dostopne na korenskem imeniku strežnika TFTP.
+
+
+Tako BootableClientA kot BootableClientB naj bosta brez diskov.
+''',
+ 'en': '''\
+
+Set up four virtual machines: simpleArbiter, DHCP_server, BootableClientA and BootableClientB.
+
+
+On DHCP_server, set up a DHCP server using ISC dhcp 3. Set the IP address of this server to
+If BootableClientB tries to boot over the network, have the DHCP server tell it to boot from the file
+Connect the live USB to DHCP_server and copy the files neccessarry for it to boot. The PXELinux configuration files must be the same as the ones found on the live USB and must be accessible on the TFTP server root.
+
+
+Both BootableCLientA and BootableClientB should be diskless.
+''',
}
+
computers = {
'DHCPServer': {
'disks': [
@@ -49,10 +45,6 @@ computers = {
'options':{'readonly': False},
'parts': [ {'dev': 'sdb1', 'path':'/mnt'} ],
},
- #{ 'name': 'CDROM',
- # 'options':{'readonly': True},
- # 'parts': [],# no parts, no mounting.
- #}
],
'network_interfaces': [{'network': 'net1'}],
'flavor': 'm1.tiny',
@@ -76,10 +68,6 @@ computers = {
'disks': [
{ 'name': 'simpleArbiterGW',
},
- #{ 'name': 'CDROM',
- # 'options': {'readonly': True},
- # 'parts': [{'dev': 'b1', 'path': '/cdrom'}],
- #},
],
'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}],
'flavor': 'm1.tiny',
@@ -121,8 +109,6 @@ def task(IP_DHCP, IP_GW, MAC_BOOT, BOOT_FNAME):
# could work (but you should test it)
ip_str = pexpect.run('ip addr show')
eth_re_str = r"ether (([0-9a-f]{{2}}:){{5}}[0-9a-f]{{2}})(.*)\r\n(.*){}(.*)\s(\w*)\r\n"
- # print eth_re_str.format(IP_DHCP)
- # print ip_str
ip_re = re.search(eth_re_str.format(IP_GW), ip_str)
mac_SA = ip_re.group(1)
eth_dev_SA = ip_re.group(6)
@@ -162,7 +148,6 @@ def gen_params(user_id, params_meta):
params['IP_DHCP'], params['IP_GW'] = kpov_util.IPv4_addr_gen(r, net, 2)
params['BOOT_FNAME'] = kpov_util.fname_gen(r)
params['TFTP_STRING'] = kpov_util.alnum_gen(r, 45)
- # IP_NM, DNS_NM, IP_static, DNS_static)
return params
def task_check(results, params):
@@ -209,7 +194,6 @@ def task_check(results, params):
return score, hints
def prepare_disks(templates, task_params, global_params):
-# d = templates['simpleArbiterDhcp']
d = templates['student-DHCPServer']
s = """# {}""".format(task_params['TFTP_STRING'])
d = templates['bootable_usb']
diff --git a/kpov_judge/tasks/ldap_import/task.py b/kpov_judge/tasks/ldap_import/task.py
index b46b432..f8fdd60 100644
--- a/kpov_judge/tasks/ldap_import/task.py
+++ b/kpov_judge/tasks/ldap_import/task.py
@@ -2,14 +2,13 @@
instructions = {
'si':"""
-Ustvari dva navidezna računalnika - SimpleArbiter z diskom simpleArbiterDhcp ter LDAPServer.
+
+Ustvari dva navidezna računalnika: SimpleArbiter in LDAPServer.
-Na LDAPServer namesti strežnik LDAP. Strežnik naj skrbi za domeno
-DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+Na LDAPServer namesti strežnik LDAP. Strežnik naj skrbi za domeno
-V imeniku ustvari uporabnika
-CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+V imeniku ustvari uporabnika
-Poskrbi, da se bo lahko klient s simpleArbiterDhcp povezal na LDAP strežnik na LDAPServer.
-V primeru, da se klient poveže kot {BIND_USERNAME} z geslom {BIND_PASSWORD},
+
+z geslom
+z geslom
+Poskrbi, da se bo lahko klient s SimpleArbiter povezal na LDAP strežnik na LDAPServer.
+V primeru, da se klient poveže kot
+ter ustvarjanje novih objektov v
+
+
+Create two virtual machines: SimpleArbiter and LDAPServer.
-Set up an LDAP server on LDAPServer. Make it responsible for
-DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+Set up an LDAP server on LDAPServer. Make it responsible for
+
Create a user
-CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-with the password {LDAP_PASSWORD} and a user
-CN={BIND_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+with the password
+with the password
+Make sure that a client from SimpleArbiter can connect to the LDAP server on LDAPServer. If the client identifies themself as
+and to create objects in
+
+
+Postavite dva navidezna računalnika - SimpleArbiter in Student. Oba naj bosta povezana na internet. Poleg tega mora biti Student na naslovu {{student_IP}} dostopen s SimpleArbiter.
-Računajte, da se na Student ob zagonu zažene program {net_prog_name},
-ki vam spreminja nastavitve mrežne kartice.
+
+Računajte, da se na Student ob zagonu zažene program {{net_prog_name}}, ki vam spreminja nastavitve mrežne kartice.
-V domačem imeniku uporabnika student obstaja program {P_c} v programskem jeziku C.
-Prevedite ga v program z imenom {P_executable}.
-Izvorna koda je namenoma pokvarjena tako, da so vanjo vrinjeni nepotrebni znaki.
-Pred prevajanjem jo morate popraviti.
+
+V domačem imeniku uporabnika
+Napišite skripto ali program
+Lastnik vseh ustvarjenih datotek mora biti uporabnik
+Set up two virtual machines - SimpleArbiter and Student. Both should be connected to the internet. Student should also be accessible from SimpleArbiter at the address
+Keep in mind that a program called
+There is a program called
+Also, write a script or program called
+The owner of all created files should be
+Postavi dva navidezna računalnika: SimpleArbiter in NATServer. NATServer naj ima dva omrežna vmesnika - z enim naj bo povezan na lokalno omrežje, na katerem naj bo tudi simpleArbiter, z drugim pa na Internet.
+
+
+Na NATServer skonfiguriraj omrežne vmesnike tako, da bo imel dostop do Interneta in da bo imel na lokalnem omrežju
+Poskrbi, da bo SimpleArbiter prek DHCP dobil naslov
+Set up two virtual machines: SimpleArbiter and
+NATServer. NATServer should have two network
+adapters. Connect the first adapter to SimpleArbiter and the
+second adapter to the Internet.
+
+
+Configure the network in NATServer so that one interface is connected to the Internet while the other is connected to SimpleArbiter and has the address
+Configure a DHCP server on NATServer so that SimpleArbiter gets the IP
+Postavi dva navidezna računalnika: SimpleArbiter in VPNClient1. Poskrbite, da bosta povezana med seboj in v internet. Na VPNClient1 namestite OpenVPN in program za nadzor nad virtualnimi napravami (s katerim kreirate napravo
+Na strežniku SimpleArbiter že teče strežnik in uporablja skrivnost, ki jo najdete tudi na VPNClient1 v domačem imeniku uporabnika
+Nato poskrbite, da bo na VPNClient1 na navideznem omrežju prek NFS omogočen
+dostop do imenika
+Setup two virtual machines: SimpleArbiter and VPNClient1. Set the client's network up so that it has access to the internal network and the internet. On VPNClient1, install OpenVPN and a program for supervising virtual devices
+(which you will use to create a
+An OpenVPN server is already running on SimpleArbiter. Use the secret
+available on VPNClient1 in the home directory of user
+After you have set up the VPN, make the directory
+Ustvari dva navidezna računalnika: SimpleArbiter in RadiusServer. Na RadiusServer namesti FreeRadius ter MySQL.
-Ustvari mysql podatkovno bazo z imenom {MYSQL_DB_NAME}. Ustvari mysql
-uporabnika z imenom {MYSQL_ADMIN_USER} in geslom {MYSQL_ADMIN_PASSWORD},
-ki naj ima poln dostop do te baze. Prijava za tega uporabnika mora biti
-omogočena tudi s SimpleArbiter.
+
+Ustvari podatkovno bazo MySQL z imenom
+Nastavi FreeRadius tako, da bo podatke o uporabnikih in geslih pobiral iz baze MySQL z imenom
+Dostop do strežnika Radius na RadiusServer s SimpleArbiter naj bo mogoč ob uporabi skrivnosti
+V bazi ustvari vnos, ki bo omogočil, da se na RadiusServer s pomočjo protokola Radius avtenticira uporabnik
+Nastavi PAM za prijavo (login) tako, da bo dovolj, če se uporabnik na SSH predstavi z uporabniškim imenom in geslom, ki sta veljavna na FreeRadius, ne glede na
+Create two virtual machines: SimpleArbiter and RadiusServer. On RadiusServer, install FreeRadius and MySQL.
-Create a mysql database named {MYSQL_DB_NAME}. Create a mysql user with the
-username {MYSQL_ADMIN_USER} and password {MYSQL_ADMIN_PASSWORD}. Make sure
-this user can access the database from SimpleArbiter and has administrative
-rights over the {MYSQL_DB_NAME} database.
+
+Create a MySQL database named
+Set up FreeRadius so that the data about users and passwords is stored in the MySQL database. Keep the default schema (table names).
-Make the Radius server on RadiusServer accessible from SimpleArbiter using
-{RADIUS_SECRET} as the secret.
+
+Make the Radius server on RadiusServer accessible from SimpleArbiter using
+Create an entry in the database which will enable a user with the username
+Set up PAM to enable login over SSH using a username and password which are
+valida on the FreeRadius server, regardless of the entries in
+Ustvari tri navidezne računalnike. Za prvega uporabi sliko diska simpleArbiterDhcpGW, za drugega sliko diska
+maliNetworkManager, za tretjega sliko diska maliBrezNetworkManager. Računalnike imenujmo enako kot slike diska.
+
+
+Na maliBrezNetworkManager poskrbi, da NetworkManager ne bo več skrbel za omrežni vmesnik, temveč bosta delovala ukaza
+Na maliNetworkManager nastavi naslov IP
+Na maliBrezNetworkManager nastavi naslov IP
+Create three virtual machines. Use simpleArbiterDhcpGW as the disk image for the first, maliNetworkManager as the disk image for the second, and maliBrezNetworkManager for the third. The virtual machine names can match the disks.
+
+
+Make sure that on maliBrezNetworkManager
+On maliNetworkManager, set the IP address to
+Ustvari dva navidezna računalnika - imenujmo ju SimpleArbiterDhcpGW in Student.
+Na računalniku Student ustvarite uporabnika z uporabniškim imenom
+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.
+
+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:~$ .
+
+Create two virtual machines named SimpleArbiterDhcpGW and Student. On Student, create a user with the username
+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.
+
+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.
-"""
+
+appears. Make sure that this line shows up only after the string you got in these instructions.
+'''
}
computers = {
diff --git a/kpov_judge/tasks/smb_nfs/task.py b/kpov_judge/tasks/smb_nfs/task.py
index a94d677..6d1e51d 100644
--- a/kpov_judge/tasks/smb_nfs/task.py
+++ b/kpov_judge/tasks/smb_nfs/task.py
@@ -2,24 +2,26 @@
# TODO: dokoncaj!
instructions = {
- 'si':"""
-Postavi dva navidezna računalnika (simpleArbiterDhcp in FileServer).
+ 'si': '''\
+
+Postavi dva navidezna računalnika: simpleArbiterDhcp in FileServer.
-Poskrbi, da bo imenik {NFS_MOUNT} na FileServer dostopen prek NFS in
-prek SMB kot imenik v skupni rabi {SMB_SHARENAME}.
-Ime SMB strežnika nastavite na {FILESERVER_NAME}.
+
+Poskrbi, da bo imenik
+SimpleArbiterDhcp naj ima prek NFS pravico pisati po imeniku.
+''',
+ 'en': '''\
+
+Set up two virtual computers: simpleArbiterDhcp and FileServer.
-Make sure that the directory {NFS_MOUNT} on FileServer is accessible
-over NFS and over SMB under the sharename {SMB_SHARENAME}.
-Set the SMB server name to {FILESERVER_NAME}.
+
+Make sure that the directory
+SimpleArbiterDhcp should have write access to
+Postavi tri navidezne računalnike: SimpleArbiter, SNMPServer in SNMPClient.
+
+
+Napiši program
+Poskrbi, da bo strežnik SNMP pod OID
+
+
+sporočal, koliko časa je vklopljen v sekundah.
+
+
+Napiši skripto, poimenovano
+kot član skupnosti
+Set up three virtual computers: SimpleArbiter, SNMPServer and SNMPClient.
+
+
+Write a program called
+Make sure that the SNMP server reports its uptime in seconds over SNMP under OID
+
+
+Write a script called
+on simpleArbiterDhcpGWSNMP as a member of the community
+Postavi navidezni računalnik SimpleArbiter in StudentVLC. Poskrbi, da bosta na istem omrežju, od koder bosta imela dostop tudi do interneta.
-Posnemi ali kako drugače ustvari film ter poskrbi, da bo film dostopen na
-lokalnem omrežju prek RTP z imenom toka {TOK} na naslovu {NASLOV}, vrata {PORT}.
-Računaj, da bodo film lahko videli tvoji sošolci. Kršenje avtorskih pravic
-je pri reševanju te naloge strogo prepovedano.
-""",
- 'en':"""
-Set up a virtual computer called SimpleArbiter using the simpleArbiter disk and
-a virtual computer called StudentVLC using the student-VLC disk. Make sure they
+
+Na StudentVLC posodobi datoteko
+Posnemi ali kako drugače ustvari film ter poskrbi, da bo film dostopen na lokalnem omrežju prek RTP z imenom toka
+Set up a virtual computer called SimpleArbiter using the simpleArbiter disk and
+a virtual computer called StudentVLC using the student-VLC disk. Make sure they
are on the same network and that they have access to the Internet.
-On StundentVLC, update /etc/apt/sources.list, check the for updates and install
-VLC.
-Record or otherwise create a movie and make sure the movie is avaliable
-on your local network via RTP with the name of the stream {TOK} at the address
-{NASLOV} on port {PORT}.
-Take into account that the movie may be seen by your classmates.
-Copyright infrigement while solving this task is strictly prohibited.
+
+On StundentVLC, update /etc/apt/sources.list, check the for updates and install VLC.
-"""
+
+Record or otherwise create a movie and make sure the movie is avaliable on your local network via RTP with the name of the stream
Podrobna navodila (HOWTO)
--
cgit v1.2.1
From b41b2bebc05585a6e374dafafae9bed2503becad Mon Sep 17 00:00:00 2001
From: Timotej Lazar
-Zdravo, {{student_id}}.
+{{ _('Zdravo, %(student)s.', student=student_id) }}
-
-Trenutno so na voljo naloge:
+
-Zdravo, {{student_id}}.
+{{ _('Zdravo, %(student)s.', student=student_id) }}
-
-Trenutno so na voljo predmeti:
+
-Slike diskov za to nalogo:
+{{ _('Slike diskov za to nalogo:') }}
{% for c in computers %}
-Te slike so enake za vse naloge in jih prenesete samo enkrat.
+{{ _('Te slike so enake za vse naloge. Prenesite samo tiste, ki jih še nimate.') }}
-Ogledate si lahko:
+{{ _('Ogledate si lahko:') }}
-{{ _('Ogledate si lahko:') }}
+{% if result is none %}
+{{ _('Naloga nima še nobenega poskusa.') }}
+{% elif result['result'] == 10 %}
+{{ _('Naloga je uspešno opravljena dne %(time)s.', time=result['time']) }}
+{% else %}
+{{ _('Naloga še ni opravljena, najvišji rezultat je %(score)s.', score=result['result']) }}
+{% endif %}
-
+{{ _('Program za preverjanje.') }}
+
+{{c['name']}}
+
+
{% for u in c['disk_urls'] %}
-
{% else %}
Slike navideznih diskov so v izdelavi in bodo kmalu na voljo.
{% endif %}
- Osnovne slike
+
{% for b in backing_images %}
Rezultati
{{student_IP}
dostopen s SimpleArbiter.
-Računajte, da se na Student ob zagonu zažene program {net_prog_name},
+{{net_prog_name}
,
ki vam spreminja nastavitve mrežne kartice.
-V domačem imeniku uporabnika student obstaja program {P_c} v programskem jeziku C.
-Prevedite ga v program z imenom {P_executable}.
-Izvorna koda je namenoma pokvarjena tako, da so vanjo vrinjeni nepotrebni znaki.
+student
obstaja program {{P_c}
v programskem jeziku C. Prevedite ga v program z imenom {{P_executable}
. Izvorna koda je namenoma pokvarjena tako, da so vanjo vrinjeni nepotrebni znaki.
Pred prevajanjem jo morate popraviti.
-Napišite skripto ali program {P_script} v domačem imeniku uporabnika student, ki:
-- požene {P_executable} z argumentom "{arg_c}" in mu na standardni vhod
- pripelje vrednost spremenljivke {env_c}
-- vse, kar {P_executable} izpiše na stderr, spravi v datoteko {out_stderr_c}.
-- vse vrstice, ki jih {P_executable} izpiše na stdout in vsebujejo
- zaporedje znakov "ma", zapiše v {out_stdout_c}.
+{{P_script}
v domačem imeniku uporabnika student
, ki
+
+
-Lastnik vseh ustvarjenih datotek mora biti uporabnik student.
-Gesla uporabnika student (vaje) ne smete spreminjati.''',
+{{P_executable}
z argumentom {{arg_c}
in mu na standardni vhod pripelje vrednost spremenljivke {{env_c}
;
+{{P_executable}
izpiše na stderr
, spravi v datoteko {{out_stderr_c}
;
+{{P_executable}
izpiše na stdout
in vsebujejo zaporedje znakov ma
, zapiše v {{out_stdout_c}
.
+student
. Gesla uporabnika student (vaje
) ne smete spreminjati.
+''',
'en': '''
''',
}
diff --git a/kpov_judge/tasks/copy_rename_100_files/task.py b/kpov_judge/tasks/copy_rename_100_files/task.py
index 051f9f7..9dcf69a 100644
--- a/kpov_judge/tasks/copy_rename_100_files/task.py
+++ b/kpov_judge/tasks/copy_rename_100_files/task.py
@@ -6,20 +6,20 @@
instructions = {
'si':"""
-Ustvari dva navidezna računalnika. Za prvega uporabi sliko diska simpleArbiterDhcp. Na drugem računalniku
+Ustvari dva navidezna računalnika. Za prvega uporabi sliko diska simpleArbiterDhcp. Na drugem računalniku
ustvari uporabnika test z geslom test.
Na sliki diska simpleArbiterDhcp najdeš imenik s 100 datotekami. Prekopiraj vse datoteke na drugi računalnik v domači imenik uporabnika test.
Spremeni vsebino datotek tako, da vse male črke spremeniš v velike. Poskrbi, da se bo s prvega računalnika (simpleArbiterDhcp) mogoče prek
-ssh prijaviti na drugi računalnik in prebrati predelane datoteke.
+ssh prijaviti na drugi računalnik in prebrati predelane datoteke.
""",
'en': '''
-Create two virtual machines. For the first, use the `simpleArbiterDhcp' image.
+Create two virtual machines. For the first, use the `simpleArbiterDhcp' image.
On the second machine, create a user `test' with the password `test'.
The `simpleArbiterDhcp' disk image contains a folder with 100 files. Copy all
of these files to the other computer into the home folder of theuser `test'.
Modify the content of these files by converting all lowercase letters into
uppercase. Make sure that the first machine (`simpleArbiterDhcp') can use ssh
-to access the second machine and read the processed files.
+to access the second machine and read the processed files.
''',
}
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 aa57d3e..b65161d 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
@@ -1,69 +1,56 @@
# kpov_util should be imported by add_assignment.py
-# TODO (polz):
instructions = {
- 'si':"""
-Prijavi se na sistem kot uporabnik student z geslom vaje.
-V domači mapi najdeš imenik {file_rename_dirname} z 20 datotekami.
- - Preimenuj vse datoteke tako, da zamenjaš minuse s podčrtaji
- - Napiši najkrajši ukaz v bash, ki vse datoteke iz imenika {mv_src_dir}
- premakne v imenik {mv_dst_dir}. Ukaz spravi v
- /home/student/mv_ukaz. Pazi, da bodo ob testiranju v izvornem imeniku ISTE
- datoteke, kot so bile, ko je bila virtualka nova, ciljni imenik pa bo
- prazen. To pomeni, da boste verjetno morali po vsakem testiranju datoteke
- premakniti nazaj. Za krajšanje ukaza lahko izkoristite imeni imenikov.
- - Napiši ukaz, ki s pomočjo ukaza grep v datoteko ~/mama.txt izpiše imena vseh
- navadnih (ne skritih) datotek v trenutnem imeniku, ki vsebujejo niz "mama",
- v datoteko ~/napake.txt pa izpiše vse morebitne napake (npr. to, da so nekateri
- objekti v trenutnem imeniku dejansko imeniki ali napačne simbolične povezave).
- Ukaz spravite v datoteko /home/student/mama_ukaz.
- - Napiši program (lahko v bash), ki bo 5s sledil vsebini /var/log/syslog. V
- primeru, da se v syslogu pojavi niz "zmeda", naj program izpiše "imam ga".
- Poleg tega naj program med sledenjem syslog-u odšteva od 5 do 1 (vsako sekundo
- naj se izpiše naslednja številka. Program naj bo v /home/student/syslog_ukaz.sh
- - Namesti paket "cowsay" in ga preizkusi :)
- - S pomočjo programa cURL preštej število pojavitev niza "images" v html kodi,
- ki jo dobiš na naslovu http://localhost/{curl_fname} na malishell in število zapiši
- v spremenljivko $images na simpleArbiterDhcpGW v lupini, kjer poganjaš
- task_check.py
- - V imeniku {wc_dirname} najdeš datoteko count.txt. Preštej število prehodov
- v novo vrstico v count.txt in rezultat zapiši v novo datoteko - lines.txt
- v istem imeniku.
-""",
- 'en':"""
-Log into the system as student using vaje as your password.
-In your home folder you will find a directory called {file_rename_dirname}
- containing 20 files.
- - Rename all files in that directory replacing all dashes with
- underscores
- - Find the shortest command for copying all the files located in
- {mv_src_dir} into the folder {mv_dst_dir}.
- Create a shell script /home/student/mv_ukaz containing this command.
- Before running test_task, make sure {mv_src_dir} contains the same
- files as when you downloaded your virtual disk. This probably means
- that you will have to move the files back from {mv_dst_dir} to
- {mv_src_dir} after each test. You can use the directory na
- - Come up with a command or sequence of commands in bash which will,
- using grep, write the names all normal (not hidden) files which contain
- the string "mama" and are located in the working directory (pwd)
- into the file ~/mama.txt while writing errors such as files in current
- directory being folders or symbolic links in the file called
- "napake.txt". Write this command to mama_ukaz.
- - Write a program (which may be a shell script) that will track the contents
- of /var/log/syslog for 5s. Every time an entry containing the string "zmeda"
- appears in the syslog, the script should output "imam ga".
- In addition, the script should count down from 5 to 1 with a 1 second
- interval. Store the script in /home/student/syslog_ukaz.sh .
- - Install the packet "cowsay" and test it :)
- - With the help of cURL count the number of occurences of the string
- "images" on the web page accessible from malishell at
- http://localhost/{curl_fname}.
- On simpleArbiterDhcpGW within the shell where you are running test_task.py, set
- the environment variable $images to this number.
- - In the directory {wc_dirname} there is a file called count.txt. Write the
- number of newlines in this file into the file lines.txt in the same
- directory.
-"""
+ 'si': '''\
+student
z geslom vaje
.
+
+{{file_rename_dirname}}
z 20 datotekami. Preimenuj vse datoteke tako, da zamenjaš minuse s podčrtaji.
+
+bash
, ki vse datoteke iz imenika {{mv_src_dir}}
premakne v imenik {{mv_dst_dir}}
. Ukaz spravi v /home/student/mv_ukaz
. Pazite, da bodo ob testiranju v izvornem imeniku iste datoteke, kot so bile, ko je bila virtualka nova, ciljni imenik pa bo prazen. To pomeni, da boste verjetno morali po vsakem testiranju datoteke premakniti nazaj. Za krajšanje ukaza lahko izkoristite imeni imenikov.
+
+grep
v datoteko ~/mama.txt
izpiše imena vseh navadnih (ne skritih) datotek v trenutnem imeniku, ki vsebujejo niz mama
, v datoteko ~/napake.txt
pa izpiše vse morebitne napake (npr. to, da so nekateri objekti v trenutnem imeniku dejansko imeniki ali napačne simbolične povezave). Ukaz spravite v datoteko /home/student/mama_ukaz
.
+
+bash
), ki bo pet sekund sledil vsebini /var/log/syslog
. V primeru, da se v syslogu pojavi niz zmeda
, naj program izpiše imam ga
. Poleg tega naj program med sledenjem syslog-u odšteva od 5 do 1 (vsako sekundo naj se izpiše naslednja številka). Program naj bo v /home/student/syslog_ukaz.sh
.
+
+cowsay
in ga preizkusi. 😊
+
+curl
preštej število pojavitev niza images
v spletni strani, ki jo dobiš na naslovu http://localhost/{{curl_fname}}
na malishell in število zapiši v spremenljivko $images
na simpleArbiterDhcpGW v lupini, kjer poganjaš task_check.py
.
+
+{{wc_dirname}}
najdeš datoteko count.txt
. Preštej število prehodov v novo vrstico v count.txt
in rezultat zapiši v novo datoteko lines.txt
v istem imeniku.
+''',
+ 'en': '''\
+student
using vaje
as your password.
+
+{{file_rename_dirname}}
containing 20 files. Rename all files in that directory replacing all dashes with underscores
+
+{{mv_src_dir}}
into the folder {{mv_dst_dir}}
. Create a shell script /home/student/mv_ukaz
containing this command. Before running test_task.py
, make sure {{mv_src_dir}}
contains the same files as when you downloaded your virtual disk. This probably means that you will have to move the files back from {{mv_dst_dir}}
to {{mv_src_dir}}
after each test.
+
+grep
, write the names all normal (not hidden) files which contain the string mama
and are located in the working directory (pwd
) into the file ~/mama.txt
while writing errors such as files in current directory being folders or symbolic links in the file called napake.txt
. Write this command to /home/student/mama_ukaz
.
+
+/var/log/syslog
for five seconds. Every time an entry containing the string zmeda
appears in the syslog, the script should output imam ga
. In addition, the script should count down from 5 to 1 with a one-second interval. Store the script in /home/student/syslog_ukaz.sh
.
+
+cowsay
and test it. 😊
+
+curl
command count the number of occurences of the string images
on the web page accessible from malishell at http://localhost/{{curl_fname}}
. On simpleArbiterDhcpGW within the shell where you are running test_task.py
, set the environment variable $images
to this number.
+
+{{wc_dirname}}
there is a file called count.txt
. Write the number of newlines in this file into the file lines.txt
in the same directory.
+''',
}
computers = {
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': '''\
+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': '''\
+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 = {
diff --git a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
index fb0de84..4822c2a 100644
--- a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
+++ b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
@@ -2,7 +2,7 @@
instructions = {
'si':"""
-Ustvari tri navidezne računalnike. Za enega (SimpleArbiter) uporabi sliko diska simpleArbiter. Na drugega (DHCP_server) postavi strežnika DHCP in DNS in poskrbi, da ta računalnik dobi IP naslov {IP_server}. Poskrbi, da bo preostali računalnik (DHCP_client) dobil naslov {IP_client}, ki mu ga določi DHCP strežnik. Poskrbi še,da DNS strežnik vrne za hostname {HOSTNAME_X} IP naslov {IP_X}.
+Ustvari tri navidezne računalnike. Za enega (SimpleArbiter) uporabi sliko diska simpleArbiter. Na drugega (DHCP_server) postavi strežnika DHCP in DNS in poskrbi, da ta računalnik dobi IP naslov {IP_server}. Poskrbi, da bo preostali računalnik (DHCP_client) dobil naslov {IP_client}, ki mu ga določi DHCP strežnik. Poskrbi še,da DNS strežnik vrne za hostname {HOSTNAME_X} IP naslov {IP_X}.
"""
}
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 7a96a0b..48b713b 100644
--- a/kpov_judge/tasks/edit_find_grep_compile_convert/task.py
+++ b/kpov_judge/tasks/edit_find_grep_compile_convert/task.py
@@ -5,54 +5,43 @@
# - switch to a real SSH/SFTP client to properly handle filenames
instructions = {
- 'si':"""
-Ustvari dva navidezna računalnika s slikama diskov
-- SimpleArbiter s sliko diska simpleArbiterDhcp in
-SmallStudent s sliko diska student-entrance2.
+ 'si': '''\
+{{testip}}
.
-Poskrbi, da bo SmallStudent s SimpleArbiter dostopen na naslovu {testip}.
+{{testuser}}
z geslom {{passwd}}
.
-Na SmallStudent ustvari uporabnika {testuser} z geslom {passwd}.
+bilbo
skrita datoteka, ki vsebuje niz {{magicstr}}
. Skopiraj jo v domači imenik uporabnika {{testuser}}
in jo poimenuj {{dstfile}}
. Poskrbi, da bo lastnik {{testuser}}
, skupina pa naj bo enaka kot pri izvorni datoteki. Brati naj jo ima pravico samo lastnik, pisati lastnik in skupina, poganjati nihče.
-Na SmallStudent je nekje v domačem imeniku uporabnika "bilbo" skrita datoteka, ki vsebuje niz {magicstr}.
-Skopiraj jo v domači imenik {testuser} in poimenuj {dstfile}.
-Poskrbi, da bo lastnik {testuser}, skupina pa naj ostane nespremenjena.
-Brati naj jo ima pravico samo lastnik, pisati lastnik in skupina, poganjati nihče.
-V {dstfile} zamenjaj vse vrstice oblike poXYZlz, kjer so XYZ poljubni znaki, tako, da bo namesto XYZ niz "kaka".
+{{dstfile}}
zamenjaj vse vrstice oblike poXYZlz
, kjer je XYZ
poljubno zaporedje znakov, 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 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}.
-""",
- 'en': '''
-Create two virtual machines
-- SimpleArbiter using simpleArbiterDhcp as the disk image and
-SmallStudent using student-entrance2 as its disk.
+ta
. Če je B-ti bit nastavljen na 0, naj program izpiše ti
. Program poimenuj {{progname}}
in ga spravi v domači imenik uporabnika {{testuser}}
.
+''',
+ 'en': '''\
+{{testip}}
.
-Make sure that SmallStudent is accessible from SimpleArbiter on IP {testip}.
+{{testuser}}
with the password {{passwd}}
on SmallStudent.
-Create a user {testuser} with the password {passwd} on SmallStudent.
+{{magicstr}}
hidden somewhere in the home directory of user bilbo
. Copy it into {{testuser}}
’s home directory and name it {{dstfile}}
. Change the owner to {{testuser}}
and ensure the group is the same as for the original file. 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 nobody has the right to execute it.
-There is a file containing {magicstr} hidden somewhere in the home directory of
-user "bilbo".
-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".
+{{dstfile}}
, replace all lines of the form poXYZlz
where XYZ
are arbitrary characters so that XYZ
is replaced by kaka
.
-Write a program in any programming language.
-The program should accept a single argument, B, which is a number between 0 and 7.
-It should read a character from standard input and output "ta" if B-th bit in this character is
-set to 1. If B-th bit is not set, the program should output "ti".
-Name the program {progname} and place it in the home directory of {testuser}.
+ta
if B-th bit in this character is set to 1, and ti
. If B-th bit is set to 0. Name the program {{progname}}
and place it in the home directory of {{testuser}}
.
''',
}
diff --git a/kpov_judge/tasks/isc_dhcp_live_boot/task.py b/kpov_judge/tasks/isc_dhcp_live_boot/task.py
index 38bbcd8..c1adc47 100644
--- a/kpov_judge/tasks/isc_dhcp_live_boot/task.py
+++ b/kpov_judge/tasks/isc_dhcp_live_boot/task.py
@@ -2,44 +2,40 @@
# kpov_util should be imported by add_assignment.py
instructions = {
- 'si':"""
-Postavi štiri navidezne računalnike - simpleArbiter, DHCP_server,
-BootableClientA ter BootableClientB.
-
-Na DHCP_server postavi DHCP strežnik s pomočjo ISC dhcp 3 na naslovu {IP_DHCP}.
-SimpleArbiter naj dobi {IP_GW}. DHCP_server naj ga uporabi kot gateway.
-
-Če se zaganja BootableClientB, naj se sistem zažene v datoteko z imenom {BOOT_FNAME}.
-Če se zaganja katerikoli drug, naj se sistem zažene z živega USB, ki ga predstavlja
-slika diska bootable_usb, ime datoteke z zagonskim nalagalnikom pa naj bo
-kakršno koli razen {BOOT_FNAME}.
-
-Živi USB priklopite na na DHCP_server ter z njega poberite datoteke, potrebne za zagon.
-Datoteke z nastavitvami za PXELinux, ki jih najdete na živem USB,
-MORAJO biti dostopne na korenskem imeniku strežnika TFTP.
-
-Tako BootableClientA kot BootableClientB naj bosta brez diskov.
-""",
- # TODO: write a proper translation. The one that used to be here was just wrong.
- 'en': """Set up 4 virtual computers - simpleArbiter, DHCP_server,
-BootableClientA and BootableClientB.
-
-On DHCP_server, set up a DHCP server using ISC dhcp 3. Set the IP address of
-this server to {IP_DHCP}. If SimpleArbiter requests an IP, have the DHCP server
-serve it {IP_GW}. DHCP_server should use SimpleArbiter as it's gateway.
-
-If BootableClientB tries to boot over the network, have the DHCP server tell it
-to boot from the file {BOOT_FNAME}. If any other system tries to boot over the
-network, have it boot from a live USB drive represented by the disk image
-bootable_usb and have the bootloader filename be different from {BOOT_FNAME}.
-
-Connect the live USB to DHCP_server and copy the files neccessarry for it to
-boot. The PXELinux configuration files must be the same as the ones found on
-the live USB and MUST be accessible on the TFTP server root.
-
-Both BootableCLientA and BootableClientB should be diskless.
-"""
+ 'si': '''\
+{{IP_DHCP}}
. SimpleArbiter naj dobi {{IP_GW}}
. DHCP_server naj ga uporabi kot privzeti prehod (angl. gateway).
+
+{{BOOT_FNAME}}
. Če se zaganja katerikoli drug, naj se sistem zažene z živega USB, ki ga predstavlja slika diska bootable_usb
, ime datoteke z zagonskim nalagalnikom pa naj bo kakršno koli razen {{BOOT_FNAME}}
.
+
+{{IP_DHCP}}
. If SimpleArbiter requests an IP, have the DHCP server serve it {{IP_GW}}
. DHCP_server should use SimpleArbiter as the gateway.
+
+{{BOOT_FNAME}}
. If any other system tries to boot over the network, have it boot from a live USB drive represented by the disk image bootable_usb
and have the bootloader filename be different from {{BOOT_FNAME}}
.
+
+Ustvari dva navidezna računalnika - SimpleArbiter z diskom simpleArbiterDhcp ter LDAPServer.
Na LDAPServer namesti strežnik LDAP. Na SimpleArbiter preberi ime domene DOMENA,
uporabniško ime BIND_DN ter geslo BIND_PASS. Poskrbi, da se bo lahko klient s simpleArbiterDhcp povezal na LDAP strežnik na LDAPServer.
V primeru, da se klient poveže kot BIND_DN z geslom BIND_PASS, naj strežnik omogoči branje vseh podatkov za objekte v
DC=DOMENA,DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si. Nato na LDAP strežniku poišči datoteko /home/test/users.txt. Vsaka vrstica
v datoteki vsebuje uporabniško ime, ime ter priimek, ločene s tabulatorji. V bazi LDAP
-pod DC=DOMENA,DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si za vsako vrstico v users.txt ustvari svojega uporabnika.
-
+pod DC=DOMENA,DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si za vsako vrstico v users.txt ustvari svojega uporabnika.
"""
}
diff --git a/kpov_judge/tasks/ldap_search/task.py b/kpov_judge/tasks/ldap_search/task.py
index 92a7223..485a2ae 100644
--- a/kpov_judge/tasks/ldap_search/task.py
+++ b/kpov_judge/tasks/ldap_search/task.py
@@ -5,59 +5,84 @@
# TODO: finish this!
instructions = {
- 'si':"""
-Ustvari dva navidezna računalnika - SimpleArbiter z diskom simpleArbiterDhcp
-ter LDAPServer.
+ 'si': '''\
+
-z geslom {LDAP_PASSWORD} in uporabnika
-CN={BIND_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-z geslom {BIND_PASSWORD}
+DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
{{LDAP_PASSWORD}}
in uporabnika
+
+
+
+CN={{BIND_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
{{BIND_PASSWORD}}
.
+
+{{BIND_USERNAME}}
z geslom {{BIND_PASSWORD}}
,
naj strežnik omogoči spreminjanje podatkov za objekt
-CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-ter ustvarjanje novih objektov v DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+
+
+CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+''',
+ 'en': '''\
+DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
CN = Common Name
O = Organization
OU = Organizational Unit
DC = Domain Component
-""",
- 'en': """
-Create two virtual machines - SimpleArbiter using the disk simpleArbiterDhcp
-and LDAPServer.
+
+
+DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
{{LDAP_PASSWORD}}
, and a user
+
+
-with the password {LDAP_PASSWORD} .
+CN={{BIND_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
{{LDAP_PASSWORD}}
.
-Make sure that a client from simpleArbiterDhcp can connect to the LDAP server on
-LDAPServer. If the client identifies themself as {BIND_USERNAME} with the password
-{BIND_PASSWORD}, allow it to change data for the object
+{{BIND_USERNAME}}
with the password {{BIND_PASSWORD}}
, allow it to change data for the object
-CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-and to create objects in DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+
+CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+''',
}
computers = {
diff --git a/kpov_judge/tasks/mock_entrance_exam/task.py b/kpov_judge/tasks/mock_entrance_exam/task.py
index 906df97..84dff82 100644
--- a/kpov_judge/tasks/mock_entrance_exam/task.py
+++ b/kpov_judge/tasks/mock_entrance_exam/task.py
@@ -5,45 +5,50 @@
# - switch to a real SSH/SFTP client to properly handle filenames
instructions = {
- 'si': '''
-Postavite dva navidezna računalnika - SimpleArbiter in Student.
-Oba naj bosta povezana na internet. Poleg tega mora biti
-Student na naslovu {student_IP} dostopen s SimpleArbiter.
+ 'si': '''\
+DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
CN = Common Name
O = Organization
OU = Organizational Unit
DC = Domain Component
-
-"""
+
student
obstaja program {{P_c}}
v programskem jeziku C.
+Prevedite ga v program z imenom {{P_executable}}
. Izvorna koda je namenoma pokvarjena tako, da so vanjo vrinjeni nepotrebni znaki. Pred prevajanjem jo morate popraviti.
-Napišite skripto ali program {P_script} v domačem imeniku uporabnika student, ki:
-- požene {P_executable} z argumentom "{arg_c}" in mu na standardni vhod pripelje vrednost spremenljivke {env_c}
-- vse, kar {P_executable} izpiše na stderr, spravi v datoteko {out_stderr_c}.
-- vse vrstice, ki jih {P_executable} izpiše na stdout in vsebujejo zaporedje znakov "ma", zapiše v {out_stdout_c}.
+{{P_script}}
v domačem imeniku uporabnika student
, ki:
-Lastnik vseh ustvarjenih datotek mora biti uporabnik student.
-Gesla uporabnika student (vaje) ne smete spreminjati.''',
- 'en': '''Set up two virtual machines - SimpleArbiter and Student.
-Both should be connected to the Internet. Student should also be accessible
-from SimpleArbiter at the address {student_IP}.
+
+
-Keep in mind that a program called {net_prog_name} starts on Student
-whenever Student boots. This program may change your network settings.
+{{P_executable}}
z argumentom "{{arg_c}}"
in mu na standardni vhod pripelje vrednost spremenljivke {{env_c}}
;
+{{P_executable}}
izpiše na stderr, spravi v datoteko {{out_stderr_c}}
; in
+{{P_executable}}
izpiše na stdout in vsebujejo zaporedje znakov ma
, zapiše v {{out_stdout_c}}
.
+student
. Gesla uporabnika student
(vaje
) ne smete spreminjati.
+''',
+ 'en': '''\
+{{student_IP}}
.
+
+{{net_prog_name}}
starts on Student on each boot. This program may change your network settings.
+
+{{P_c}}
in student
’s home directory. Compile it into a program called {{P_executable}}
. The source code is intentionally broken so that unneccessarry characters are inserted into the file. You have to fix the file before compiling.
-There is a program called {P_c} in the home directory of student. Compile it
-into a program called {P_executable}. The source code is intentionally broken
-so that unneccessarry characters are inserted into the file. You have to fix
-the file before compiling.
+{{P_script}}
in student
’s home directory. The script should:
-Also, write a script or program called {P_script} in the home directory of student.
-The script should:
-- run {P_executable} with the argument {arg_c} and pipe the value of the environment variable {env_c} into {P_executable}'s standard input.
-- redirect stderr of {P_executable} into a file called {out_stderr_c}.
-- save each line which {P_executable} outputs and which contains the character sequence "ma" into {out_stdout_c}.
+
+
-The owner of all created files should be student. You are not allowed to change student's password (vaje).
+{{P_executable}}
with the argument {{arg_c}}
and pipe the value of the environment variable {{env_c}}
into {{P_executable}}
’s standard input;
+{{P_executable}}
into a file called {{out_stderr_c}}
; and
+{{P_executable}}
outputs and which contains the character sequence ma
into {{out_stdout_c}}
.
+student
. You are not allowed to change student
’s password (vaje
).
''',
}
diff --git a/kpov_judge/tasks/nat_port_forward/task.py b/kpov_judge/tasks/nat_port_forward/task.py
index 8fe28d7..80d2e47 100644
--- a/kpov_judge/tasks/nat_port_forward/task.py
+++ b/kpov_judge/tasks/nat_port_forward/task.py
@@ -2,13 +2,12 @@
instructions = {
'si':"""
-Postavi tri računalnike - SimpleArbiter z diska simpleArbiter, TestClient z diska testClient in NATServer. NATServer naj ima dva omrežna vmesnika - z enim naj bo
+Postavi tri računalnike - SimpleArbiter z diska simpleArbiter, TestClient z diska testClient in NATServer. NATServer naj ima dva omrežna vmesnika - z enim naj bo
povezan na omrežje, od koder bo imel dostop do Interneta, z drugim pa na SimpleArbiter. TestClient naj bo povezan na isto omrežje z dostopom do Interneta kot NATServer.
Poskrbi, da bo NATServer služil kot DHCP strežnik ter privzeti prehod za SimpleArbiter.
Na SimpleArbiter preberi vrednosti NET, PORT_OUTER in PORT_INNER ter vpiši IP_TEST_CLIENT. Poskrbi, da
bo omrežje med SimpleArbiter in NATServer na področju NET. Nato poskrbi, da se
-bo TCP promet z omrežja z dostopom do Interneta na vrata PORT_OUTER prepošiljal na SimpleArbiter na vrata PORT_INNER.
-"""
+bo TCP promet z omrežja z dostopom do Interneta na vrata PORT_OUTER prepošiljal na SimpleArbiter na vrata PORT_INNER.
"""
}
computers = {
diff --git a/kpov_judge/tasks/nat_vlc/task.py b/kpov_judge/tasks/nat_vlc/task.py
index ffcb6c1..5224495 100644
--- a/kpov_judge/tasks/nat_vlc/task.py
+++ b/kpov_judge/tasks/nat_vlc/task.py
@@ -7,29 +7,29 @@
#TODO: finish this
instructions = {
- 'si':"""
-Postavi dva navidezna računalnika - SimpleArbiter z diskom simpleArbiter
-ter NATServer. NATServer naj ima dva omrežna vmesnika - z enim naj bo povezan
-na lokalno omrežje, na katerem naj bo tudi simpleArbiter, z drugim pa na
-Internet. Na NATServer skonfiguriraj omrežne vmesnike tako, da bo imel dostop
-do Interneta in da bo imel na lokalnem omrežju {IP_NAT}. Na NATServer
-ustvarite še uporabnika {IP_NAT_user}.
-
-Poskrbi, da bo SimpleArbiter prek DHCP dobil naslov {IP_simple}.
-Poskrbi, da bo NATServer deloval kot prehod za SimpleArbiter in izvajal NAT.
-""",
- 'en':"""
-Set up two virtual machines - SimpleArbiter (using the disc simpleArbiter) and
-NATServer. NATServer should have two network adapters. Connect the first
-adapter to SimpleArbiter and the second adapter to the Internet. Configure the
-network in NATServer so that one interface is connected to the Internet while
-the other is connected to SimpleArbiter and has the address {IP_NAT}. Create
-a user called {IP_NAT_user} on NATServer.
-
-Configure a DHCP server on NATServer so that SimpleArbiter gets the IP
-{IP_simple}. Also, set up NAT on NATServer and set it as the gateway for
-SimpleArbiter.
-"""
+ 'si': '''\
+{{IP_NAT}}
. Na NATServer ustvarite še uporabnika {{IP_NAT_user}}
.
+
+{{IP_simple}}
. Poskrbi, da bo NATServer deloval kot prehod za SimpleArbiter in izvajal NAT.
+''',
+ 'en': '''\
+{{IP_NAT}}
. Create a user called {{IP_NAT_user}}
on NATServer.
+
+{{IP_simple}}
. Also, set up NAT on NATServer and set it as the gateway for SimpleArbiter.
+''',
}
computers = {
diff --git a/kpov_judge/tasks/network_boot_custom_program/task.py b/kpov_judge/tasks/network_boot_custom_program/task.py
index e81939f..e3fbad2 100644
--- a/kpov_judge/tasks/network_boot_custom_program/task.py
+++ b/kpov_judge/tasks/network_boot_custom_program/task.py
@@ -2,12 +2,12 @@
instructions = {
'si':"""
-Postavi tri navidezne računalnike - simpleArbiter, DHCP_server, DHCP_client.
+Postavi tri navidezne računalnike - simpleArbiter, DHCP_server, DHCP_client.
Na računalniku DHCP_server najdeš program A. DHCP_server nastavi tako, da se bo
DHCP_client lahko zagnal prek mreže. Na datotečni sistem, s katerega
se zaganja DHCP_client, spravi program A. Poskrbi, da se A požene ob zagonu DHCP_client.
-DHCP_client ne sme imeti priklopljenega nobenega trdega diska.
+DHCP_client ne sme imeti priklopljenega nobenega trdega diska.
"""
}
diff --git a/kpov_judge/tasks/openvpn_multiple_hops/task.py b/kpov_judge/tasks/openvpn_multiple_hops/task.py
index 230393d..44ad8c4 100644
--- a/kpov_judge/tasks/openvpn_multiple_hops/task.py
+++ b/kpov_judge/tasks/openvpn_multiple_hops/task.py
@@ -2,13 +2,13 @@
instructions = {
'si':"""
-Postavi 4 navidezne računalnike - SimpleArbiter z diska simpleArbiterDhcp, A, B ter C.
+Postavi 4 navidezne računalnike - SimpleArbiter z diska simpleArbiterDhcp, A, B ter C.
Na računalnikih A, B in C ustvari uporabnika test z geslom test.
Poskrbi, da bodo vsi štirje na istem navideznem fizičnem omrežju. Naslov omrežja (NET_PHYS) ter naslove
(IP_A, IP_B, IP_C) preberi na SimpleArbiter. S pomočjo OpenVPN postavi navidezno omrežje med A in B na naslovih NET_VPN1.
Nato s pomočjo OpenVPN postavi še navidezno omrežje med B in C na naslovih NET_VPN2.
Poskrbi, da bo promet z A prek VPN prišel do C in obratno. Za avtentikacijo uporabi skupne skrivnosti, ki
-jih prebereš na SimpleArbiter - med A in B SECRET_AB ter med B in C SECRET_BC.
+jih prebereš na SimpleArbiter - med A in B SECRET_AB ter med B in C SECRET_BC.
"""
}
diff --git a/kpov_judge/tasks/openvpn_simple_smb/task.py b/kpov_judge/tasks/openvpn_simple_smb/task.py
index d4bb510..dbc835c 100644
--- a/kpov_judge/tasks/openvpn_simple_smb/task.py
+++ b/kpov_judge/tasks/openvpn_simple_smb/task.py
@@ -1,40 +1,33 @@
# kpov_util should be imported by add_assignment.py
instructions = {
- 'si':"""
-Postavi dva navidezna računalnika - SimpleArbiter z diska SimpleArbiterVPN ter
-VPNClient1. Poskrbite, da bosta povezana med seboj in v Internet.
-Na VPNClient1 namestite OpenVPN in program za nadzor nad virtualnimi napravami
-(s katerim kreirate napravo tap).
+ 'si': '''\
+tap
).
-Na strežniku SimpleArbiterVPN že teče VPN strežnik in uporablja skrivnost,
-ki jo najdete tudi na VPNClient1 v domačem imeniku uporabnika student.
-Na VPNClient1 vzpostavite VPN tako, da napišete primerno datoteko z
-nastavitvami. VPNClient1 na navideznem lokalnem omrežju nastavite naslov
-{IP_VPNClient1}
+student
. Na VPNClient1 vzpostavite VPN tako, da napišete primerno datoteko z nastavitvami. Računalniku VPNClient1 na navideznem lokalnem omrežju nastavite naslov
+{{IP_VPNClient1}}
.
-Nato poskrbite, da bo na VPNClient1 na navideznem omrežju prek NFS omogočen
-dostop do imenika /home/test/{DIRNAME}.
-V ta imenik skopirajte datoteke, ki so prek SMB dostopne na SimpleArbiter.
-""",
- 'en':"""
-Setup two virtual machines - SimpleArbiterVPN and a VPN client (VPNClient1).
-Set the client's network up so that it has access to the internal network and
-the internet.
-On VPNClient1, install OpenVPN and a program for supervising virtual devices
-(which you will use to create a tap device). On the VPN, set the IP for
-VPNClient1 to {IP_VPNClient1}.
+/home/test/{{DIRNAME}}
. V ta imenik skopirajte datoteke, ki so prek SMB dostopne na SimpleArbiter.
+''',
+ 'en': '''\
+tap
device). On the VPN, set the IP for
+VPNClient1 to {{IP_VPNClient1}}
.
-An OpenVPN server is already running on SimpleArbiterVPN. Use the secret
-available on VPNClient1 in the home directory of user student to connect to
-the VPN server on SimpleArbiterVPN. To do that, you will have to write your
-own OpenVPN configuration file.
+student
to connect to the VPN server on SimpleArbiter. To do that, you will have to write your
+own OpenVPN configuration file.
-After you have set up the VPN, make the directory
-/home/test/{DIRNAME} on VPNClient1 available over NFS from SimpleArbiter over
-your VPN. Copy files that are available from SimpleArbiter over SMB to
-/home/test/{DIRNAME}.
-"""
+/home/test/{{DIRNAME}}
on VPNClient1 available over NFS from SimpleArbiter over
+your VPN. Copy files that are available from SimpleArbiter over SMB to /home/test/{{DIRNAME}}
.
+'''
}
computers = {
diff --git a/kpov_judge/tasks/openwrt/task.py b/kpov_judge/tasks/openwrt/task.py
index ed2783a..8872989 100644
--- a/kpov_judge/tasks/openwrt/task.py
+++ b/kpov_judge/tasks/openwrt/task.py
@@ -2,11 +2,11 @@
instructions = {
'si':"""
-Postavi dva navidezna računalnika - simpleArbiter z diska SimpleArbiter ter
+Postavi dva navidezna računalnika - simpleArbiter z diska SimpleArbiter ter
OpenWRT z diska OpenWRT. Na disku OpenWRT je nameščena distribucija OpenWRT.
Nastavi OpenWRT tako, da bo imel dva omrežna vmesnika - en naj bo povezan na Internet,
drugo na omrežje, na katerem bo SimpleArbiter. Na SimpleArbiter preberi naslov omrežja
-med OpenWrt in SimpleArbiter ter njuna naslova.
+med OpenWrt in SimpleArbiter ter njuna naslova.
"""
}
diff --git a/kpov_judge/tasks/public_ip_ssh/task.py b/kpov_judge/tasks/public_ip_ssh/task.py
index 561a1fa..8dcb858 100644
--- a/kpov_judge/tasks/public_ip_ssh/task.py
+++ b/kpov_judge/tasks/public_ip_ssh/task.py
@@ -2,10 +2,10 @@
instructions = {
'si':"""
-Ustvari dva navidezna računalnika. Za disk enega (imenujmo ga SimpleArbiter) uporabite
+Ustvari dva navidezna računalnika. Za disk enega (imenujmo ga SimpleArbiter) uporabite
sliko diska Test. Na drugega (imenujmo ga A) namesti poljubno Linux distribucijo. Na SimpleArbiter
preberi uporabniško ime in geslo uporabnika, ki ga moraš ustvariti na A. Poskrbi, da se bo novoustvarjeni
-uporabnik s svojim geslom lahko na A prijavil z Interneta.
+uporabnik s svojim geslom lahko na A prijavil z Interneta.
"""
}
diff --git a/kpov_judge/tasks/public_ssh_motd_http/task.py b/kpov_judge/tasks/public_ssh_motd_http/task.py
index 227425a..bd48d77 100644
--- a/kpov_judge/tasks/public_ssh_motd_http/task.py
+++ b/kpov_judge/tasks/public_ssh_motd_http/task.py
@@ -2,11 +2,11 @@
instructions = {
'si':"""
-Na internet postavi računalnik, ki bo dostopen prek ssh in http.
+Na internet postavi računalnik, ki bo dostopen prek ssh in http.
Poskrbi, da bo na računalniku ustvarjen uporabnik test z geslom test. Ob prijavi naj se
uporabniku v MOTD izpiše (le) zgodbica ali pesmica, ki vam je všeč, dolžine vsaj 50 znakov.
Ista zgodbica ali pesmica naj se na strežniku izpiše, če se na strežnik kdorkoli poveže prek
-http.
+http.
"""
}
diff --git a/kpov_judge/tasks/radius_multiple_realms/task.py b/kpov_judge/tasks/radius_multiple_realms/task.py
index 773a3f2..0067f46 100644
--- a/kpov_judge/tasks/radius_multiple_realms/task.py
+++ b/kpov_judge/tasks/radius_multiple_realms/task.py
@@ -2,7 +2,7 @@
instructions = {
'si':"""
-Postavi tri navidezne računalnike - SimpleArbiter z diska simpleArbiterDhcp,
+Postavi tri navidezne računalnike - SimpleArbiter z diska simpleArbiterDhcp,
RadiusA ter RadiusB. Na simpleArbiterDhcp preberi imeni domen DOMENA_A ter DOMENA_B,
uporabniški imeni USER_A in USER_B, gesli PASSWORD_A in PASSWORD_B ter skrivnosti
SECRET_A in SECRET_B. Poskrbi, da se bo lahko radius klient s SimpleArbiter povezal
@@ -12,7 +12,7 @@ na RadiusB uporabnik USER_B z geslom PASSWORD_B.
Poskrbi, da bo strežnik RadiusA odgovarjal na zahtevke za avtentikacijo uporabnikov na domeni DOMENA_A,
zahtevke za uporabnike na domeni DOMENA_B pa bo preposlal naprej na RadiusB. RadiusB naj odgovarja na
-zahtevke za uporabnike na domeni DOMENA_B, zahtevke za uporabnike na DOMENA_A pa naj preprosto zavrže.
+zahtevke za uporabnike na domeni DOMENA_B, zahtevke za uporabnike na DOMENA_A pa naj preprosto zavrže.
"""
}
diff --git a/kpov_judge/tasks/radius_mysql_pam/task.py b/kpov_judge/tasks/radius_mysql_pam/task.py
index 72b5a74..5051bb4 100644
--- a/kpov_judge/tasks/radius_mysql_pam/task.py
+++ b/kpov_judge/tasks/radius_mysql_pam/task.py
@@ -1,52 +1,47 @@
# kpov_util should be imported by add_assignment.py
instructions = {
- 'si':"""
-Ustvari dva navidezna računalnika - SimpleArbiter z diska simpleArbiterDhcp ter
-RadiusServer. Na RadiusServer namesti FreeRadius ter MySQL.
+ 'si': '''\
+{{MYSQL_DB_NAME}}
. Ustvari uporabnika za MySQL z imenom {{MYSQL_ADMIN_USER}}
in geslom {{MYSQL_ADMIN_PASSWORD}}
, ki naj ima poln dostop do te baze. Prijava za tega uporabnika mora biti omogočena tudi s SimpleArbiter.
-Nastavi FreeRadius tako, da bo podatke o uporabnikih in geslih pobiral iz baze
-MySQL z imenom {MYSQL_DB_NAME}. Podatkovna shema (imena tabel) naj ostane
+{{MYSQL_DB_NAME}}
. Podatkovna shema (imena tabel) naj ostane
privzeta.
-Dostop do strežnika Radius na RadiusServer s SimpleArbiter naj bo mogoč ob
-uporabi skrivnosti {RADIUS_SECRET}.
+{{RADIUS_SECRET}}
.
-V bazi ustvari vnos, ki bo omogočil, da se na RadiusServer s pomočjo protokola
-Radius avtenticira uporabnik {RADIUS_USERNAME} z geslom {RADIUS_PASSWORD}.
+{{RADIUS_USERNAME}}
z geslom {{RADIUS_PASSWORD}}
.
-Nastavi PAM za prijavo (login) tako, da bo dovolj, če se uporabnik na ssh
-predstavi z uporabniškim imenom in geslom, ki sta veljavna na FreeRadius,
-ne glede na /etc/shadow oziroma /etc/password.
-""",
- 'en':"""
-Create two virtual machines - SimpleArbiter using the disk simpleArbiterDhcp
-and RadiusServer. On RadiusServer, install FreeRadius and MySQL.
+/etc/shadow
oziroma /etc/password
.
+''',
+ 'en': '''\
+{{MYSQL_DB_NAME}}
. Create a mysql user with the username {{MYSQL_ADMIN_USER}}
and password {{MYSQL_ADMIN_PASSWORD}}
. Make sure this user can access the database from SimpleArbiter and has administrative rights over the {{MYSQL_DB_NAME}}
database.
-Set up FreeRadius so that the data about users and passwords is stored in the
-MySQL database. Keep the default schema (table names).
+{{RADIUS_SECRET}}
as the secret.
-Create an entry in the database which will enable a user with the username
-{RADIUS_USERNAME} to authenticate themself against the Radius server using
-the password {RADIUS_PASSWORD}.
+{{RADIUS_USERNAME}}
to authenticate themself against the Radius server using the password {{RADIUS_PASSWORD}}
.
-Set up PAM to enable login over ssh using a username and password which are
-valida on the FreeRadius server, regardless of the entries in /etc/shadow
-and/or /etc/password.
-"""
+/etc/shadow
+and/or /etc/password
.
+''',
}
#KABOOM
diff --git a/kpov_judge/tasks/rdate_64bit/task.py b/kpov_judge/tasks/rdate_64bit/task.py
index b08cddc..9f90014 100644
--- a/kpov_judge/tasks/rdate_64bit/task.py
+++ b/kpov_judge/tasks/rdate_64bit/task.py
@@ -2,12 +2,12 @@
instructions = {
'si':"""
-Postavi dva navidezna računalnika - SimpleArbiter z diska simpleArbiterDhcp ter
+Postavi dva navidezna računalnika - SimpleArbiter z diska simpleArbiterDhcp ter
RdateServer. Na RdateServer postavi strežnik, ki bo poslušal na vratih VRATA_X.
Vsakič, ko se na vrata poveže klient, naj strežnik pošlje število sekund od DATUM_X.
Število naj bo kodirano kot 64-bitno predznačeno število s tankim koncem.
-VRATA_X in DATUM_X preberi na SimpleArbiter.
+VRATA_X in DATUM_X preberi na SimpleArbiter.
"""
}
diff --git a/kpov_judge/tasks/rename_grep_network/task.py b/kpov_judge/tasks/rename_grep_network/task.py
index 4f8f1ad..4d81313 100644
--- a/kpov_judge/tasks/rename_grep_network/task.py
+++ b/kpov_judge/tasks/rename_grep_network/task.py
@@ -6,7 +6,7 @@
instructions = {
'si': """
-Ustvari dva navidezna računalnika s slikama diskov
+Ustvari dva navidezna računalnika s slikama diskov
- SimpleArbiterExam s sliko diska simpleArbiterDhcp in
SmallStudent s slikama diska student-entrance3
in smallstudent-personal.
@@ -26,7 +26,7 @@ Skopiraj jo v domači imenik {testuser} in preimenuj tako, da vse znake 'O' v im
Pazi, da nobena druga datoteka v domačem imeniku v svojem imenu ne bo vsebovala "I".
Poskrbi, da bo lastnik {testuser}, skupina pa naj ostane nespremenjena.
-Brati naj jo ima pravico samo lastnik, pisati lastnik in skupina, poganjati nihče.
+Brati naj jo ima pravico samo lastnik, pisati lastnik in skupina, poganjati nihče.
""",
'en': '''
''',
diff --git a/kpov_judge/tasks/set_ip_dhcp_hostname/task.py b/kpov_judge/tasks/set_ip_dhcp_hostname/task.py
index 77648e6..1007424 100644
--- a/kpov_judge/tasks/set_ip_dhcp_hostname/task.py
+++ b/kpov_judge/tasks/set_ip_dhcp_hostname/task.py
@@ -2,14 +2,14 @@
instructions = {
'si':"""
-Ustvari tri navidezne računalnike. Za disk prvega uporabi sliko diska simpleArbiterDhcp.
+Ustvari tri navidezne računalnike. Za disk prvega uporabi sliko diska simpleArbiterDhcp.
Za enega od ostalih dveh (Z_DHCP) poskrbi, da bo dobil IP prek DHCP, pri čemer
naj kot hostname strežniku pošlje ime, ki ga dobiš na simpleArbiterDhcp.
Za drugega (BREZ_DHCP) poskrbi, da bo imel statično nastavljen IP.
Prvi omrežni vmesnik računalnika SimpleArbiter naj bo povezan na Internet. Drugi naj bo povezan na neko lokalno omrežje, na katerega bosta priklopljena računalnika Z_DHCP ter BREZ_DHCP. Na računalniku Z_DHCP poskrbite, da bo ob pridobivanju naslova DHCP strežniku poslal tudi posebej nastavljeno ime računalnika (hostname), ki ne bo enako dejanskemu imenu računalnika (tistemu, ki ga izpiše ukaz hostname).
-Naslov BREZ_DHCP ter ime računalnika za Z_DHCP dobite ob zagonu run_test.py na računalniku SimpleArbiter.
+Naslov BREZ_DHCP ter ime računalnika za Z_DHCP dobite ob zagonu run_test.py na računalniku SimpleArbiter.
"""
}
diff --git a/kpov_judge/tasks/set_ip_static_dhcp/task.py b/kpov_judge/tasks/set_ip_static_dhcp/task.py
index aac93f7..0d11f43 100644
--- a/kpov_judge/tasks/set_ip_static_dhcp/task.py
+++ b/kpov_judge/tasks/set_ip_static_dhcp/task.py
@@ -1,30 +1,30 @@
# kpov_util should be imported by add_assignment.py
instructions = {
- 'si':"""
-Ustvari tri navidezne racunalnike. Za prvega
-uporabi sliko diska simpleArbiterDhcpGW, za drugega sliko diska
-maliNetworkManager, za tretjega sliko diska maliBrezNetworkManager.
-Racunalnike imenujmo enako kot slike diska.
-Na maliBrezNetworkManager poskrbi, da networkmanager ne bo več skrbel
-za omrežni vmesnik, temveč bosta delovala ukaza ifup in ifdown.
-
-Na maliNetworkManager nastavi IP naslov {IP_NM} ter DNS {DNS_NM}.
-Na maliBrezNetworkManager nastavi IP naslov {IP_static} ter DNS {DNS_static}.
-""",
- 'en':"""Create three virtual machines. Use simpleArbiterDhcpGW as the
-disk image for the first, maliNetworkManager as the disk image for the second
-and maliBrezNetworkManager for the third. The virtual machine names can match
-the disks.
-
-Make sure that on maliBrezNetworkManager ifup/ifdown can be used to configure
-the network and that NetworkManager, while still installed, will not manage
-the network interface. The IP should be {IP_static} and the computer should
-use the server {DNS_static} as it's DNS.
-
-On maliNetworkManager, set the IP address to {IP_NM} and use {DNS_NM}
-as the DNS.
-"""
+ 'si': '''\
+ifup
in ifdown
.
+
+{{IP_NM}}
ter DNS {{DNS_NM}}
.
+
+{{IP_static}}
ter DNS {{DNS_static}}
.
+''',
+ 'en': '''\
+ifup
and ifdown
can be used to configure the network and that NetworkManager, while still installed, will not manage the network interface. The IP should be {{IP_static}}
and the computer should use the server {{DNS_static}}
for DNS.
+
+{{IP_NM}}
and use {{DNS_NM}}
for DNS.
+''',
}
computers = {
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': '''\
+{{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}.
+
-IP navideznega računalnika Student ter geslo za {peer_user} nastavite sami.
+{{niz}}
-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': '''\
+username@hostname:~$
{{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 IP of Student and the password for {peer_user} yourself.
+{{niz}}
+
+username@hostname:~$
{{NFS_MOUNT}}
na FileServer dostopen prek NFS in prek SMB kot imenik v skupni rabi {{SMB_SHARENAME}}
. Ime strežnika SMB nastavite na {{FILESERVER_NAME}}
.
-SimpleArbiterDhcp naj ima prek NFS pravico pisati po imeniku.
-""",
-'en':"""
-Set up two virtual computers (simpleArbiterDhcp and FileServer).
+{{NFS_MOUNT}}
on FileServer is accessible over NFS and over SMB under the sharename {{SMB_SHARENAME}}
. Set the SMB server name to {{FILESERVER_NAME}}
.
-SimpleArbiterDhcp should have write access to {NFS_MOUNT} over NFS.
-"""
+{{NFS_MOUNT}}
over NFS.
+''',
}
computers = {
diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py
index 7b3143c..919fcb4 100644
--- a/kpov_judge/tasks/snmp_agent_uptime/task.py
+++ b/kpov_judge/tasks/snmp_agent_uptime/task.py
@@ -2,44 +2,49 @@
# TODO: finish this.
instructions = {
- 'si':"""
-Naloga: Postavi tri navidezne racunalnike:
-- SimpleArbiter s sliko diska simpleArbiterDhcpGW,
-- SNMPServer in
-- SNMPClient.
-Napiši program upminutes, ki bo izpisal v minutah koliko casa je racunalnik
-vklopljen.
-
-Postavi ga na SNMPClient v domaci imenik uporabnika test z geslom test.
-
-Poskrbi, da bo SNMP strežnik prek SNMP pod
-OID {SNMP_UPTIME_OID} sporočal, koliko casa je vklopljen
-v sekundah.
-
-Napiši skripto, poimenovano beri.sh, ki prek SNMP prebere vrednost s
-simpleArbiterDhcpGWSNMP na OID {SNMP_CLIENT_OID} kot član skupnosti
-"testers".
-
-Postavi jo na SNMP klienta, v domaci imenik uporabnika test z geslom test.
-
-Poskrbi, da bodo podatki na SNMPServer dostopni za skupino (community) studentje.
-""",
- 'en':"""
-Set up three virtual computers, SimpleArbiter with the disk image simpleArbiterDhcp,
-SNMPServer and SNMPClient. Write a program called upminutes. This program should output
-the uptime of the computer in minutes. Set it up on SNMPClient in the home directory
-of the user test with the password test.
-
-Make sure that the SNMP server reports it's uptime in seconds over SNMP under
-OID {SNMP_UPTIME_OID}.
-
-Write a script called beri.sh that reads the value from the OID
-{SNMP_CLIENT_OID} on simpleArbiterDhcpGWSNMP as a member of the
-community "testers".
-Set it up on SNMPClient in the home directory of the user test.
-
-Make all the data available over SNMP readable by the "studentje" community.
-"""
+ 'si': '''\
+upminutes
, ki bo izpisal v minutah, koliko časa je racunalnik vklopljen. Postavi ga na SNMPClient v domači imenik uporabnika test
z geslom test
.
+
+
+
+{{SNMP_UPTIME_OID}}
beri.sh
, ki prek SNMP prebere vrednost s simpleArbiterDhcpGWSNMP na OID
+
+
+
+{{SNMP_CLIENT_OID}}
testers
. Postavi jo na SNMPClient, v domači imenik uporabnika test
. Poskrbi, da bodo podatki na SNMPServer dostopni za skupino (angl. community) studentje
.
+''',
+ 'en': '''\
+upminutes
. This program should output the uptime of the computer in minutes. Set it up on SNMPClient in the home directory of the user test
with the password test
.
+
+
+
+{{SNMP_UPTIME_OID}}
beri.sh
that reads the value from the OID
+
+
+
+{{SNMP_CLIENT_OID}}
testers
. Set it up on SNMPClient in the home directory of the user test
. Make all the data available over SNMP readable by the community studentje
.
+''',
}
computers = {
diff --git a/kpov_judge/tasks/snmp_alarms_interfaces/task.py b/kpov_judge/tasks/snmp_alarms_interfaces/task.py
index f1e8d62..03d4509 100644
--- a/kpov_judge/tasks/snmp_alarms_interfaces/task.py
+++ b/kpov_judge/tasks/snmp_alarms_interfaces/task.py
@@ -2,7 +2,7 @@
instructions = {
'si':"""
-Postavite tri računalnike - SimpleArbiterSNMP s sliko diska simpleArbiterSNMP, ServerSNMP s sliko
+Postavite tri računalnike - SimpleArbiterSNMP s sliko diska simpleArbiterSNMP, ServerSNMP s sliko
diska serverSNMP ter SNMPClient.
Na SNMPClient ustvarite uporabnika test z geslom test. V datoteko /home/test/alarmi zapišite
@@ -10,7 +10,7 @@ vse IP in vse OID, s katerih po SNMP prihajajo alarmi. Za vsak alarm zapišite e
v kateri bosta najprej IP, nato OID, ločena s presledkom.
V datoteko /home/test/vmesniki vpišite imena vseh omrežnih vmesnikov, ki jih prek SNMP dobite na
-ServerSNMP.
+ServerSNMP.
"""
}
diff --git a/kpov_judge/tasks/vlc_stream_rtp/task.py b/kpov_judge/tasks/vlc_stream_rtp/task.py
index bfdfb4f..427fc0e 100644
--- a/kpov_judge/tasks/vlc_stream_rtp/task.py
+++ b/kpov_judge/tasks/vlc_stream_rtp/task.py
@@ -4,31 +4,28 @@
# TODO: finish this
instructions = {
- 'si':"""
-Postavi navidezni računalnik SimpleArbiter z diska simpleArbiter
-ter StudentVLC z diska student-VLC. Poskrbi, da bosta na istem omrežju, od
-koder bosta imela dostop tudi do Interneta Na StudentVLC posodobi datoteko
-/etc/apt/sources.list, preveri posodobitve in naloži VLC.
+ 'si': '''\
+/etc/apt/sources.list
, preveri posodobitve in naloži VLC.
+
+{{TOK}}
na naslovu {{NASLOV}}
, vrata {{PORT}}
. Računaj, da bodo film lahko videli tvoji sošolci. Kršenje avtorskih pravic je pri reševanju te naloge strogo prepovedano.
+''',
+ 'en': '''\
+{{TOK}}
at the address {{NASLOV}}
on port {{PORT}}
. Take into account that the movie may be seen by your classmates. Copyright infrigement while solving this task is strictly prohibited.
+''',
}
computers = {
diff --git a/kpov_judge/web/kpov_judge/kpov_judge.py b/kpov_judge/web/kpov_judge/kpov_judge.py
index 5aa0606..4dfed7b 100755
--- a/kpov_judge/web/kpov_judge/kpov_judge.py
+++ b/kpov_judge/web/kpov_judge/kpov_judge.py
@@ -235,10 +235,6 @@ def task_greeting(class_id, task_id, lang):
for k, v in meta.items():
if v.get('public', False):
public_params[k] = params.get(k, "???")
- # instructions = instructions.format(**public_params).decode('utf8')
- instructions = instructions.format(**public_params)
-
- # instructions = instructions.format(**public_params).encode('utf8')
except Exception as e:
instructions = str(e)
computer_list = list(db.student_computers.find({'class_id': class_id, 'task_id': task_id, 'student_id': student_id}))
@@ -258,11 +254,15 @@ def task_greeting(class_id, task_id, lang):
openstackCreated = False
return render_template('task_greeting.html',
disk_base_url='/'.join([app.config['STUDENT_DISK_URL'], student_id, class_id, task_id, '']),
+ class_id=class_id,
+ task_id=task_id,
computers=computer_list,
backing_images=sorted(backing_images),
- lang=lang,
+ lang='sl' if lang == 'si' else lang, # TODO s/si/sl in all tasks (and maybe elsewhere)
openstack=openstackCreated,
- instructions=instructions)
+ instructions=jinja2.Template(instructions),
+ **public_params,
+ )
@app.route('/tasks/↩ {{clas.name}}
{{ _('Naloge') }}
{% for t in tasks %}
diff --git a/kpov_judge/web/kpov_judge/templates/index.html b/kpov_judge/web/kpov_judge/templates/index.html
index 49895b0..4c2ba47 100644
--- a/kpov_judge/web/kpov_judge/templates/index.html
+++ b/kpov_judge/web/kpov_judge/templates/index.html
@@ -4,14 +4,13 @@
{% endfor %}
KPOV Judge
{{ _('Predmeti') }}
{% for c in classes %}
-
-
diff --git a/kpov_judge/web/kpov_judge/templates/task_greeting.html b/kpov_judge/web/kpov_judge/templates/task_greeting.html
index 5a59fe0..086d6b1 100644
--- a/kpov_judge/web/kpov_judge/templates/task_greeting.html
+++ b/kpov_judge/web/kpov_judge/templates/task_greeting.html
@@ -10,6 +10,7 @@ img.setup {
max-width: 20em;
}
section.data {
+ clear: both;
columns: 2;
}
section.data > section {
@@ -37,14 +38,14 @@ section > ul {
{% include instructions %}
Računalniki
+{{ _('Računalniki') }}
@@ -56,16 +57,16 @@ Slike diskov za to nalogo:
{% endfor %}
{% else %}
- Slike navideznih diskov so v izdelavi in bodo kmalu na voljo.
+
{{ _('Slike navideznih diskov so v izdelavi in bodo kmalu na voljo.') }}
{% endif %}
Osnovne slike
+{{ _('Osnovne slike') }}
{% for b in backing_images %}
@@ -77,14 +78,14 @@ Te slike so enake za vse naloge in jih prenesete samo enkrat.
Rezultati
+{{ _('Rezultati') }}
{% for u in c['disk_urls'] %}
-
{% else %}
@@ -70,7 +70,7 @@ section > ul {
{% endif %}
@@ -78,16 +78,27 @@ section > ul {
{{ _('Rezultati') }}
+{{ _('Rezultat') }}
{{ _('Parametri') }}
+
+{% for p in params if p['value'] %}
+
+{{ p['value'] }}
--
cgit v1.2.1
From 481fd30e6cc6fc242e9471ce08f676f4883a3e69 Mon Sep 17 00:00:00 2001
From: Timotej Lazar ↩ {{task_id}}
+
+↩ {{task_id}}
+[
+{% for lang in ('en', 'si') %}
+{{lang}}
+{% endfor %}
+]
+
↩ {{task_id}}
-[
+ [
{% for lang in ('en', 'si') %}
{{lang}}
{% endfor %}
diff --git a/kpov_judge/web/kpov_judge/translations/en/LC_MESSAGES/messages.po b/kpov_judge/web/kpov_judge/translations/en/LC_MESSAGES/messages.po
index df2c29d..ef9a7bb 100644
--- a/kpov_judge/web/kpov_judge/translations/en/LC_MESSAGES/messages.po
+++ b/kpov_judge/web/kpov_judge/translations/en/LC_MESSAGES/messages.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2018-10-13 19:25+0200\n"
-"PO-Revision-Date: 2018-10-13 02:29+0200\n"
+"PO-Revision-Date: 2018-10-13 20:57+0200\n"
"Last-Translator: FULL NAME