See http://docs.moodle.org/dev/Using_the_question_engine_from_module
You should use the API, rather than trying to just dump data into the database.
See http://docs.moodle.org/dev/Using_the_question_engine_from_module
You should use the API, rather than trying to just dump data into the database.