Commit 7f406b1a authored by Julian Rother's avatar Julian Rother
Browse files

Made lectures of unlisted videos accessible

parent 78c971ab
...@@ -299,7 +299,7 @@ def lecture(id): ...@@ -299,7 +299,7 @@ def lecture(id):
lecture['id'], lecture['course_id']) lecture['id'], lecture['course_id'])
if not videos: if not videos:
flash('Zu dieser Vorlesung wurden noch keine Videos veröffentlicht!') flash('Zu dieser Vorlesung wurden noch keine Videos veröffentlicht!')
courses = query('SELECT * FROM courses WHERE id = ? AND (? OR (visible AND listed))', lecture['course_id'], ismod()) courses = query('SELECT * FROM courses WHERE id = ? AND (? OR visible)', lecture['course_id'], ismod())
if not courses: if not courses:
return render_endpoint('courses', 'Diese Veranstaltung existiert nicht!'), 404 return render_endpoint('courses', 'Diese Veranstaltung existiert nicht!'), 404
chapters = query('SELECT * FROM chapters WHERE lecture_id = ? AND NOT deleted AND (? OR visible) ORDER BY time ASC', id, ismod()) chapters = query('SELECT * FROM chapters WHERE lecture_id = ? AND NOT deleted AND (? OR visible) ORDER BY time ASC', id, ismod())
......
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