symposion
symposion copied to clipboard
Make timetable work with sessions that span more than one slot.
Imagine a conference with several rooms, some of which hold short talks, others hold longer tutorials. Currently, the timetable doesn't render correctly, since the rowspan calculation (symposion/schedule/timetable.py):
@staticmethod
def rowspan(times, start, end):
return times.index(end) - times.index(start)
is incorrect: 'times' contains both start and end times, so this only returns the correct value of the slot being calculates does not span more than one other slot. The fix is:
@staticmethod
def rowspan(times, start, end):
return max(1, (times.index(end) - times.index(start))/2)
Without this fix, the schedule renders as:
With the fix, the schedule renders correctly: