The problem is that http://docs.moodle.org/dev/Question_database_structure documents how things used to work in Moodle 1.9.
http://docs.moodle.org/dev/Overview_of_the_Moodle_question_engine#Database_tables is the right documentation for Moodle 2.1 and later.
I really should have sorted all this out by now, but I have not. Sorry.
Tim Hunt
Posts made by Tim Hunt
Point deduction in interactive behaviour is similar to adaptive mode. (It is exactly the same for question types like shortanswer and numerical. It is different for multi-part questions like matching.)
The best way to experiment with questions, to test your hypotheses about how things work, is to use the question preview icon in the question bank. That lets you control all the options that affect the preview.
There has been talk about using the hints in interactive behaviour, as well as the specific feedback, but no one has got as far as implementing that change yet.
Not possible.
How likely is it that the student accidentailly clicks on the wrong choice? I think separate clicks to select your choice, and then move on, are better in many situations.
If anyone wanted to try to implement this, then it would probably just require adding a small bit of JavaScript to the page.
Those helper.php files are designed or use from unit tests. Have a look at how the files tests/walkthrough_tests.php in most question types work.
$record = rs_fetch_record($rs) is not Moodle 2.x-style code.
I don't know about the OTHER one - except that, after the $sql parameter, surely you need a $params array?