lectures=query('SELECT * FROM lectures WHERE id = ? AND (? OR visible)',id,ismod())
videos=query('SELECT videos.*, formats.description AS format_description FROM videos JOIN formats ON (videos.video_format = formats.id) WHERE lecture_id = ? AND (? OR visible)',id,ismod())
ifnotvideos:
...
...
@@ -176,7 +176,7 @@ def play(id):
courses=query('SELECT * FROM courses WHERE id = ? AND (? OR (visible AND listed))',lectures[0]['course_id'],ismod())
changelog=query('SELECT *, ( "table" || "." || id_value || "." ||field) as path FROM changelog LEFT JOIN users ON (changelog.who = users.id) ORDER BY "when" DESC LIMIT 50')
{% for l in d.lectures|selectattr('schedule_col','equalto',i) if (((l.time.time() > t) and (l.time.time() <times[time_loop.index+1]))!=(l.time.time() ==t))%}