ywwg / ffagc

Firefly Art Grant Core Website
0 stars 1 forks source link

fix voter assignment algorithm once and for all #36

Closed ywwg closed 7 years ago

ywwg commented 7 years ago

ONCE AND FOR ALL

What it's trying to do is cycle through all the submissions and assign each one to three different voters so that three people look at every submission. But it's buggy (if voter count < 3) and not random. Clean that shit up, and also try to make it so that redoing the assign button doesn't blow everything away.

ywwg commented 7 years ago

We need to know which voters to assign to, so this depends on #37

ywwg commented 7 years ago

ok new algorithm:

for each grant:
  get set of eligible voters (verified and can participate)
  for each submission in that grant:
    while assignment count is less than min(3, voter count):
       find voter in set with fewest assignments
       assign voter that submission