94ac7a87fa
In order to do this in a sane way, I cleaned up a lot of old mess, inclduing: 1. Previously, qtype_calcuated used ->answeres when importing, and ->answer when saving the form. This was crazy, so I fixed it, and stripped out the code that made the alternative variable name work. 2. Similarly, it could handle ->answer being either an array, such as you would get form the HTML editor, or a simple string, which is what you get form the form. I simplified that too. 3. Finally, I made import use a transaction around saving each question, so we don't get half questions in the database when an error occurs.