Skip to content
Snippets Groups Projects
Commit 4275361f authored by Andreas Valder's avatar Andreas Valder
Browse files

removed ical export for semester, fixed ical export for sogo

parent 3da7f336
No related branches found
No related tags found
No related merge requests found
from server import * from server import *
import icalendar import icalendar
from werkzeug.datastructures import Headers from werkzeug.datastructures import Headers
from datetime import timedelta from datetime import timedelta, datetime
def export_lectures(lectures, name): def export_lectures(lectures, name):
cal = icalendar.Calendar() cal = icalendar.Calendar()
...@@ -17,7 +17,9 @@ def export_lectures(lectures, name): ...@@ -17,7 +17,9 @@ def export_lectures(lectures, name):
event.add('summary', c['short']+' : '+l['title']) event.add('summary', c['short']+' : '+l['title'])
event.add('description', l['internal']) event.add('description', l['internal'])
event.add('uid', 'lecture_'+str(l['id'])+'@rwth.video')
event.add('comment', l['comment']) event.add('comment', l['comment'])
event.add('dtstamp', datetime.utcnow())
event.add('categories', c['short']) event.add('categories', c['short'])
event.add('dtstart', l['time']) event.add('dtstart', l['time'])
event.add('location', l['place']) event.add('location', l['place'])
......
...@@ -60,14 +60,6 @@ ...@@ -60,14 +60,6 @@
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-{{ g.grouper|tagid }}" href="#{{g.grouper|tagid}}" style="color: #222;"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-{{ g.grouper|tagid }}" href="#{{g.grouper|tagid}}" style="color: #222;">
{% if groupedby == 'semester' %} {% if groupedby == 'semester' %}
<h1 class="panel-title">{{g.grouper|semester(long=True)}} ({{g.list|length}} Veranstaltungen) <h1 class="panel-title">{{g.grouper|semester(long=True)}} ({{g.list|length}} Veranstaltungen)
<ul class="list-inline pull-right">
{% if ismod() %}
<li>
<a class="fa fa-calendar" aria-hidden="true" href="{{url_for('ical_semester', semester=g.grouper)}}" style="text-decoration: none"></a>
</li>
{% endif %}
</ul>
</h1> </h1>
{% else %} {% else %}
<h1 class="panel-title">{{g.grouper}}</h1> <h1 class="panel-title">{{g.grouper}}</h1>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment