Update
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
8c10ecf184
commit
125bbf7ff1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue