Skip to content

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

Open
thomir wants to merge 1 commit into
pinax:masterfrom
thomir:patch-1
Open

Make timetable work with sessions that span more than one slot.#141
thomir wants to merge 1 commit into
pinax:masterfrom
thomir:patch-1

Conversation

@thomir

@thomir thomir commented Jul 23, 2016

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant