R script for converting spreadsheet quiz questions into Moodle XML

R script for converting spreadsheet quiz questions into Moodle XML

by Randy Cragun -
Number of replies: 5

This is an R script to turn a spreadsheet with quiz questions into a Moodle XML file. I included an example spreadsheet. I wrote up a quick start guide, but I can only upload two files. Feel free to modify for personal use. If you make useful modifications, please share them with me. I have only written support for multichoice (single correct answer), shortanswer, or truefalse question types. I have only tested this with Moodle 3.7.

Average of ratings: Useful (3)
In reply to Randy Cragun

Re: R script for converting spreadsheet quiz questions into Moodle XML

by Randy Cragun -

Here is a guide.

Average of ratings: Useful (3)
In reply to Randy Cragun

Re: R script for converting spreadsheet quiz questions into Moodle XML

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Randy,

Thank you very much for sharing this tool, which will definitely be very useful to many. I am sure that the Moodler community greatly appreciates your gesture in these uncertain times.

In reply to Randy Cragun

Re: R script for converting spreadsheet quiz questions into Moodle XML

by yanys wessels -

Thanks a lot.
Very useful..

I'm looking for a LIbreOffice adaptation.... and other types of questions.

Cordially

yanys.. .

In reply to yanys wessels

Re: R script for converting spreadsheet quiz questions into Moodle XML

by Randy Cragun -
Sorry I missed your comment, yanys.

I have added support for csv files, which should be sufficient for anyone using LibreOffice. The only reason I made Excel files the default is that I assume that many users do not know what a csv file is.

Can you tell me which question types are most important to you? Having an example XML file to work from helps me, so if you write a question, export it to Moodle XML, and give me the XML file, I will work on coding that question type.
In reply to Randy Cragun

Re: R script for converting spreadsheet quiz questions into Moodle XML

by Randy Cragun -
Update:

I made a web application that you can easily use without knowing R: https://randycragun.shinyapps.io/MoodleQ/

I also fixed some bugs, coded support for Markdown formatting, updated the instructions, and made a better example spreadsheet. I am still struggling to get broad unicode character support (it works on my local machine but not in the web application).
Average of ratings: Useful (1)