@@ -686,6 +686,7 @@ def find_possible_schedules(
686686 """
687687
688688 day_to_num = {"M" : 0 , "T" : 1 , "W" : 2 , "R" : 3 , "F" : 4 }
689+ whitelist = ["CIS-7000" ]
689690
690691 class Scheduler :
691692 def __init__ (self ):
@@ -744,10 +745,14 @@ def find_optimal_schedule(self, unwanted_intervals=[]):
744745 for interval in optimal_schedule :
745746 class_name = interval [2 ]
746747 sections = [i for i in optimal_schedule if i [2 ] == class_name ]
747- section = random .choice (sections )
748- if class_name not in selected_classes :
748+ if class_name not in whitelist :
749+ section = random .choice (sections )
750+ if class_name not in selected_classes :
751+ selected_classes .add (class_name )
752+ final_schedule .append (section )
753+ else :
749754 selected_classes .add (class_name )
750- final_schedule . append ( section )
755+ final_schedule += sections
751756 return final_schedule
752757
753758 def find_sections (courses ):
@@ -855,7 +860,10 @@ def choose_class_hash(given_l):
855860 hash [class_name ].append (node )
856861 for key in hash .keys ():
857862 # Chooses a random lecture for each class
858- courses .append (random .choice (hash [key ]))
863+ if key not in whitelist :
864+ courses .append (random .choice (hash [key ]))
865+ else :
866+ courses += hash [key ]
859867 return courses
860868
861869 def credit_count (sections ):
0 commit comments