learning-unlimited/ESP-Website — pull request #973 by pricem (2014-01-24 03:33:14+00:00)
Title: Work around Ajax scheduler failure for non-integer-hour classes

Yale reported that they were unable to schedule a 1.5 hour class into a
single 1.5 hour time block that was not contiguous with any other time
blocks (#972). It was not hard to find the reason why since Ruthie put a helpful
comment by the relevant code saying that it wouldn't work in that case.

The Ajax scheduling module makes dangerous assumptions about class and
timeslot lengths (e.g. integer hours, non-overlapping) in other places, so
this is not an attempt to fix the general problem, just an attempt to fix
the immediate problem without breaking anything else.

The check in question was designed to prevent scheduling a class into a
start time that was too late for the class to finish by the end of the
program (or the end of a contiguous set of timeslots). It has been
modified to count time in milliseconds rather than hours.