I need advice about programming to create a new type of question using a flash file.
Indeed. My goal is to create a question using a flash file previously filed by the teacher when creating the question moodle.
I want the flash movie displayed for students and when they click in the flash file, the answer is transmitted in the response field of my new type of question.
The problem is that I can not properly configure the filemanager in the file "edit_myquestiontype_form.php" for it saves correctly the swf file so I can reuse it in the file "renderer.php." The only documentation I found is this but it is not detailed enough.
Thank you for your help.
Well, that is the right documentation to be reading. You may find it more helpful to look at some other Moodle code that does what you want and works, rather than just reading the docs. https://github.com/jamiepratt/moodle-qtype_ddimageortext might be a good model.
Thank you. The example helped me a lot. I almost managed to set up a working example.
The only thing I notice is that when I specify a file in the file picker, I save the form and when I open again the file picker says: "No file submitted." I can not find the code that calls this file in the list when opening the form.
There is a function you have to call to copy the files into the right draft file area before you display the form. It should be there in the ddimagetoimage qtype.
He was there indeed. I copied the code but I had not renamed the qtype to the one of my type of question in the method data_preprocessing. I'll put it under the account of tiredness because it was late ... Sorry and thank you our your help, it works fine now!