Commit 83d39362 authored by Julian Rother's avatar Julian Rother
Browse files

Added "external" property for courses (#213)

parent 25683ada
......@@ -61,7 +61,8 @@ CREATE TABLE IF NOT EXISTS `courses_data` (
`description` text NOT NULL DEFAULT '',
`internal` text NOT NULL DEFAULT '',
`responsible` text NOT NULL DEFAULT '',
`feed_url` text NOT NULL DEFAULT ''
`feed_url` text NOT NULL DEFAULT '',
`external` INTEGER NOT NULL DEFAULT 0
);
CREATE TABLE IF NOT EXISTS `filesizes` (
`path` varchar(255) NOT NULL PRIMARY KEY,
......
......@@ -25,7 +25,8 @@ editable_tables = {
'internal': {'type': 'text'},
'responsible': {'type': 'shortstring'},
'deleted': {'type': 'boolean'},
'description': {'type': 'text'} },
'description': {'type': 'text'},
'external': {'type': 'boolean'}},
'creationtime_fields': ['created_by', 'time_created', 'time_updated'] },
'lectures': {
'table': 'lectures_data',
......
......@@ -41,6 +41,7 @@
<tbody>
<tr><td>Sichtbar:</td><td>{{ moderator_checkbox(['courses',course.id,'visible'], course.visible) }}</td></tr>
<tr><td>Gelistet:</td><td>{{ moderator_checkbox(['courses',course.id,'listed'], course.listed) }}</td></tr>
<tr><td>Nicht im Drehplan:</td><td>{{ moderator_checkbox(['courses',course.id,'external'], course.external) }}</td></tr>
<tr><td>Videos downloadbar:</td><td>{{ moderator_checkbox(['courses',course.id,'downloadable'], course.downloadable) }}</td></tr>
<tr><td>Short:</td><td>{{ moderator_editor(['courses',course.id,'short'], course.short) }}</td></tr>
<tr><td>Handle:</td><td>{{ moderator_editor(['courses',course.id,'handle'], course.handle) }}</td></tr>
......
......@@ -26,7 +26,7 @@ def timetable():
SELECT lectures.*, courses.short, "course" AS sep, courses.*
FROM lectures
JOIN courses ON (lectures.course_id = courses.id)
WHERE time < ? AND time > ? AND NOT norecording
WHERE time < ? AND time > ? AND NOT norecording AND NOT external
ORDER BY time ASC''', i['date']+timedelta(weeks=2), i['date']-timedelta(weeks=2)):
# we can not use the where clause of sql to match against the time, because sqlite and mysql use a different syntax -.-
# we still use it to only get the lectures for a 3 week periode
......
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