Use alternates last

This commit is contained in:
SowinskiBraeden committed 2022-06-30 22:14:05 -07:00
1 parent 8f5e2c600c
commit 6fd8a73000
1 file changed
+3 -3
+3 -3
View File
@@ -419,9 +419,6 @@ def generateScheduleV3(
break
if not found:
# Try alternate
alternates = [alt["CrsNo"] for alt in students[student["studentIndex"]]["remainingAlts"] if alt["CrsNo"] not in flex and alt["CrsNo"] in courseRunInfoCopy]
if len(alternates) == 0: # If not alternates, create critical error
# Determine all places class exists
existsIn, existingClassNames = [], []
for block in running:
@@ -454,6 +451,9 @@ def generateScheduleV3(
break
if not solution:
# Try alternate
alternates = [alt["CrsNo"] for alt in students[student["studentIndex"]]["remainingAlts"] if alt["CrsNo"] not in flex and alt["CrsNo"] in courseRunInfoCopy]
if len(alternates) == 0: # If not alternates, create critical error
c_cr_count += 1
criticalCount += 1
if not newConflict(student["Pupil #"], "", "Critical", "C-CR", "Couldn't Resolve", conflictLogs): studentsCritical += 1