Skip to content
Snippets Groups Projects
Commit 248a3311 authored by Jonathan Weth's avatar Jonathan Weth :keyboard: Committed by root
Browse files

Merge pull request #251 from Katharineum/master

Bug fixes in timetable (issue #248)
parents f72b3aac 96fd00da
No related branches found
No related tags found
1 merge request!86Merge school-apps
{% if not sub.is_event %}{% if sub.sub.type == 3 %}
{{ sub.sub.corridor.name }}
{% elif sub.sub.type == 1 or sub.sub.type == 2 %}
{% elif sub.sub.roow_new and sub.sub.room_old %}
{% templatetag openbrace %}{{ sub.sub.room_old.shortcode }}}
{% elif sub.sub.room_new and sub.sub.room_old %}
\sout{% templatetag openbrace %}{{ sub.sub.room_old.shortcode }}}
$\rightarrow$
{{ sub.sub.room_new.shortcode }}
{% elif sub.sub.room_new and not sub.sub.room_old %}
......
......@@ -4,7 +4,7 @@
{{ sub.sub.corridor.name }}
{% elif sub.sub.type == 1 or sub.sub.type == 2 %}
{# Canceled lesson: no room #}
{% elif sub.sub.roow_new and sub.sub.room_old %}
{% elif sub.sub.room_new and sub.sub.room_old %}
{# New and old room available #}
<span class="tooltipped" data-position="bottom"
data-tooltip="{{ sub.sub.room_old.name }} → {{ sub.sub.room_new.name }}">
......
......@@ -131,9 +131,10 @@ def get_plan(type, id, smart=False, monday_of_week=None):
if subs_for_weekday[time.day - 1].get(lesson.id, None) is not None:
for sub in subs_for_weekday[time.day - 1][lesson.id]:
# ... check whether the sub has the right old teacher and the right lesson number
if sub["sub"].teacher_old.id == element.teacher.id and \
sub["sub"].lesson == time.hour and sub["table"].is_event is False:
matching_sub = sub
if sub["sub"].teacher_old is not None and element.teacher is not None:
if sub["sub"].teacher_old.id == element.teacher.id and \
sub["sub"].lesson == time.hour and sub["table"].is_event is False:
matching_sub = sub
# If the lesson matches, add it to the list of already added subs
if matching_sub:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment