fnp
/
edumed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
34511b8
)
Fixes #3314, #3331: Various minor fixes.
author
Radek Czajka
<radekczajka@nowoczesnapolska.org.pl>
Tue, 25 Feb 2014 15:50:42 +0000
(16:50 +0100)
committer
Radek Czajka
<radekczajka@nowoczesnapolska.org.pl>
Tue, 25 Feb 2014 15:50:42 +0000
(16:50 +0100)
catalogue/models.py
patch
|
blob
|
history
catalogue/templates/catalogue/lesson/course/lesson_detail.html
patch
|
blob
|
history
catalogue/templates/catalogue/lesson/project/lesson_detail.html
patch
|
blob
|
history
catalogue/templates/catalogue/snippets/level_box.html
patch
|
blob
|
history
curriculum/models.py
patch
|
blob
|
history
diff --git
a/catalogue/models.py
b/catalogue/models.py
index
4af4810
..
55ee821
100644
(file)
--- a/
catalogue/models.py
+++ b/
catalogue/models.py
@@
-168,10
+168,14
@@
class Lesson(models.Model):
def populate_description(self, wldoc=None, infile=None):
if wldoc is None:
wldoc = self.wldocument(infile)
def populate_description(self, wldoc=None, infile=None):
if wldoc is None:
wldoc = self.wldocument(infile)
- for nagl in wldoc.edoc.findall('.//naglowek_rozdzial'):
- if (nagl.text or '').strip() == u'Pomysł na lekcję':
+ if self.type == 'project':
+ lookup = u'Zadanie'
+ else:
+ lookup = u'Pomysł na lekcję'
+ for header in wldoc.edoc.findall('.//naglowek_rozdzial'):
+ if (header.text or '').strip() == lookup:
from lxml import etree
from lxml import etree
- self.description = etree.tostring(
nagl
.getnext(),
+ self.description = etree.tostring(
header
.getnext(),
method='text', encoding='unicode').strip()
self.save()
return
method='text', encoding='unicode').strip()
self.save()
return
diff --git
a/catalogue/templates/catalogue/lesson/course/lesson_detail.html
b/catalogue/templates/catalogue/lesson/course/lesson_detail.html
index
28f6504
..
38ef906
100755
(executable)
--- a/
catalogue/templates/catalogue/lesson/course/lesson_detail.html
+++ b/
catalogue/templates/catalogue/lesson/course/lesson_detail.html
@@
-8,7
+8,7
@@
{% include "catalogue/lesson/box-icons.html" %}
<p>Ta lekcja jest częścią tematu
{% include "catalogue/lesson/box-icons.html" %}
<p>Ta lekcja jest częścią tematu
- <a href="{
{ object.section.get_absolute_url
}}"><strong>{{ object.section }}</strong></a>
+ <a href="{
% url 'catalogue_lessons' %}#{{ object.level.slug }}_{{ object.section.slug
}}"><strong>{{ object.section }}</strong></a>
na poziomie {{ object.level|lower }}.
</p>
<div style="clear: right"></div>
na poziomie {{ object.level|lower }}.
</p>
<div style="clear: right"></div>
diff --git
a/catalogue/templates/catalogue/lesson/project/lesson_detail.html
b/catalogue/templates/catalogue/lesson/project/lesson_detail.html
index
0c6d217
..
7a17251
100755
(executable)
--- a/
catalogue/templates/catalogue/lesson/project/lesson_detail.html
+++ b/
catalogue/templates/catalogue/lesson/project/lesson_detail.html
@@
-11,7
+11,7
@@
<p>To jest <a href="{% url 'info' 'metoda-projektowa' %}">projekt</a>
na poziomie
<p>To jest <a href="{% url 'info' 'metoda-projektowa' %}">projekt</a>
na poziomie
- <a href="{% url 'catalogue_lessons' %}#{{ object.level.slug }}
_pelny
">{{ object.level|lower }}</a>.
+ <a href="{% url 'catalogue_lessons' %}#{{ object.level.slug }}">{{ object.level|lower }}</a>.
</p>
</section>
{% endblock %}
</p>
</section>
{% endblock %}
diff --git
a/catalogue/templates/catalogue/snippets/level_box.html
b/catalogue/templates/catalogue/snippets/level_box.html
index
bb2fa12
..
e51be2a
100755
(executable)
--- a/
catalogue/templates/catalogue/snippets/level_box.html
+++ b/
catalogue/templates/catalogue/snippets/level_box.html
@@
-16,14
+16,14
@@
</li>
{% endif %}
{% if lessons.project %}
</li>
{% endif %}
{% if lessons.project %}
- <li><a href="#{{ level.slug }}_projekt
">Projekt
</a></li>
+ <li><a href="#{{ level.slug }}_projekt
y">Projekty
</a></li>
{% endif %}
{% if lessons.appendix %}
<li><a href="#{{ level.slug }}_pozostale">Pozostałe materiały</a></li>
{% endif %}
{% if courses %}
{% endif %}
{% if lessons.appendix %}
<li><a href="#{{ level.slug }}_pozostale">Pozostałe materiały</a></li>
{% endif %}
{% if courses %}
- <li class="curriculumcourses"><a href="#{{ level.slug }}_podstawa">Wg postawy programowej</a>
+ <li class="curriculumcourses"><a href="#{{ level.slug }}_podstawa">W
edłu
g postawy programowej</a>
<ul style="list-style: none; padding: 0 0 0 1em; margin: 0;">
{% for course, lessons in courses %}
<li><a href="#{{ level.slug }}_{{ course.slug}}">{{ course }}</a></li>
<ul style="list-style: none; padding: 0 0 0 1em; margin: 0;">
{% for course, lessons in courses %}
<li><a href="#{{ level.slug }}_{{ course.slug}}">{{ course }}</a></li>
@@
-78,8
+78,8
@@
{% if lessons.project %}
{% if lessons.project %}
- <section id="{{ level.slug }}_projekt">
- <h1>Projekt</h1>
+ <section id="{{ level.slug }}_projekt
y
">
+ <h1>Projekt
y
</h1>
<p>Masz 4-6 tygodni? Zrealizuj jeden z projektów ze swoimi uczniami.</p>
<p>Masz 4-6 tygodni? Zrealizuj jeden z projektów ze swoimi uczniami.</p>
@@
-94,7
+94,7
@@
{% if courses %}
<section id="{{ level.slug }}_podstawa">
{% if courses %}
<section id="{{ level.slug }}_podstawa">
- <h1>Wg podstawy programowej</h1>
+ <h1>W
edłu
g podstawy programowej</h1>
{% for course, lessons in courses %}
<section id="{{ level.slug}}_{{ course.slug }}">
{% for course, lessons in courses %}
<section id="{{ level.slug}}_{{ course.slug }}">
@@
-124,7
+124,7
@@
{% if lessons.project %}
<section>
{% if lessons.project %}
<section>
- <h1>Projekt</h1>
+ <h1>Projekt
y
</h1>
<ul class="link-list">
{% for lesson in lessons.project %}
<li>{% include "catalogue/snippets/lesson_or_stub.html" %}</li>
<ul class="link-list">
{% for lesson in lessons.project %}
<li>{% include "catalogue/snippets/lesson_or_stub.html" %}</li>
diff --git
a/curriculum/models.py
b/curriculum/models.py
index
9da530d
..
b8cd81d
100644
(file)
--- a/
curriculum/models.py
+++ b/
curriculum/models.py
@@
-107,7
+107,7
@@
class Level(models.Model):
prefix = 'Pelny kurs/%d %s/%d %s/' % (c, section.slug, i, lesson.slug)
lesson.add_to_zip(zipf, student, prefix)
for i, lesson in enumerate(lessons['project']):
prefix = 'Pelny kurs/%d %s/%d %s/' % (c, section.slug, i, lesson.slug)
lesson.add_to_zip(zipf, student, prefix)
for i, lesson in enumerate(lessons['project']):
- prefix = '
Kurs skrocon
y/%d %s/' % (i, lesson.slug)
+ prefix = '
Projekt
y/%d %s/' % (i, lesson.slug)
lesson.add_to_zip(zipf, student, prefix)
# Add all appendix lessons, from all levels.
for lesson in Lesson.objects.exclude(type__in=('synthetic', 'course', 'project')):
lesson.add_to_zip(zipf, student, prefix)
# Add all appendix lessons, from all levels.
for lesson in Lesson.objects.exclude(type__in=('synthetic', 'course', 'project')):