0366ef262a
There were two main problems: 1. The unit tests for upgrading adaptive quiz attempts had slighly the wrong $expectedqa, and so matching that the upgrade was doing the wrong thing in certain situations. The main issue was that it was setting -_try = 1 on the first step, which broke the penalty calculation when the quiz was regraded. There were also some other subtleties with incrementing -_try that were not right before. 2. It was possible in 2.0 and earlier for two question_states to get the same seq_number, and restoring 2.0 backups was rashly assuming that that was unique.