Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jannik Hellenkamp
website
Commits
25683ada
Commit
25683ada
authored
8 years ago
by
Julian Rother
Browse files
Options
Downloads
Patches
Plain Diff
Added norecording property to lectures, closes #213
parent
54ae3ace
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
db_schema.sql
+2
-1
2 additions, 1 deletion
db_schema.sql
edit.py
+2
-1
2 additions, 1 deletion
edit.py
server.py
+1
-1
1 addition, 1 deletion
server.py
templates/macros.html
+2
-1
2 additions, 1 deletion
templates/macros.html
timetable.py
+1
-1
1 addition, 1 deletion
timetable.py
with
8 additions
and
5 deletions
db_schema.sql
+
2
−
1
View file @
25683ada
...
@@ -98,7 +98,8 @@ CREATE TABLE IF NOT EXISTS `lectures_data` (
...
@@ -98,7 +98,8 @@ CREATE TABLE IF NOT EXISTS `lectures_data` (
`time_updated`
datetime
NOT
NULL
,
`time_updated`
datetime
NOT
NULL
,
`jumplist`
text
NOT
NULL
DEFAULT
''
,
`jumplist`
text
NOT
NULL
DEFAULT
''
,
`titlefile`
varchar
(
255
)
NOT
NULL
DEFAULT
''
,
`titlefile`
varchar
(
255
)
NOT
NULL
DEFAULT
''
,
`live`
INTEGER
NOT
NULL
DEFAULT
0
`live`
INTEGER
NOT
NULL
DEFAULT
0
,
`norecording`
INTEGER
NOT
NULL
DEFAULT
0
);
);
CREATE
TABLE
IF
NOT
EXISTS
`places`
(
CREATE
TABLE
IF
NOT
EXISTS
`places`
(
`place`
varchar
(
20
)
NOT
NULL
PRIMARY
KEY
,
`place`
varchar
(
20
)
NOT
NULL
PRIMARY
KEY
,
...
...
This diff is collapsed.
Click to expand it.
edit.py
+
2
−
1
View file @
25683ada
...
@@ -41,7 +41,8 @@ editable_tables = {
...
@@ -41,7 +41,8 @@ editable_tables = {
'
duration
'
:
{
'
type
'
:
'
duration
'
},
'
duration
'
:
{
'
type
'
:
'
duration
'
},
'
jumplist
'
:
{
'
type
'
:
''
},
'
jumplist
'
:
{
'
type
'
:
''
},
'
deleted
'
:
{
'
type
'
:
'
boolean
'
},
'
deleted
'
:
{
'
type
'
:
'
boolean
'
},
'
live
'
:
{
'
type
'
:
'
boolean
'
}},
'
live
'
:
{
'
type
'
:
'
boolean
'
},
'
norecording
'
:
{
'
type
'
:
'
boolean
'
}},
'
creationtime_fields
'
:
[
'
course_id
'
,
'
time_created
'
,
'
time_updated
'
]
},
'
creationtime_fields
'
:
[
'
course_id
'
,
'
time_created
'
,
'
time_updated
'
]
},
'
videos
'
:
{
'
videos
'
:
{
'
table
'
:
'
videos_data
'
,
'
table
'
:
'
videos_data
'
,
...
...
This diff is collapsed.
Click to expand it.
server.py
+
1
−
1
View file @
25683ada
...
@@ -331,7 +331,7 @@ def index():
...
@@ -331,7 +331,7 @@ def index():
SELECT lectures.*,
"
course
"
AS sep, courses.*
SELECT lectures.*,
"
course
"
AS sep, courses.*
FROM lectures
FROM lectures
JOIN courses ON (lectures.course_id = courses.id)
JOIN courses ON (lectures.course_id = courses.id)
WHERE (time > ?) AND (time < ?) and lectures.visible and courses.visible and courses.listed
WHERE (time > ?) AND (time < ?) and lectures.visible and courses.visible and courses.listed
and not lectures.norecording
ORDER BY time ASC LIMIT 30
'''
,
start
,
end
)
ORDER BY time ASC LIMIT 30
'''
,
start
,
end
)
for
i
in
upcomming
:
for
i
in
upcomming
:
i
[
'
date
'
]
=
i
[
'
time
'
].
date
()
i
[
'
date
'
]
=
i
[
'
time
'
].
date
()
...
...
This diff is collapsed.
Click to expand it.
templates/macros.html
+
2
−
1
View file @
25683ada
...
@@ -165,7 +165,7 @@ $('#embedcodebtn').popover(
...
@@ -165,7 +165,7 @@ $('#embedcodebtn').popover(
{% endmacro %}
{% endmacro %}
{% macro lecture_list_item(lecture,videos,global_permissions) %}
{% macro lecture_list_item(lecture,videos,global_permissions) %}
<li
class=
"list-group-item"
id=
"lecture-{{lecture.id}}"
>
<li
class=
"list-group-item
{% if lecture.norecording %} text-muted{% endif %}
"
id=
"lecture-{{lecture.id}}"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
style=
"background-image: url('{{ config.VIDEOPREFIX }}/thumbnail/l_{{lecture.id}}.jpg')"
class=
"col-sm-2 col-xs-12 thumbnailimg"
>
<div
style=
"background-image: url('{{ config.VIDEOPREFIX }}/thumbnail/l_{{lecture.id}}.jpg')"
class=
"col-sm-2 col-xs-12 thumbnailimg"
>
{% if not videos|length is equalto 0 %}
{% if not videos|length is equalto 0 %}
...
@@ -189,6 +189,7 @@ $('#embedcodebtn').popover(
...
@@ -189,6 +189,7 @@ $('#embedcodebtn').popover(
<li>
{{ moderator_editor(['lectures',lecture.id,'internal'], lecture.internal) }}
</li>
<li>
{{ moderator_editor(['lectures',lecture.id,'internal'], lecture.internal) }}
</li>
<li>
Sichtbar: {{ moderator_checkbox(['lectures',lecture.id,'visible'], lecture.visible) }}
</li>
<li>
Sichtbar: {{ moderator_checkbox(['lectures',lecture.id,'visible'], lecture.visible) }}
</li>
<li>
Livestream geplant: {{ moderator_checkbox(['lectures',lecture.id,'live'], lecture.live) }}
</li>
<li>
Livestream geplant: {{ moderator_checkbox(['lectures',lecture.id,'live'], lecture.live) }}
</li>
<li>
Wird nicht aufgenommen: {{ moderator_checkbox(['lectures',lecture.id,'norecording'], lecture.norecording) }}
</li>
<li>
Hörsaal: {{ moderator_editor(['lectures',lecture.id,'place'], lecture.place) }}
</li>
<li>
Hörsaal: {{ moderator_editor(['lectures',lecture.id,'place'], lecture.place) }}
</li>
{% endif %}
{% endif %}
</ul>
</ul>
...
...
This diff is collapsed.
Click to expand it.
timetable.py
+
1
−
1
View file @
25683ada
...
@@ -26,7 +26,7 @@ def timetable():
...
@@ -26,7 +26,7 @@ def timetable():
SELECT lectures.*, courses.short,
"
course
"
AS sep, courses.*
SELECT lectures.*, courses.short,
"
course
"
AS sep, courses.*
FROM lectures
FROM lectures
JOIN courses ON (lectures.course_id = courses.id)
JOIN courses ON (lectures.course_id = courses.id)
WHERE time < ?
and
time > ?
WHERE time < ?
AND
time > ?
AND NOT norecording
ORDER BY time ASC
'''
,
i
[
'
date
'
]
+
timedelta
(
weeks
=
2
),
i
[
'
date
'
]
-
timedelta
(
weeks
=
2
)):
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 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
# we still use it to only get the lectures for a 3 week periode
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment