prefix = 'Skrocony kurs/%d %s/' % (i, lesson.slug)
lesson.add_to_zip(zipf, student, prefix)
for c, (section, clessons) in enumerate(lessons['course'].items()):
+ assert section, clessons
for i, lesson in enumerate(clessons):
prefix = 'Pelny kurs/%d %s/%d %s/' % (c, section.slug, i, lesson.slug)
lesson.add_to_zip(zipf, student, prefix)
prefix = 'Projekty/%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')):
+ for lesson in Lesson.objects.filter(type='appendix'):
prefix = '%s/' % lesson.slug
lesson.add_to_zip(zipf, student, prefix)
zipf.close()