summaryrefslogtreecommitdiff
path: root/kpov_judge/web/kpov_judge/templates/task_greeting.html
blob: 4f1be3acf0b4c0f4e1ddf945e8367ff9c9bfbfb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html lang="{{lang}}">
<meta charset="utf-8">
<title>KPOV Judge</title>

<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<style>
img.setup {
    border: 1px solid black;
    border-radius: 2px;
    float: right;
    max-width: 20em;
    margin: 1em 0 1em 1em;
}
section.instructions {
    column-span: all;
    border: 1px solid gray;
    border-radius: 2px;
    background-color: #eee;
    color: black;
    padding: 0 1em 1em;
}
div.two-columns {
    columns: 2;
    column-gap: 4em;
}
div.two-columns > section {
    display: inline-block;
}
section.disks > section > h1 {
    margin-bottom: 0;
}
section ul {
    list-style-position: inside;
    margin: 0;
    margin-left: 1em;
    padding-left: 0;
}
section > ul {
    margin-top: 0.5em;
}
</style>

<h1>
<a href="{{ url_for('class_tasks', class_id=class_id) }}" class="back">↩</a> {{task_id}}
 <span style="font-size: 50%; font-weight: normal;">[
{% for lang in ('en', 'si') %}
<a href="{{ url_for('task_greeting', class_id=class_id, task_id=task_id, lang=lang) }}">{{lang}}</a>
{% endfor %}
]</span>
</h1>

<section class="instructions">
<a href="setup.png"><img src="setup.png" class="setup" alt="{{ _('Shema omrežja za nalogo.') }}"></a>
<h2>{{ _('Naloga') }}</h2>

{% include instructions %}

<p>
<a href="howto/">{{ _('Podrobna navodila.') }}</a>
</section>

<div class="two-columns">
<section class="disks">
<h2>{{ _('Računalniki') }}</h2>
{% if computers %}
<dl>
  {% for c in computers %}
  <dt>{{c['name']}}
  <dd><ul>
    {% for name, disk in c['disk_urls'].items() %}
    <li>{{name}} [ {% for fmt in disk['formats'] %}<a href="{{disk_base_url+disk[fmt][0]}}">{{fmt}}</a> {% endfor %}]
    {% else %}
    {% endfor %}
  </ul></dd>
{% endfor %}
</dl>

<p>
{{ _('Za GNS3 uporabite slike v formatu qcow2 ali VMDK, za katere rabite še zaledne datoteke (angl. <em lang="en">backing files</em>). VirtualBox ne podpira zalednih datotek, zato so slike VDI precej večje. Namesto prenosa lahko slike VDI <a href="">dobite iz formata qcow2 ali VMDK</a>.') }}

{% if backing_files %}
<section>
<h3>{{ _('Zaledne datoteke') }}</h3>
<p>
{{ _('Vsako od spodnjih slik prenesete samo pri prvi nalogi, v kateri se pojavi. Vse datoteke morajo biti v istem imeniku.') }}

<dl>
{% for fmt, images in backing_files.items() %}
  {% if images %}
  <dt>{{fmt}}
  <dd><ul>
    {% for image in images %}
    <li><a href="{{disk_base_url+image}}">{{image}}</a></li>
    {% endfor %}
  </ul></dd>
  {% endif %}
{% endfor %}
</dl>
</section>
{% endif %}

{% else %}
  <p>{{ _('Slike navideznih diskov so v izdelavi in bodo kmalu na voljo.') }}
{% endif %}
</section>

<section>
<h2>{{ _('Status') }}</h2>
<p>
{% 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 %}

<p>
<a href="../task.html">{{ _('Program za preverjanje.') }}</a>

<h3>{{ _('Parametri') }}</h2>
<dl>
{% for p in params if p['value'] %}
  <dt><em>{{ p['name'] }}</em>{% if p['description'] %} … <small>{{ p['description'] }}</small>{% endif %}</dt>
  <dd><code>{{ p['value'] }}</code></dd>
{% endfor %}
</dl>
</section>
</div>

{#
<p>
{% if openstack %}
Openstack projekt za to vajo je že ustvarjen ali v izdelavi (funkcionalnost še ne deluje).
{% else %}
<a href='?narediStack=true'>Ustvari</a> Openstack projekt za to vajo (funkcionalnost še ne deluje).
{% endif %}
#}