Can you take a look at this Tim and see if you think it is the right approach for mock_submit. It is a small patch and it depends on the fix for MDL-40190 which is also in the branch above.
I will right some tests for question saving which will use this method see the linked
MDL-40171 which I am working on. I think those tests will also be adequate tests for the new mock_submit method and the select elements thing.
Ah! Actually maybe I should also right some tests using some form classes written just for the purposes of testing mock_submit and for testing the select issue. Particularly I think for the select issue I need to write some tests to check that existing forms will not be affected.
So can you take a look at this patch Tim, have you a different suggestion for how mock_submit will work. In the mean time I will write some unit tests for this code and they might be done before you have had a chance to see this, I will comment here when the tests are done. I figure that I should probably submit this peer review request now though since I have filled out the form already and I do want you to look at the code if you have time.