+ @escape(True)
+ def get_description(self, element):
+ desc = self.get_dc(element, 'description', single=True)
+ if not desc:
+ print '!! no description'
+ return desc
+
+ @escape(True)
+ def get_curriculum(self, element):
+ identifiers = self.get_dc(element, 'subject.curriculum')
+ if not identifiers:
+ return ''
+ try:
+ from curriculum.templatetags.curriculum_tags import curriculum
+ curr_elements = curriculum(identifiers)
+ except ImportError:
+ curr_elements = {'identifiers': identifiers}
+ items = ['Podstawa programowa:']
+ newline = '<ctrl ch="\\"/>\n'
+ if 'currset' in curr_elements:
+ for (course, level), types in curr_elements['currset'].iteritems():
+ lines = [u'%s, %s poziom edukacyjny' % (course, level)]
+ for type, currs in types.iteritems():
+ lines.append(type)
+ lines += [curr.title for curr in currs]
+ items.append(newline.join(lines))
+ else:
+ items += identifiers
+ return '\n<cmd name="vspace"><parm>.6em</parm></cmd>\n'.join(
+ '<cmd name="akap"><parm>%s</parm></cmd>' % item for item in items)
+