Skip to content

Instantly share code, notes, and snippets.

@chris-held
Created August 28, 2013 04:12
Show Gist options
  • Select an option

  • Save chris-held/6362072 to your computer and use it in GitHub Desktop.

Select an option

Save chris-held/6362072 to your computer and use it in GitHub Desktop.
_.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