Set up H5P for Drupal 7
Download and install Drupal
Skip this step if you already have a running Drupal 7 installation.
- Download Drupal 7 from drupal.org.
- Follow the usual installation instructions
Install the H5P module
1. Find the latest H5P module from the H5P project page on drupal.org.
2. Install the H5P module as you usually install a Drupal module. If you are new to Drupal modules, you can take a look at Drupal's installing modules guide.
3. Navigate to your site's module administration pages (/admin/modules/). Scroll to the section named "Other" and enable the "H5P" and "H5P Editor" modules.
Install content types
Now your module is set up, and you can start creating H5P Content. After you click on "Add new" The H5P Hub will load - offering you a variety of content types to pick from.
Below you can see how to get new content types from the H5P Hub.
Here you can find Tutorials how to create content using different content types.
Roles and permissions
Depending on the framework used, access to H5P features may be controlled by defining the permissions for roles or users.
In Drupal, H5P has the following permissions available. They should be assigned users/roles as shown.
|content writer||site editor||site administrator|
|edit own h5p||Yes||Yes||Yes|
|delete own h5p||Yes||Yes||Yes|
|edit any h5p||No||Yes||Yes|
|delete any h5p||No||Yes||Yes|
|update h5p libraries||No||Maybe*||Yes|
|access all H5P results||No||Yes||Yes|
|Access own H5P results||Yes||Yes||Yes|
|Access h5p results for own content||Yes||Yes||Yes|
|Create restricted H5P content types||Maybe**||Maybe**||Yes|
* The "update h5p libraries" permissions enables the user to upload H5Ps with updated library versions. Whether or not editors should have this access is up to site policy.
Updating old content to new versions can change their appearance and functionality significantly, preserving old content through library upgrades is always one of the main focuses of a library developer. Be aware of possible versioning and content upgrades issues when letting users upload altered H5P libraries.
** The "Create restricted H5P content types" permissions enables the user to create content types that users without this permission aren't allowed to create. Admins can configure what content types are restricted at admin/content/h5p. Who should have this access is up to the site policy.
Enable H5P shortcodes
The H5P module for Drupal includes an input filter allowing authors to insert shortcodes like this:
where 123 is the node id. To use these shortcodes this filter must be enabled:
- Go to admin/config/content/formats
- Click on configure for the textformat you want to enable H5P shortcodes for
- Enable the "H5P Content" filter, and make sure it is last in the list of enabled filters
- Click "Save configuration"
By doing this the H5P shortcodes should be possible to use for all authors who have access to this text format. Do note that the H5P filter disables caching for text formats using it. With page caching or similar turned on this shouldn't be noticeable.
Enable result reports
By enabling Drupal's Views module a view will appear as a tab on each H5P node and on each user profile displaying basic result data.
Compatibility problems with httprl module
Users have reported problems enabling the H5P HUB on sites using the httprl module. More info here.
Fri, 08/07/2015 - 06:32
I use h5p products and they work just fine as long as you log in under admin. I've tested it under "anonymous" user, and interactive content seems to be unaccessible (fill in the blank type of quize in my case). I've checked out "permissions" list and it doesn't have anything related with "taking a quiz" or "using interactive content" to any type of users. Please, help me out with this frustration.
Thu, 08/20/2015 - 14:47
permissions for Anonymous users
I'm having the same issue. I have been through the permissions several times and there doesn't seem to be one to set to allow anonymous users to take quizzes using interactive content. Am I missing something? We would love to be able to offer this to our liaison librarians to use in their classes, but would need the accessibility for anonymous users.
Thu, 08/20/2015 - 15:26
RE: permissions for Anonymous users
I may have figured this out. Once I set the question to be saved as a quiz, I was able to access it as an anonymous user. I guess the integration with the Quiz module is pretty deep.
Tue, 08/25/2015 - 09:51
It is also possible to use
It is also possible to use H5P without the Quiz-module. H5P is a standard node type in Drupal, i.e may go to node/add/h5p-content on your site to create standalone H5Ps.
Tue, 08/25/2015 - 09:48
Are you creating "interactive
Are you creating "interactive content" nodes or are you using H5P through the Quiz module?
Mon, 09/28/2015 - 03:47
Is there a way to include H5P
Is there a way to include H5P content as blocks? For instance, in an existing Drupal panel, I'd like to drop in an interactive content component at the top of the panel and then add a webform at the bottom. Is this possible? So far I have not been able to figure out how to change the content type to allow for the content to be visible as a custom block or similar structure that I can drop in.
Mon, 09/28/2015 - 08:16
H5P inside block
You should be able to place an H5Ps embed code inside the block's body (using wysiwyg). In the upcoming H5P-release, you will also get the possibility to use shortcodes inside wysiwygs to include H5Ps
Tue, 10/13/2015 - 02:42
Hey Thanks! Yup, I'm using
Hey Thanks! Yup, I'm using panels that support just selecting any existing H5P content.
Tue, 11/03/2015 - 11:45
Hi, I've tried to use
I've tried to use shortcodes in Drupal but I don't get it to work.
I've enabled the H5P filter and moved it to the last position.
But what is the correct shortcode to use?
[h5p id="5"] didn't work for me.
Wed, 11/04/2015 - 14:52
[h5p=5] would be correct, so
[h5p=5] would be correct, so no id= and no " around the number.
Wed, 11/04/2015 - 16:26
Thank you for the
Thank you for the clarification and the correction in the documentation!
Is it possible to change the size of the embedded content?
Wed, 11/04/2015 - 19:49
That is a very relevant
That is a very relevant question. I wished the developer(me to be honest..) had added that from the start. I almost always uses it. What I do is usually something like <div style="max-width:600px;">[h5p=123]</div>
Wed, 11/04/2015 - 20:05
A small typo from falcon
A small typo from falcon there, it should be:
i.e colon instead of the equality sign for CSS
Wed, 11/04/2015 - 20:24
Thanks fnoks! I've updated my
Sat, 12/05/2015 - 22:59
I must apologize in advance as I am sure there is an obvious answer to this question. I am new to H5P and Drupal but have H5P running on a Drupal server and have uploaded the example Course Presentation from this site.
I take the course, hit the checkbox at the end of the presentation, and note that a request to ?q=h5p-ajax/setFinished is POSTed along with the appropriate (I believe) information:
How do I find this information within Drupal's front-end?
Wed, 12/09/2015 - 22:09
Good question. I've now added
Good question. I've now added a paragraph about the result view in Drupal in the Drupal setup documentation. Thanks!
Thu, 12/10/2015 - 01:16
That response is extremely helpful, will give that a shot.
Thank you again!
Sat, 05/07/2016 - 18:20
use data out of h5p
I want to use the "drag and drop" for a photo contest. User have to talk a walk and when they're at home they have to orden the 5 pictures. I would like to do that with the "drag and drop". It's seems possible to me. But I would like to use the results in another contenttype. Webform for example. They answer the photoquestion with "drag en drop", they enter their personal information and send their form in. I would like to see the result of their form together with their "drag and drop"-data. Is this possible? So can you give me a possible solution... Thanks...
Tue, 05/10/2016 - 18:37
I think you will need to do
Wed, 06/01/2016 - 16:04
Problem loading libraries
is there a way to directly upload the content libraries onto the server on drupal as it is not working through the drupal interface. I have gone through as many posts i could find on this, making a gist of possible errors so that it speeds up debugging. I would really appreciate some help here..
------ $path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $_FILES['h5p_file']['name'];
as the directory structure of wordpress plugin and drupal module are different, where do i find this in the drupal module ?
Wed, 06/01/2016 - 16:05
link to a similar bug in wordpress installation
Wed, 06/01/2016 - 16:08
When i try to upload the h5p
When i try to upload the h5p library through create content or the library link, the page loads for a while then i get an error as connection failed, unable to connect...
Thu, 06/02/2016 - 08:08
I fixed the problem above, had to change my max file size upload settings from php.ini
Thu, 06/02/2016 - 14:53
Glad you found the solution!
Mon, 06/06/2016 - 20:52
Thu, 08/11/2016 - 16:21
Drupal 7.50 disallows embedding on different domains
If you want your content to be embedded on different domains you have to set $conf['x_frame_options'] = ''; in the settings.php. Since Drupal 7.50 the X-Frame-Options-Header is modified by default to allow embedding only on the same domain ("SAMEORIGIN") (Source). I had some fun with the apache configuration to finally find out Drupal is the reason here. I think this aspect should be mentioned in the install documentation.
Fri, 08/12/2016 - 10:02
Thanks for sharing this find,
Thanks for sharing this find, it's really valuable information.
Sun, 08/21/2016 - 13:49
Drupal 8 compatibility
Can you tell me when Drupal 8 compatibility is planned on the roadmap?
We would really like to use h5p in our Drupal - Moodle platform.
Mon, 08/22/2016 - 10:13
We have Drupal 8 on the
We have Drupal 8 on the roadmap, but we have not set any ETA yet. You are aware of the H5P Moodle plugin?
Wed, 10/12/2016 - 14:28
H5P in Interactive PDF's
We are working on a project where we will be creating iPDF's (interactive PDF's). The problem is that the normal video content is in Flash - which really doesn't work for our customer. Could we embed H5P content in it's place. Has this been done before??
Thu, 10/13/2016 - 09:41
Interesting! I don't know
Interesting! I don't know that this has been done yet, but if iframe embed is supported it should be easy to try. I think it could be a very good alternative to Flash videos.
Wed, 03/01/2017 - 14:06
Not working with s3fs Module
I could not able to Add libraries if i enabled s3fs module. There is some conflict error while storing the .h5p in temp folder and doing unzip. Please check this.
Wed, 03/01/2017 - 14:26
You are correct, the modules
You are correct, the modules are not compatible. I've created an issue for sorting it out in the H5P JIRA: HFP-801
Sat, 03/11/2017 - 10:38
Fri, 05/12/2017 - 08:17
I am getting error while uploading h5p file
Tell me the appropriate solution
Fri, 05/12/2017 - 09:42
Hi Mohit, I will need some
Hi Mohit, I will need some more information before I can begin reproducing your bug. Would you mind creating a new post in the Bug Reports forum and provide the relevant steps needed to reproduce it.
Wed, 07/26/2017 - 14:53
Can i embed it as raw html code
I'm using drupal 8 for my project and the module is not yet ready for drupal 8. Can i inject it as embedded html into the site? Would there be limitations if i do so?
Thu, 07/27/2017 - 09:52
Hi,Have you tried the Drupal
Have you tried the Drupal 8 alpha version? It is available on drupal.org. If you have tried it, and see any problems, please let us know !Best,Pål
Mon, 11/20/2017 - 12:25
I have install Module version(32 & 30 ) into D7.
But that give us JS error and not working.
After add new content & select Interactive content.
Getting Below JS error :
ReferenceError: H5P is not defined
Uncaught TypeError: Drupal.ACDB is not a constructor
can you please help us to resolved this.
Tue, 11/21/2017 - 11:06
Hi, it seems like files are
Hi, it seems like files are not being loaded properly, do you have any other modules that could be conflicting ?
Could you check your php server and error log for anything relevant to this ? We need more information in order to help you further.
Tue, 12/12/2017 - 11:43
Our site already live, so we
Our site already live, so we have many module.
with fresh Drupal7 its working.
But with our site , its not working.
How we find which module conflict ?
Please help me , how we can resolved this.
Wed, 12/13/2017 - 09:19
Hi,If you have a staging or
If you have a staging or development environment I would suggest disabling modules until you no longer get this error, to see which modules are in conflict. Do you never get this error when on other pages ?
I would also suggest to look in the php error log to see if anything goes wrong there.
Finally, it seems like ACDB is Drupal's autocomplete, for some reason this is expected to be defined somewhere, but not found, so I would look for any modules that might require it to be defined.
Good luck, Thomas
Sun, 03/11/2018 - 19:18
Sat, 03/17/2018 - 23:35
Admin menu disapears
Thank you for this great tool.
The problem I'm facing (not so important) is that the Administration menu disappears when I view or edit interactive content.
I'm using the latest Drupal 7.57. Is there a conflict between modules?
Mon, 03/19/2018 - 08:21
Hi nikolas,Would you mind
Would you mind posting a separate thread form this here. In order to give your bug report the best chance of getting answered, please include the following information:
The more information you provide, the quicker the community will be able to fix it and the quicker you'll have a working solution!
Mon, 03/19/2018 - 09:56
Thank you for your reply.
The problem was from AdvAgg module.
Disabling it solved the problem :)
Mon, 03/19/2018 - 10:33
Hi Nikolas,I'm glad you found
I'm glad you found a solution and thank you for getting back to us with your findings.
Mon, 03/19/2018 - 11:20
You are welcomed :)
I hope this might help other users too.
Another problem is that I have no sound effects.
I am working on course presentation. No sound files in it's installation.
Also tried out Single Choice Set which has sound files in it's installation. But no sound effects. A test page is http://www.kalymnosdiving.gr/sound-effects
Thu, 03/22/2018 - 16:35
See my comment here :-)
See my comment here :-)
Tue, 03/27/2018 - 09:57
I would also suggest to look in the php error log to see if anything goes wrong there.