Use alternates last
This commit is contained in:
1 file changed
+3
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user