Commit 1045a7fb authored by Julian Rother's avatar Julian Rother
Browse files

Added semester as secondary courses ordering key, closes #208

parent 507588e5
......@@ -348,7 +348,7 @@ def index():
@app.route('/courses')
@register_navbar('Videos', icon='film')
def courses():
courses = query('SELECT * FROM courses WHERE (? OR (visible AND listed)) ORDER BY title', ismod())
courses = query('SELECT * FROM courses WHERE (? OR (visible AND listed)) ORDER BY semester, title', ismod())
for course in courses:
if course['semester'] == '':
course['semester'] = 'zeitlos'
......
......@@ -63,7 +63,7 @@
</a>
</div>
<ul class="{% if not ismod() %}courses-list {% endif %}list-group panel-collapse collapse in" id="{{g.grouper|tagid}}">
{% for i in g.list|sort(attribute='title') %}
{% for i in g.list %}
{% if groupedby == 'semester' %}
{{ course_list_item(i) }}
{% else %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment