HP5 content to questions conversion

HP5 content to questions conversion

by Daniel Thies -
Number of replies: 24
Picture of Core developers Picture of Plugin developers Picture of Testers

I have an initial version of a question format plugin ready that is able to convert a number of H5P question types directly into Moodle questions in the question bank. The goal is to allow a question be written once by a teacher or course creator and used either in an H5P or quiz activity in a course.

The code can be downloaded from https://github.com/dthies/moodle-qformat_h5p, or if you prefer I have a demo course set up where you can test the plugin without having to go through the installation process. There is a sample quiz with some converted questions, and the question bank enabled so you can test the import process.
Average of ratings: Useful (6)
In reply to Daniel Thies

Re: HP5 content to questions conversion

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
What a great plugin! Now, can it go both ways??? Because I know a lot of people who would love to convert quiz questions to H5P???
Average of ratings: Useful (2)
In reply to Emma Richardson

Re: HP5 content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

Thanks Emma,

Going the other way is possible to do, but may be slightly more challenging. I have not started that, yet other than doing a little research on H5P development. There are some pedagogical or licensing questions you may be able to help me with.

Quiz questions are usually controlled and regarded by faculty/publishers as needing some level of confidentiality. H5P is inherently open. There is a share button that normally appears to download the whole resource and once that is done the answers are available. H5P is great for instruction, low stakes assessment, but I do not want to facilitate exposing question banks unintentionally. How do we prevent that? or am I overly concerned?

In reply to Daniel Thies

Re: HP5 content to questions conversion

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
'How do we prevent that? or am I overly concerned?'
Because most H5p code is in the browser I suspect it is not possible. As you say H5p is great for instruction/learning/low stakes. It should never be used for critical assessment. That is not supposed to be a criticism of H5P it is an acknowledgment of its underlying design.

Going from Moodle questions to h5p might work for simpler types but as for many it would be problematic/impossible. For example, unless Cloze questions were very simple they would not transfer. Having said that, many Moodle questions probably don't use the more advanced features and so might transfer to H5p.

H5P fans may find this course interesting from MoodleBites
Average of ratings: Useful (2)
In reply to Marcus Green

Re: HP5 content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

What I mean to prevent is exporting sensitive content to H5P. Once it is in H5P, it is not protected so does there need to be a license check or a dialog before before questions are exported? Actually, it may be related that H5P has license and authorship information included that would need to be provided before the export can be done properly.

H5P packages are not limited to existing content types, but can include custom js libraries so there are not significant technical limits to exporting complex question types. Cloze questions could be completely exported, but it would not be a trivial development project.
In reply to Daniel Thies

Re: HP5 content to questions conversion

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
I tend to think that that is up to the institution to decide. You could just put something in the description if you are concerned to address that and then it is up to them if they want to install or not. When we come up with tools, there will always be use cases that might not be totally desirable but it should not stop you creating the tool.
Average of ratings: Useful (2)
In reply to Emma Richardson

Re: HP5 content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

I agree that's the way we have been doing things in Moodle. However, licensing seems to be built into tools like h5p now. I want to make sure that admins have the ability to control the capability so that they will be comfortable installing the plugin.

I think I can try loading the licensing information show me profile fields or configuration settings.

I will try creating a multiple choice to single Choice set plugin when I have free time again.

In reply to Daniel Thies

Re: HP5 content to questions conversion

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
' but it would not be a trivial development project.'
I just started to say that, then I read to the end of your post smile
In reply to Marcus Green

Re: HP5 content to questions conversion

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Totally agree with Daniel and Marcus here. Many H5P activities are great for learning purposes, including self-assessment, but none is OK for real assessment purposes.
And I find this quite acceptable.
In reply to Daniel Thies

Re: HP5 content to questions conversion

by DaVinci Menno -

Hi Daniel,


This sounds very promising. Is it going to be available for other Moodle versions as well? 
We work with Moodle 3.5.10 and I get an error message during the installation stating that I am not using the right Moodle version.

Thanks! 

Kind regards,


Menno

Average of ratings: Useful (1)
In reply to DaVinci Menno

Re: HP5 content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hi Menno,

I updated the version requirement to include 3.5 now since that is still a supported version. In principle the import functionality would probably work with older versions, but I did not want to spend the time testing that. Let me know if you have any further problems on Moodle 3.5.

When I add functionality to create H5P content that will likely require Moodle 3.9 because the H5P support built into the most recent version will be required to do it properly without using additional plugins.

Daniel
Average of ratings: Useful (2)
In reply to Daniel Thies

Re: HP5 content to questions conversion

by DaVinci Menno -
Hi Daniel,

That's great, thanks so far. The plugin is installed. However, I am encountering an issue:
When uploading the h5p-file to the question bank, I get the error: ''The file type you selected (application/zip) isn't coherent with the type that was expected for import (document/ unknown).

Could you add a ''how-to'' or the like to the Readme-file? I cannot figure out what I am doing wrong.
Thank you once again!

Kind regards,

Menno
Average of ratings: Useful (1)
In reply to DaVinci Menno

Re: HP5 content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hi Menno,

That is a 3.5 issue I should have tested. The h5p mimetype was not added to 3.5 yet. I will have to see if I can create a work around for it to work with 3.5.
In reply to DaVinci Menno

Re: HP5 content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
I resolved that now Menno and tested it on 3.5 if you can try again.
Average of ratings: Useful (2)
In reply to Daniel Thies

Re: HP5 content to questions conversion

by DaVinci Menno -

Hi Daniel,

Thank you so much. It worked for me!
The only thing I had to add, was some CSS in my theme to make sure that the H5P-content would display correctly on the screen. 
I then added the H5P-content through a ''description''-question type in the question pool and put the embed code there through the atto editor. Once I added this description question to my question pool, it all worked fine. 

I'm guessing this only goes for my particular case, as I used a large image, but I thought I'd share it nonetheless for people who might encounter this as well. 


Once again, thanks for this great addition. It works fine in Moodle 3.6 as well.


Kind regards,


Menno

Average of ratings: Useful (1)
In reply to Daniel Thies

Re: HP5 content to questions conversion

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Daniel,
Congratulations for taking up the challenge! Excellent work so far.cool
I have just started testing and will give your plugin a more thorough testing in the coming days.
Looking forward to further development.
Joseph
Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: HP5 content to questions conversion

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Here are the results of my tests, conducted using the examples found on the H5P.org site
 
Column : not tested
Quiz (Question Set) - extracts supported subcontent INCLUDING drag & drop & multichoice OK
Single Choice Set - extracts into individual multichoice questions OK
Multichoice Question KO (Cannot read import file (or file is empty)
True/False Question OK
Drag and Drop
     Chessboard Setup import OK but display KO
     Simple matching game (fruit) OK
     Matching game with auto align (flags) KO (no background image)
Fill in the Blank Question OK
Drag the Text (words) Question OK
 
The most surprising bug is with the multichoice question (on its own). Why does it work when MCQ is included in a Question Set, but fails when it's on its own?
Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: HP5 content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Thank you Joseph. I found a typo in the MCQ code that fixed that issue. That was easy. The Drag and Drop is more difficult. The H5P type is much more free in its syntax than the Moodle question types so it may not be possible to import all H5P drag and drop content correctly.
In reply to Daniel Thies

Re: HP5 content to questions conversion

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks for fixing the typo in MCQ, Daniel, it's working now.

Yes, of course importing to Drag & Drop is not so easy. To recap the kind of H5P Drag & Drop activities that won't import into Moodle:

  • if there is no background image in the H5P content (maybe you could issue a warning there?)
  • if the H5P content has more than one draggable in a drop zone

I find the latter option very useful in some cases, it's a pity that the Moodle Drag & Drop does not allow for multiple draggables in drop zones. If it did, then the H5P import would work ok.

Drag and drop markers question type would fit the bill, except that markers can only be of text type, not images.

GapFill would do it, but again markers cannot be images.

Plus... as you may know I have developed my own versions of H5P Drag & Drop (and Dialog Cards). See my test site at http://www.rezeau.org/drupal/ I have found it easy to add my library to the list of recognize libraries in your qformat_h5p format.php file...

Average of ratings: Useful (2)
In reply to Joseph Rézeau

Re: HP5 content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
In the case of a missing background, we could just insert a blank image, but in that case we may be using the wrong question type. The last example (with the flags) could be implemented well with Drag words into text type. Actually the chessboard example would work with that as well (with words instead of piece images) as you can use a word more that once. If we imported all the drag and drops as html code in the question text that would turn the question into an uneditable mess. The strength of the Moodle types that they are easier to edit that the H5P (especially Gapfill).


In reply to Daniel Thies

Re: HP5 content to questions conversion

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Daniel "Actually the chessboard example would work with that as well (with words instead of piece images) as you can use a word more that once."

Yes, but ... you would miss a lot on the visual experience. An image is not the same as a word.

In reply to Daniel Thies

Re: H5P content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
This plugin has been published in the plugin database now https://moodle.org/plugins/qformat_h5p.
Average of ratings: Useful (2)
In reply to Daniel Thies

Re: H5P content to questions conversion

by Martin Maynard -

Hey Daniel, I just found this plugin and it is working wonderfully. I was wondering if there were any other question types besides MC and D/D coming as an update or if this plugin is only going to be these.

In reply to Martin Maynard

Re: H5P content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Martin,

Currently, there are fourteen H5P content types that are translated into eight different different Moodle question types. Several of the content types are sets that contain questions. That covers all of the types that have information analogous to questions that I am aware of at the moment, but I would be open to suggestions if there are other ideas. I think the plugin is stable now although there may be room for improvement with feedback and scoring still.

I am working slowly on creating H5P out of Moodle questions, but that is still very experimental at the moment. If you would to use what I have working so far, you can creates an account on my Moodle, moodle.openlearner.org. I am always happy to have feedback.

Daniel

Average of ratings: Useful (2)
In reply to Daniel Thies

Re: HP5 content to questions conversion

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
I am releasing a content type plugin to handle importing questions into the H5P. It is available now at https://github.com/dthies/moodle-contenttype_repurpose and some documentation is at Repurpose resources content type plugin. It has be submitted to the plugin database and should be available soon.  Using it in combination with the question form and core Content bank repository questions can be moved back and forth between the content bank and question bank.
Average of ratings: Useful (2)