fix conflict solutions

This commit is contained in:
SowinskiBraeden committed 2022-11-30 10:32:03 -08:00
1 parent c58d18ed64
commit 603431a8e9
2 files changed
+6 -4

No files matched your search

+3 -2
View File
@@ -24,7 +24,8 @@ def newConflict(
"Code": code, "Code": code,
"Conflict": description "Conflict": description
} }
logs[pupilNum] = [log] if not exists else logs[pupilNum].append(log) if exists: logs[pupilNum].append(log)
else: logs[pupilNum] = [log]
return exists if conflictType == "Critical" else False return exists if conflictType == "Critical" else False
def insertConflictSolutions( def insertConflictSolutions(
@@ -37,7 +38,7 @@ def insertConflictSolutions(
conflict["Missing"] = data conflict["Missing"] = data
break break
# V3 diffelogrs a lot by V1/2 as it does not focus on fitting the classes # V3 differs a lot by V1/2 as it does not focus on fitting the classes
# into the time table first. # into the time table first.
# It starts by trying to get all classes full and give all students a full class list. # It starts by trying to get all classes full and give all students a full class list.
# Then it starts to attempt to fit all classes into a timetable, making corretions along # Then it starts to attempt to fit all classes into a timetable, making corretions along
+3 -2
View File
@@ -34,10 +34,11 @@ function start() {
} }
eel.expose(post_data); eel.expose(post_data);
function post_data(msg) { function post_data(msg, warn=false) {
let newMessage = document.createElement('li'); let newMessage = document.createElement('li');
newMessage.innerText = msg; newMessage.innerText = msg;
newMessage.className = 'nostyle'; newMessage.className = 'nostyle';
if (warn) newMessage.style = 'color:yellow;';
document.getElementById('progress').appendChild(newMessage) document.getElementById('progress').appendChild(newMessage)
} }
@@ -59,7 +60,7 @@ function finish_callback(error) {
while (data.firstChild) { while (data.firstChild) {
data.removeChild(data.firstChild); data.removeChild(data.firstChild);
} }
post_data('Individual student schedules can be found in the \'/output/final/student_schedules/\' folder and the master timetable as well as student with conflicts can be found in the \'/output/final/\' folder.') post_data('Success! The master timetable as well as student with conflicts can be found in the \'/output/final/\' folder.')
} }
document.getElementById('loader').style.display = 'none'; document.getElementById('loader').style.display = 'none';