Request for review: Advanced Blanks

serettig's picture


it has taken some time, but I consider my content type 'advanced blanks' as finished. Here's some information on it:

Short Description

A free HTML5 based question type allowing creatives to create 'fill in the blanks' content (a.k.a cloze tests) that helps users with individual feedback for each blank and incorrect answer. It can also be configured to work in 'drop-down' mode, in which users select the correct answer from several options. If you don't want to use individual feedback or 'drop-down' mode, the regular 'Fill in the Blanks' content type is easier to use and might be the better choice.

Long Description

Learners fill in the missing words in a text or choose the correct answer from a drop-down menu. For each blank, the learners are told if the entered answer is correct. If an answer is incorrect, an individual feedback text is shown for the exact mistake they've made and their attention is drawn to relevant parts of the text. If they only make a minor mistake, they get a warning message telling them what the exact problem is.

Authors enter text and mark blanks with ____. The correct answers, incorrect answers and the respective feedback texts are then entered in another section below. Authors can also mark parts of the text as 'highlight sections' by surrounding them with !!. They can then reference these highlight sections when they enter the feedback texts for incorrect answers. 

'Advanced Fill in the Blanks's is most useful in second language learning, where you can give the users individual hints, why certain tenses or word forms can't be used in this case. While it is possible to have a 'Check' button at the bottom of the exercise and give feedback for all blanks at once, it makes more sense to enable the auto-check setting as the user is guided through the 'fill the blanks' exercise step by step.

You can find two example files attached and the code can be found at GitHub.

It'd be great if my content type found it's way into the H5P Hub!

Edit Dez 6 18: I've re-uploaded the h5p-files in which I removed the empty preloadedCss entry in library.json of AdvancedBlanks and Ractive. I originally included this empty entry to make AdvancedBlanks work with the h5p standalone module used in the edu-sharing platform, but it looks like WordPress doesn't accept the files if the empty tag is there. Which platform conforms to the standard here?

updated h5p files to work with most recent drupal installation
BV52's picture

Hi serettig,

This is awesome! Thank you for your contribution. I created a task for this and you can follow it here.


BV52's picture

Hi serettig,

I've informed the core team reagarding the changes.


icc's picture

Nice job, the code looks good, although I do wish there could have been a few more comments inside the functions. (It's not easy to immediately tell what multi-chained operations like reduce,filter,map,reverse does to data, so adding a few comments can save lives)

Coding aside, I did have some issues distinguish between the two different Fill in the Blanks and why this is advanced. So, I'm a bit worried other uses will have trouble seeing this as well and why there are two content types that are "the same". I'm sure there is something we could do to better distinguish them, but I'll have to think about it. Maybe it should be titled Fill in the Blanks (Alternative)


serettig's picture

Thank you for taking the time to review the code! I'll add more comments in the future.

I understand about the naming issue. Maybe "Fill in the Blanks for Individual Feedback" is a better name? Just using generic "alternative" wouldn't clear things up.

icc's picture

The content type is now available on the examples and download page.

Edit: Regarding the naming, it would probably have been better with something simpler like just Advanced Blanks.

Note that it seems both the examples provided was the same, so only one of them is used for the example page.

serettig's picture

Thanks a lot for publishing it! I hope it will be used by the community. I'm a bit busy at the moment, but I'll try to create two more examples demonstrating the usage and write some texts for the hub!

Is there a way i can create sentences with in-line blanks whose options are presented a a dropdown menu?

Thanks for your help

serettig's picture

Hi Eskoli,

yes, Advanced Blanks supports this. There's a new release at which is more up-to-date than the one you'll find in the "examples & downloads" section here on


Great activity type. Really helpful for language learning. I have one problem though and that is that students and teachers can't see their answers in the grade report in Moodle with this activity. They can only see the score. Would it be possible to add the answers in the grade report?

Thanks for a great content type. It's really helpful for language learning. I just have one issue with it. In moodle the answers don't show up in the grade report. That means the teacher can't get a feeling with what the students problems are and the students can't return to their answers. 
It would be great if it could be like the normal fill in the blanks. Would that be possible?

BV52's picture

Hi kabr,

Can you please double check the Gradebook I just checked the test content and everything seems to be in order.


serettig's picture

Hi kabr,

Advanced Blanks should report back user answers as xAPI statements that are compatible to the regular Fill-in-the-Blanks content type's. Can you see user answers for other H5P activities? 


This is brilliant. The function of being able to select from multiple options is exactly what I was looking for. I actually tried out the 'advanced fill in the blanks' but couldn't figure out what was different from the original. It deserves a clear description (highlighting 'individual feedback' and 'drop-down menu') and example (as other quiz types have) so that it is is clearly distinguishable. Well done!

This is a great H5P! 



I was curious if it is possible to add this to a video as an interactive hotspot?
Or is this feature yet to be implemented?