Hi Marcus,
I'll explain in detail what I am trying to achieve.
Firstly, I am not trying to create questions outside moodle. I already have questions in my moodle database. Also I am focusing only on multichoice type questions. The process of quiz creation is what I am trying to simplify. The way moodle does it, for some people, is a little complicated and difficult to understand. So I have created a wizard (a simple html, js and php application) outside moodle and fetching the courses, their categories and the questions from the moodle database instance that I have on my dev machine. I have all the data now. I am accepting the quiz title, description, start date, end date, time from the user. The course for which the quiz is being created and the questions are coming from my moodle database.
Now I am selecting the questions that I want to add to my quiz. After selecting questions, all I want to do is create the quiz in moodle and get the quiz URL. For that I will have to create an entry in my moodle database.
From what I have researched, there are multiple tables getting modified while creating quiz (for one course, only multichoice questions). They are mdl_quiz, mdl_quiz_slots, mdl_quiz_section. So is it possible via php to make these entries in the database and get my quiz up and running on the moodle? If it is how do I do it. Because in the table mdl_quiz table, there are large number of fields such as introformat, overduehandling, preferredbehaviour, and review-xxx fields for which I don't know what data to insert? So I am looking for some way to just get the quiz created in moodle.
Regards.