learning-unlimited/ESP-Website — Issue #10: LSR Doesn't Handle Duplicate Registrations Correctly
Author: jmoldow
Created: 2011-11-05 04:49:35+00:00
State: open
Labels: Error

It is possible (as we've seen) for the LSR interface to grand duplicate registrations. The LSR script doesn't handle this at all.

"The lottery code chooses a priority registration at random from this:

priority_ids = StudentRegistration.valid_objects().filter(user=user,
section__parent_class__parent_program=program,
relationship__name=priority_type).va\
lues_list('section', flat=True).distinct()

distinct() removes duplicate rows. Unfortunately, I don't think that
multiple registrations for a student will count as duplicate rows,
since they won't have the same start time (which is in the
StudentRegistration model." - Ruthie Byers

Therefore, students with more student registrations will have an unfair advantage. We should, of course, fix the bug that grants duplicate registrations in the first place (issue #3), but we should also have a contingency plan for dealing with this in the LSR script itself.