I had to develop a little tool for work and decided to upload it with a little manual to give something back to the Moodle Community.
Basically, it allows you to prepare Short Answer and/or Multiple Choice questions in Excel and then export the same questions in the two formats.
Of course, you can use it for one format only, but this way students can practise the same subject in two different ways.
It works fine now, although there may be some bugs (but I do think I got them all). Feel free to use, distribute or modify it as you need.
If you encounter bugs, please post them here and I'll have a look.
Hope it'll be useful to others!
Here's the background:
At our language institute, we wanted to create vocabulary exercises that could be both "receptive" and "productive": in a first stage, the student would practise with MC questions (more "receptive" and then when he feels confident enough, switch to "productive" mode with short answer questions. So the same input should be exported as both Short Answer and MC question...
After some looking around, I couldn't find a gift import template that fitted our needs (we needed support for all feedbacks as well as some formatting of the text) and decided to start from David Fountain's MoodleGlossary Import to get our customised tool... Took me a good week but I think I got it, so here it is. The hardest part was probably to detect the possible errors and prevent users from entering invalid data for grades or leave important fields empty (wanted to make it user-friendly for non-experienced users).
Thanks a lot and you've clearly put a lot of work into making this.
In particular, the ability to make multi-choice questions without the abc numbering was most appreciated and will be a real timesaver for my current needs.
It's sorted, and other minor bugs too.
The latest version can be found here: http://moodle.org/mod/glossary/view.php?id=2741&mode=entry&hook=8061
Drag & Drop Matching and Drag & Drop Ordering
It's all here again: http://moodle.org/mod/glossary/view.php?id=2741&mode=entry&hook=8061
Details and latest version here:
could you please suggest, how to add a new field prior to the Question Name field in Excel template?
Hi Jean Luc,
thanks a lot for your template.
I' m using Moodle version 1.9.6, and I had trouble importing the file in Moodle.I 'm supposed to import a thoudands of questions, and your display via excel would help me a lot!
If you have any suggestion to make it work, it would be great!
Problem solved, but is it possible to add a file to a question (annex).I know it is on Moodle, but is there the option in XL?
sorry, completely lost track of this discussion.
Sorry, I haven't considered files, not, like Howard said, because they are not supported in XML, as I did not know that, but that I did not really have use for it at that time.
What I do when I need files, more specifically sound files, is I upload them first, then play around with html code so that the question text - or answers, or MCQ - have a hyperlink to the file. For multiple questions, I use the concatenate function...
A tad hard to explain in a few words, also because it depends on what you are looking for, your configuration...
Thanks for your excellent template. I have used it to transfer questions from from educatienet to Moodle. We will now manage our questions in your xls and upload it to moodle when we change a range of questions.
I have modified it to enable multiple categories and with a small hack in Moodle I was able to use only update changed questions.
We are now looking for a way of adding more than 250 questions. Do you think this can be done?
Yes, over 250 questions can certainly be done... But... I'd have to dive back in it and just don't have time for that now... Sorry. Could only suggest to use multiple files.
I'm interested in your mod, for the categories. Could you send me a copy? (pm)
Is there any workarounds to help me out?
- Start Excel file and allow macros
- Save as Excel/macro file
- Start new file with macros
You could try using Office on Windows, or else use Excel 2004 for the Mac, which does support VBA.
You could also run a Windows emulator on your Mac and install the Windows version of Excel 2003/7.
Apparently, the next release of Office for the Mac (2012) will support VBA again.
I'm looking into possible changes for Moodle 2.0, but that'll have to wait until I find more time (or I can avoid sleeping ^^)
a new version of the Excel to Moodle XML question exporter is available.
You can now add hints for the questions and the choices, using automatically generated <cite> tags. More info in the manual.
It's still not optimised for Moodle 2.0 as we have not upgrade yet, and I haven't been able to look further into that, but I hope to be able to do that soon...
Two available files: Office 2010 and Office 2003 (haven't tested that one though)
You can download them here:
seems like the entry is hidden and I can't change that? Can anyone confirm they have access to the entry to download last versions of the files?
sorry I cant download the file. Ther is no entery I can see.
Can ou add it as attachment?
It is the old problem where when one of these downloads is edited, it disappears until a moderator re-approves it. I don't have permission to do that, but I am sure someone will deal with it soon.
ok thanks, we'll just wait for that I can't attach it here as size here is limited to 100K and the zip file's bigger than that... in the meantime you can get it here (I'll remove it from there once the entry's approved again)
Ok, as the entry in the exchange course remains hidden for some reason, and just to summarise the system, I'm adding a longer post to the thread.
For those who just want the latest version, here are the DL links:
version 2.0.1 with possibility to import from 1.3.4 (see below)
I'll probably have to move them soon...If so, I'll add a post with the new links.
Those files are intended to create questions in Excel and export them as Moodle.XML format. I added the possibility to add hints in version 2.0, and fix a stupid bug for shuffle answer default value in 2.0.1...
As some colleagues had done quite a lot of questions this way and had kept the Excel files, I've made a different version that makes it possible to import questions from a version 1.3.x of the excel file, so you can add hints without having to copy/paste all the info.
Here are a few features, more details in the manual in the zip file:
- Supports Multiple Choice, Short Answer, Matching, Ordering and True/False
- Up to 250 questions per question type, up to 10 answers for MC & SA, 20 for matching, 25 items for Ordering.
- Supports HTML in Question Text and all Feedback cells.
- Easily convert Multiple Choice questions in Short Answer questions and the other way around.
- Supports non-English characters and excel line breaks (true UTF-8 export)
- Possibility to automatically add <nolink> tags to prevent auto-linking to glossaries in quizzes.
- Define grades
- Before export, all questions are checked for errors (grades, question name, etc... ) to ensure Moodle compatibility. Errors are explained.
- Manual included
- possibility to add "hints" on the questions (all) and the choices (MC & Matching) (see manual for more info)
- option to hide/unhide feedback & hint fields if you don't want to use them.
I'll try and keep an eye on the thread, so if you have any question/suggestion, or notice any bugs, please post them here.
The download links in the previous post are broken as there were some errors in the code. I've spent some time looking into it and here are the newer versions of the spreadsheet. I took more time to test them, and they seem to work fine (but you never know)
Also changed some codes so it runs a little bit faster on the checks.
There are two versions (Excel 2003 & 2010 included in each "package"):
- Simple hints: this version uses the HTML cite tag to add hints to questions and/or choices. The hints will display in a textbox on mouseover.
advantages: no tweaks necessary to the moodle theme. Compatible with most browsers.
disadvantage: no html formatting or line breaks in the hint
- CSS hints: not the best name, I guess, but at least it makes it simple: it uses CSS formatting to display hints.
advantage: (simple) HTML formatting is possible, line breaks, bold, italics... (no links though)
disadvantage: you need to add some info to your theme's CSS. It's all included in the zip-file.
Please note I have only made tests with simple formatting like bold, italics, underline, strikethrough and line breaks.
(Note: should the links be broken, check in the posts below if any, it'd just mean that I had to move the files or updated the file)
This "hint" system has nothing to do with what's in store for the question in Moodle 2.1, of what I've read (and am looking forward to). It's just formatting, so you can't specify a penalty if students access the hints. We only use this for what we call "learning quizzes": students can take those quizzes as many times as they want and use hints and feedback to improve their understanding of the task (mainly reading / listening).
As usual, comments welcome.
I'll also update the entry in the exchange course.
(BTW, if anyone has a good free filesharing system to recommend, so I can upload the files there rather than from our servers - can't attach them here as they're too big)
Hey there, this tool is absolutely fantastic and I love using it.
I have found one bug though. On the short answer sheet, cell Q3 places a hidden apostrophe at the beginning of the cell in the formula field but it is not visible in the cell itself. Once exported it also appears within the questions answer. I can manually look for this each time and delete it but i think it would make more sense to determine whats causing that.
In the mean time I have done something that I think works...I unprotected the short answer and mult choice sheets and copied cells A3-AQ253 on the multiple choice sheet and pasted them over the same cells in the short answer sheet. Since these two sheets are essentially the exact same thing i figure this should be no issue. Once complete i re-protected them and saved a new copy. It seems to have worked but I want to make sure I havent messed anything up.
ALSO PS: Ubuntu offers a new file cloud for free which offers web sharing called Ubuntu One(https://one.ubuntu.com/). That should work for your needs
Thanks in advance for your help
Thank you very-very-very much!!!! All is Fine! I have about 11 000 questions in excel and all are in moodle now. Thanks!!!
We corresponded a few times in 2010 about a specialized use of this tool. That worked great.
Now I am back again and trying it in our new Moodle 2 site. It works -- so far -- without a hitch.
BUT it will only work off a Windows version of Excel. Others may, like me, attempt to run it off of a Mac version of Excel. When one launches the exporter (in this case I had just one T/F item entered) the following Run-time error (1004) comes up:
Method 'GetSaveAsFilename' of object '_Application' failed.
Running Debug takes you to a line of code that reads:
varFileX=Application.GetSaveAsFilename("MoodleTrueFalseQuestions_Hints_Nolinks.xml",FileFilter:=Moodle Short Answer XML (*.xml),*.xml")
I googled the problem and find that the clearest explanation appears to be here:
I don't understand enough to be sure how to implement this in your coding. Perhaps you or another user may be able to extend the useability for Macs!
All the best to you, and thanks again for this amazing tool!
The links dont seem to be working, can you reupload them please?
I wasnt able to download the files, is the link broken?
Thank you, the original one is amazing.
Link broken. You can reupload this version?
I have lost track of this discussion. Sorry for the lack of replies/Updates;
Here is a link to a dropbox folder with the latest versions of the file.
- one zip file with what I called the "simple hints" version
- one zip file with "CSS hints"
PLEASE bear in mind the hints in those 2 versions DO NOT correspond to the hints system in Moodle. Read the manual for more info;
I am currently working on a new version of the file, which exports formatting (bold, italics, underlined, colours), real moodle hints and tags. It's progressing well (SA & MCQ are done) but I still need to work on Matching and TF, update the manual and improve the layout... We have quite a few things to finish at work at the moment so that might have to wait until.. early August (I hope).
I have included the latest development version as is ("°°NewMacro_XLtoMDL_IN_DVT_...). I'll replace it in the folder as I make progress with it; At the moment, only SA and MC work. I have deleted the "without links to glossaries" option as that can now be sorted with filters in the quizzes.
Tags are NOT exported as I get an error when I try to import XL with question tags into Moodle on our production site.
Feel free to use it, change it.. I have commented the code as much as possible;
Please help in this
sorry for the late reply...
could you send the file to jean-luc.delghust_AT_uclouvain.be?
Haven't had time to work more on the file...
Thank you very, very much for this tool. I'm using it for the first time (moodle 2.9+) and have had no problems so far. The documentation has been very clear.