Created
August 28, 2013 04:12
-
-
Save chris-held/6362072 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _.each(subjects, function(subject){ | |
| //find all teachers that teach this subject that have available blocks | |
| //if this subject has preferred times / days, check if any teacher has those | |
| //blocks / days open, and if so assign by setting available to false on both the | |
| //special teacher and class schedule, and adding class / teacher / subject taking up that | |
| //slot | |
| //if preferred block isn't available, put this class wherever there's room | |
| //if no blocks are available, add this subject to a list that will display | |
| //outside of the schedule as an error | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment