Update
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Dominic Grimm 2022-12-17 12:33:38 +01:00
parent 8c10ecf184
commit 125bbf7ff1
No known key found for this signature in database
GPG Key ID: 6F294212DEAAC530
1 changed files with 10 additions and 10 deletions

View File

@ -116,7 +116,7 @@ module Backend
end
score = 0_u32
assignment.each do |s, a|
assignment.each do |_, a|
score += a[:priority] ** 2
end
@ -135,15 +135,15 @@ module Backend
pp! best
str = String.build do |str|
str << "===========================\n"
best.not_nil![:assignment].each do |s, a|
pp! a
str << "#{Db::Student.query.find!(s).user.username} #{s} : #{Db::Teacher.query.find!(a[:teacher]).user.username} #{a[:priority]} (#{votes[s].size - a[:priority]} / #{votes[s].size})\n"
end
str << "===========================\n"
end
print str
# str = String.build do |str|
# str << "===========================\n"
# best.not_nil![:assignment].each do |s, a|
# pp! a
# str << "#{Db::Student.query.find!(s).user.username} #{s} : #{Db::Teacher.query.find!(a[:teacher]).user.username} #{a[:priority]} (#{votes[s].size - a[:priority]} / #{votes[s].size})\n"
# end
# str << "===========================\n"
# end
# print str
end
end
end