<%page expression_filter="h"/> <%! from django.utils.translation import ugettext as _ from lms.djangoapps.discussion.django_comment_client.constants import TYPE_ENTRY from openedx.core.djangolib.markup import HTML %> <%def name="render_dropdown(map, topic_list)"> % for child, c_type in map["children"]: % if child in map["entries"] and c_type == TYPE_ENTRY: ${HTML(render_entry(map["entries"], child, topic_list))} %else: ${HTML(render_category(map["subcategories"], child, topic_list))} %endif %endfor <%def name="render_entry(entries, entry, topic_list)">
  • %if entry: %if topic_list: ${', '.join(topic_list)}, %endif ${entry} %endif
  • <%def name="render_category(categories, category, topic_list)">
  • ${category}