symposion icon indicating copy to clipboard operation
symposion copied to clipboard

Make timetable work with sessions that span more than one slot.

Open thomir opened this issue 8 years ago • 0 comments

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:

ewww

With the fix, the schedule renders correctly:

ahhhh

thomir avatar Jul 23 '16 04:07 thomir