Commit 5d71c534 authored by Martin Mareš's avatar Martin Mareš
Browse files

Admin list of courses sorts them by semester

parent 23444163
......@@ -1268,7 +1268,7 @@ def admin_courses():
if err:
return err
db_query("SELECT * FROM owl_courses ORDER BY ident");
db_query("SELECT c.*, s.ident AS sem_ident FROM owl_courses c JOIN owl_semesters s USING(semid) ORDER BY s.rank, c.ident");
courses = db.fetchall()
db_query("""
......
......@@ -4,6 +4,7 @@
<table class=data>
<thead><tr>
<th>Sem.
<th>Ident
<th>Name
<th>Teachers
......@@ -11,6 +12,7 @@
</thead>
{% for c in courses %}
<tr>
<td>{{ c.sem_ident }}
<td style='white-space: nowrap'>{{ c.ident }}
<td><a href='{{ url_for('course_index', cident=c.ident) }}'>{{ c.name }}</a>
{% if c.cid in teachers %}
......
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