Skip to content
Snippets Groups Projects
Commit 01de5dd1 authored by Julian Rother's avatar Julian Rother
Browse files

Merge branch 'master' of git.fsmpi.rwth-aachen.de:videoagwebsite/videoagwebsite

parents ee1e2382 42b02240
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ from socket import gethostname
from ipaddress import ip_address, ip_network
import math
import locale
import base64
locale.setlocale(locale.LC_ALL, 'de_DE.utf8')
......@@ -28,6 +29,7 @@ app.add_template_global(gethostname, name='gethostname')
app.add_template_global(min, name='min')
app.add_template_global(max, name='max')
scheduler = sched.scheduler()
def run_scheduler():
import time
......@@ -132,6 +134,10 @@ def evalperm(perms):
return cperms
return [{'type': 'public'}]
@app.template_filter()
def base64encode(str):
return base64.b64encode(str.encode('UTF-8')).decode('UTF-8')
@app.template_filter()
def checkperm(perms, username=None, password=None):
if ismod():
......
......@@ -47,7 +47,7 @@
<td style="white-space: nowrap;">{{i.path}}</td>
<td>"{{i.value_old}}"</td>
<td>"{{i.value_new}}"</td>
<td><button onclick="moderator.api.set('{{i.path}}','{{i.value_old}}');alert('done');" class="btn btn-default">undo</button></td>
<td><button onclick="moderator.api.set('{{i.path}}',atob('{{i.value_old|base64encode }}'));alert('done');" class="btn btn-default">undo</button></td>
</tr>
{% endfor %}
</table>
......
......@@ -13,7 +13,7 @@
{% block header %}
{{ super() }}
<meta property="og:image" content="{{ config.VIDEOPREFIX }}/{{ lecture['titlefile'] }}" />
<meta property="og:image" content="{{ config.VIDEOPREFIX }}/thumbnail/l_{{lecture.id}}.jpg" />
<meta property="og:title" content="{{ course.title }}: {{ lecture.title}}" />
<meta property="og:description" content="{{ lecture.comment }}" />
{% endblock %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment