XML import/export now includes images (1.6)

XML import/export now includes images (1.6)

by Howard Miller -
Number of replies: 8
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The quiz XML import/export format in 1.6 CVS now supports the actual image files encoded in 'base64' with the additional <image_base64> xml tag.

Any testing and/or comments appreciated.
Average of ratings: -
In reply to Howard Miller

Re: XML import/export now includes images (1.6)

by Dennis Daniels -
Hi Howard,

Do you have a sample of the xml import code with the image?

And, better yet, do you have a html/javacript page to help teachers/users prepare the xml formatted questions for import? Nothing I'm aware of comes close to being useful for quiz question creation...

all the best,
Dennis
In reply to Dennis Daniels

Re: XML import/export now includes images (1.6)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I always thought of this format as a reasonably comprehensive way of 'backup up' a block of questions, so I've never thought much about producing an off-line editor (or had the time).

The quickest way to see the format, is to export some questions with attached images. The image binary is encoded with PHP's base64_encode() function.
In reply to Howard Miller

Re: XML import/export now includes images (1.6)

by Vyatcheslav Yatskovskiy -
Hello to you, Howard, and your cats. smile
I'm eager to test the feature but I cannot get fresh files from CVS (I am green with it). I'm just going to http://cvs.moodle.com and then CVS at moodle/moodle/question/format/xml/format.php shows me an old version (1.3).
How can I get through?
In reply to Vyatcheslav Yatskovskiy

Re: XML import/export now includes images (1.6)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The web based CVS system is always a few hours behind. You will probably find it is up to date now. The only files that changed where question/format.php and question/format/xml/format.php
In reply to Howard Miller

Re: XML import/export now includes images (1.6)

by Vyatcheslav Yatskovskiy -
Thank you, Howard. I have updated my template at http:/finemetronome.com/moodle/ to support <image_base64> tag, and it works fine. This is just I was asking for in bug #4955. Let me show you a screenshot of my MSWord sample questionnarie.
Suggestions are welcome.
Attachment 2006-04-23_164447.png
In reply to Vyatcheslav Yatskovskiy

Re: XML import/export now includes images (1.6)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Shall we put this (and Timothy Takemoto's GIFT stuff) in a quiz tools folder in contrib? It might be easier for people to find... me in particular smile
In reply to Howard Miller

Re: XML import/export now includes images (1.6)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Good idea. That is 'contrib/quiz_tools' as the folder name.

Also, people who want to add their question types to contrib, please can you put them there in folders called 'contrib/qtype_[mytype]', where you replace the [mytype] bit with a sensible type name. This is the best thing to do with new question types, my plan is (I think) to be very, very cautions about adding new question types to core. Instead I want to make it as easy as possible to install and uninstall question types from contrib. (This is a long-term plan).

Thanks,

Tim.