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 | |
create h5p | Yes | Yes | Yes |
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.
Comments
Andynv
Fri, 08/07/2015 - 06:32
Permalink
permissions issue
Hi,
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.
beades48
Thu, 08/20/2015 - 14:47
Permalink
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.
beades48
Thu, 08/20/2015 - 15:26
Permalink
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.
fnoks
Tue, 08/25/2015 - 09:51
Permalink
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.
fnoks
Tue, 08/25/2015 - 09:48
Permalink
Are you creating "interactive
Are you creating "interactive content" nodes or are you using H5P through the Quiz module?
smartasc
Mon, 09/28/2015 - 03:47
Permalink
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.
Thanks!
fnoks
Mon, 09/28/2015 - 08:16
Permalink
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
smartasc
Tue, 10/13/2015 - 02:42
Permalink
Hey Thanks! Yup, I'm using
Hey Thanks! Yup, I'm using panels that support just selecting any existing H5P content.
philpav
Tue, 11/03/2015 - 11:45
Permalink
Hi, I've tried to use
Hi,
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.
Thank you
falcon
Wed, 11/04/2015 - 14:52
Permalink
[h5p=5] would be correct, so
[h5p=5] would be correct, so no id= and no " around the number.
philpav
Wed, 11/04/2015 - 16:26
Permalink
Thank you for the
Thank you for the clarification and the correction in the documentation!
Another question:
Is it possible to change the size of the embedded content?
falcon
Wed, 11/04/2015 - 19:49
Permalink
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>
fnoks
Wed, 11/04/2015 - 20:05
Permalink
A small typo from falcon
A small typo from falcon there, it should be:
<div style="max-width:600px;"></div>
i.e colon instead of the equality sign for CSS
falcon
Wed, 11/04/2015 - 20:24
Permalink
Thanks fnoks! I've updated my
JohnFMoore
Sat, 12/05/2015 - 22:59
Permalink
Reporting data?
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?
Thank you!
John
falcon
Wed, 12/09/2015 - 22:09
Permalink
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!
Svein-Tore
JohnFMoore
Thu, 12/10/2015 - 01:16
Permalink
Thank you!
That response is extremely helpful, will give that a shot.
Thank you again!
John
jeroen45
Sat, 05/07/2016 - 18:20
Permalink
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...
falcon
Tue, 05/10/2016 - 18:37
Permalink
I think you will need to do
connectkushal
Wed, 06/01/2016 - 16:04
Permalink
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 ?
connectkushal
Wed, 06/01/2016 - 16:05
Permalink
link to a similar bug in wordpress installation
https://h5p.org/comment/933#comment-933
connectkushal
Wed, 06/01/2016 - 16:08
Permalink
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...
connectkushal
Thu, 06/02/2016 - 08:08
Permalink
Solved !
I fixed the problem above, had to change my max file size upload settings from php.ini
falcon
Thu, 06/02/2016 - 14:53
Permalink
Glad you found the solution!
connectkushal
Mon, 06/06/2016 - 20:52
Permalink
thnx :)
thnx :)
pheraph
Thu, 08/11/2016 - 16:21
Permalink
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.
thomasmars
Fri, 08/12/2016 - 10:02
Permalink
Thanks for sharing this find,
Thanks for sharing this find, it's really valuable information.
rschaefe1
Sun, 08/21/2016 - 13:49
Permalink
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.
Bob Schaefer
fnoks
Mon, 08/22/2016 - 10:13
Permalink
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?
rschaefe1
Wed, 10/12/2016 - 14:28
Permalink
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??
Bob
icc
Thu, 10/13/2016 - 09:41
Permalink
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.
karthid
Wed, 03/01/2017 - 14:06
Permalink
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.
icc
Wed, 03/01/2017 - 14:26
Permalink
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
Yana
Sat, 03/11/2017 - 10:38
Permalink
Hi
Hi
mohitbansal623
Fri, 05/12/2017 - 08:17
Permalink
I am getting error while uploading h5p file
Tell me the appropriate solution
tim
Fri, 05/12/2017 - 09:42
Permalink
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.
Thanks,
Tim
richienabuk
Wed, 07/26/2017 - 14:53
Permalink
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?
Thanks
fnoks
Thu, 07/27/2017 - 09:52
Permalink
Hi,Have you tried the Drupal
Hi,
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ålvpatel
Mon, 11/20/2017 - 12:25
Permalink
Not working
Hello Team,
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.
Content type
Waiting for javascript...
Not loading
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.
Thanks
thomasmars
Tue, 11/21/2017 - 11:06
Permalink
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.
vpatel
Tue, 12/12/2017 - 11:43
Permalink
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.
Thanks
thomasmars
Wed, 12/13/2017 - 09:19
Permalink
Hi,If you have a staging or
Hi,
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
sheikah
Sun, 03/11/2018 - 19:18
Permalink
thanks
thanks
nikolas
Sat, 03/17/2018 - 23:35
Permalink
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?
BV52
Mon, 03/19/2018 - 08:21
Permalink
Hi nikolas,Would you mind
Hi nikolas,
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!
-BV52
nikolas
Mon, 03/19/2018 - 09:56
Permalink
[Solved]
Thank you for your reply.
The problem was from AdvAgg module.
Disabling it solved the problem :)
BV52
Mon, 03/19/2018 - 10:33
Permalink
Hi Nikolas,I'm glad you found
Hi Nikolas,
I'm glad you found a solution and thank you for getting back to us with your findings.
-BV52
nikolas
Mon, 03/19/2018 - 11:20
Permalink
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
Any suggestions?
icc
Thu, 03/22/2018 - 16:35
Permalink
See my comment here :-)
See my comment here :-)
embermoon
Tue, 03/27/2018 - 09:57
Permalink
Suggest
I would also suggest to look in the php error log to see if anything goes wrong there.
Pages