Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thomir
Copy link

@thomir thomir commented Jul 23, 2016

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