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
83d39362
Commit
83d39362
authored
8 years ago
by
Julian Rother
Browse files
Options
Downloads
Patches
Plain Diff
Added "external" property for courses (#213)
parent
25683ada
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
db_schema.sql
+2
-1
2 additions, 1 deletion
db_schema.sql
edit.py
+2
-1
2 additions, 1 deletion
edit.py
templates/course.html
+1
-0
1 addition, 0 deletions
templates/course.html
timetable.py
+1
-1
1 addition, 1 deletion
timetable.py
with
6 additions
and
3 deletions
db_schema.sql
+
2
−
1
View file @
83d39362
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
edit.py
+
2
−
1
View file @
83d39362
...
...
@@ -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
'
,
...
...
This diff is collapsed.
Click to expand it.
templates/course.html
+
1
−
0
View file @
83d39362
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
timetable.py
+
1
−
1
View file @
83d39362
...
...
@@ -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
...
...
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