There were a number of lang strings in suboptimal places.
This commit fixes that, and also removed some unused strings.
AMOS BEGIN
MOV [addmorechoiceblanks,qtype_multichoice],[addmorechoiceblanks,question]
MOV [youmustenteramultiplierhere,qtype_calculated],[youmustenteramultiplierhere,qtype_numerical]
AMOS END
1/ type/match/tests/walkthrough_test.php - tests are failing randomly, looks like some weird randomisation is going on there - see TODOs
2/ type/multianswer/tests/upgradelibnewqe_test.php contains invalid expected value - see TODO
This was one of those innocent seeming issues where, once you start
digging, you find a mess. In this case, the code that is now in
question_wizard_form::add_hidden_fields used to exist in four different
places, in four inconsistent versions. This is now all nicely
re-factored, and that solves the problem.
Along the way, I found and fixed some wrong string references in
qtype_random, and stripped out some unnecessary &s in function
declarations.
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.