From aabc4b1dadabc2f005f5ccd16f7b28e48641d86f Mon Sep 17 00:00:00 2001 From: Jonas Havelka Date: Tue, 23 Feb 2021 21:43:04 +0100 Subject: [PATCH 1/6] =?UTF-8?q?Detailn=C3=AD=20v=C3=BDsledkovka=20(fix=20h?= =?UTF-8?q?tml=20id)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/templates/seminar/archiv/cislo.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/templates/seminar/archiv/cislo.html b/seminar/templates/seminar/archiv/cislo.html index 2e912dde..e0af0813 100644 --- a/seminar/templates/seminar/archiv/cislo.html +++ b/seminar/templates/seminar/archiv/cislo.html @@ -74,7 +74,7 @@ # Jméno {% for p in problemy %} - {{ p.kod_v_rocniku }} + {{ p.kod_v_rocniku }} {# TODELETE #} {% for podproblemy in podproblemy_iter.next %} From 43d0ca7e9183ca439a9789d01c719a88fd810972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C?= Date: Tue, 23 Feb 2021 21:58:10 +0100 Subject: [PATCH 2/6] =?UTF-8?q?ro=C4=8Dn=C3=ADk=20m=C3=A1=20sv=C3=A1=20t?= =?UTF-8?q?=C3=A9mata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/models.py b/seminar/models.py index 5f427fb2..fd34773f 100644 --- a/seminar/models.py +++ b/seminar/models.py @@ -921,7 +921,7 @@ class Tema(Problem): tema_typ = models.CharField('Typ tématu', max_length=16, choices=TEMA_CHOICES, blank=False, default=TEMA_TEMA) - rocnik = models.ForeignKey(Rocnik, verbose_name='ročník',blank=True, null=True, + rocnik = models.ForeignKey(Rocnik, verbose_name='ročník',related_name='temata',blank=True, null=True, on_delete=models.PROTECT) abstrakt = models.TextField('Abstrakt na rozcestník', blank=True) From 255ba78d2f59a38609c2402eb9f65daf8af127ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C?= Date: Tue, 23 Feb 2021 21:59:09 +0100 Subject: [PATCH 3/6] =?UTF-8?q?zkr=C3=A1=C5=A1kolv=C3=A1n=C3=AD=20archivu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/static/css/mamweb.css | 5 +++++ seminar/templates/seminar/archiv/cislo.html | 20 +++++++++++++++----- seminar/templates/seminar/archiv/rocnik.html | 9 ++++++--- seminar/templates/seminar/archiv/temata.html | 4 ++-- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index ba2f2343..104c2df3 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -929,6 +929,11 @@ div.zadani_termin .datum { margin:0px; } +#obrazek_cisla_archiv { + text-align: center; + margin: 10px; +} + /* galerie */ diff --git a/seminar/templates/seminar/archiv/cislo.html b/seminar/templates/seminar/archiv/cislo.html index 2e912dde..fc04b439 100644 --- a/seminar/templates/seminar/archiv/cislo.html +++ b/seminar/templates/seminar/archiv/cislo.html @@ -9,11 +9,7 @@ Číslo {{ cislo }} {% endblock %}{% endblock %} - - {% if cislo.pdf %} -

Číslo v pdf - {% endif %} -

Ročník {{ cislo.rocnik }} + Zpět na ročník {{ cislo.rocnik }} {% if v_cisle_zadane %}

Zadané problémy

@@ -50,12 +46,26 @@ {% endif %} +
+ +
+ {% if cislo.titulka_nahled %} + Titulní + {% elif cislo.pdf %} + Číslo v pdf + {% endif %} +
+ +
+ +{% comment %}
{% render_bundle 'chunk-vendors' %} {% render_bundle 'vue_app_01' %} +{% endcomment %} {% if cislo.verejna_vysledkovka %} diff --git a/seminar/templates/seminar/archiv/rocnik.html b/seminar/templates/seminar/archiv/rocnik.html index bf251ab3..7a381253 100644 --- a/seminar/templates/seminar/archiv/rocnik.html +++ b/seminar/templates/seminar/archiv/rocnik.html @@ -8,15 +8,17 @@ {% endblock %}{% endblock %} - {% if temata_v_rocniku %} + {% if rocnik.temata %}

Témata

{% endif %} +

Čísla

+
{% for c in rocnik.verejna_cisla %}
@@ -61,6 +63,7 @@ {% endfor %}
+ {% if vysledkovka %} {% if user.je_org %}
diff --git a/seminar/templates/seminar/archiv/temata.html b/seminar/templates/seminar/archiv/temata.html index 4c25d78b..62db7d41 100644 --- a/seminar/templates/seminar/archiv/temata.html +++ b/seminar/templates/seminar/archiv/temata.html @@ -8,10 +8,10 @@ {% for rocnik, temata in rocniky.items %} -

Ročník {{ rocnik }}

+

Ročník {{ rocnik }}

{% endfor %} From 6cb1b78895926e77d6218f3fe1de8b0fe75508e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C?= Date: Tue, 23 Feb 2021 22:00:22 +0100 Subject: [PATCH 4/6] =?UTF-8?q?img=20je=20nep=C3=A1rov=C3=BD=20html=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/templates/seminar/zadani/AktualniZadani.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/templates/seminar/zadani/AktualniZadani.html b/seminar/templates/seminar/zadani/AktualniZadani.html index 35917947..b60dbe4a 100644 --- a/seminar/templates/seminar/zadani/AktualniZadani.html +++ b/seminar/templates/seminar/zadani/AktualniZadani.html @@ -33,7 +33,7 @@
{% if ac.titulka_nahled and ac.pdf %} - Titulní + Titulní {% endif %} {% if ac.pdf %} From 8e0c34ed99603554ff2419f0d93e0ca414e77195 Mon Sep 17 00:00:00 2001 From: Jonas Havelka Date: Tue, 23 Feb 2021 22:04:13 +0100 Subject: [PATCH 5/6] =?UTF-8?q?Generov=C3=A1n=C3=AD=20hodnocen=C3=AD=20u?= =?UTF-8?q?=20v=C3=ADce=20=C3=BAloh=20t=C3=A9mata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/testutils.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/seminar/testutils.py b/seminar/testutils.py index 913e6abb..b40771fc 100644 --- a/seminar/testutils.py +++ b/seminar/testutils.py @@ -581,7 +581,7 @@ def gen_temata(rnd, rocniky, rocnik_cisla, organizatori): rocnik_temata.append(letosni_temata) return rocnik_temata -def gen_ulohy_tematu(rnd, organizatori, tema, kod, cislo, cislo_se_vzorakem): +def gen_ulohy_tematu(rnd, organizatori, resitele, tema, kod, cislo, cislo_se_vzorakem): """ Generování úlohy k danému tématu. """ # Proměnné pro náhodné generování názvů a zadání. @@ -627,10 +627,14 @@ def gen_ulohy_tematu(rnd, organizatori, tema, kod, cislo, cislo_se_vzorakem): uloha_zadani = UlohaZadaniNode.objects.create(uloha=uloha, first_child = zad, root=tema.temavcislenode_set.first().root) uloha.ulohazadaninode = uloha_zadani + # Generování řešení a hodnocení k úloze + gen_reseni_ulohy(rnd, [cislo], uloha, len(resitele)//4, 1, + resitele, resitele) + return uloha, uloha_zadani -def gen_ulohy_k_tematum(rnd, rocniky, rocnik_cisla, rocnik_temata, organizatori): +def gen_ulohy_k_tematum(rnd, rocniky, rocnik_cisla, rocnik_temata, organizatori, resitele): logger.info('Generuji úlohy k tématům...') # Ke každému ročníku si vezmeme příslušná čísla a témata @@ -860,7 +864,7 @@ def create_test_data(size = 6, rnd = None): "MFI", 8) # generování úloh k tématům ve všech číslech - gen_ulohy_k_tematum(rnd, rocniky, rocnik_cisla, rocnik_temata, organizatori) + gen_ulohy_k_tematum(rnd, rocniky, rocnik_cisla, rocnik_temata, organizatori, resitele) #generování soustředění soustredeni = gen_soustredeni(rnd, resitele, organizatori) From f705441f0da41f4d5f3c13aadd4575fafd08b405 Mon Sep 17 00:00:00 2001 From: Jonas Havelka Date: Tue, 23 Feb 2021 22:07:26 +0100 Subject: [PATCH 6/6] =?UTF-8?q?A=20tohle=20mi=20n=C4=9Bjak=20vypadlo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/testutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/testutils.py b/seminar/testutils.py index b40771fc..9f15dc5c 100644 --- a/seminar/testutils.py +++ b/seminar/testutils.py @@ -667,7 +667,7 @@ def gen_ulohy_k_tematum(rnd, rocniky, rocnik_cisla, rocnik_temata, organizatori, # Generujeme 1 až 4 úložky k tomuto témátku do tohoto čísla. for kod in range(1, rnd.randint(1, 4)): - u, uz = gen_ulohy_tematu(rnd, organizatori, tema, kod, + u, uz = gen_ulohy_tematu(rnd, organizatori, resitele, tema, kod, cislo, cislo_se_vzorakem) insert_last_child(tema_node, uz)