Adding a H5P activity to Moodle can be completed by simply creating the activity as a resource and placing it in the right order in the list of resources under a section.
 

Of course, this is fine to use it this way. But you can also be a little bit creative and embed the H5P object inside a Moodle page by using the embed code.

This means creating the H5P activity then using the embed option.

When you view the activity you can select embed in the bottom left corner.

Copy the code from the embed panel. (see diagram below)
Now go to your normal Moodle content page.

The embed code can be pasted into your Moodle pages inline with the other content that you have in your page using the HTML code option “</>” icon in the Page content editor. 

 

This puts the activity in context with the content. 

There are a few issues though.

If you prefer to change the width and height of the embedded H5P object to 100%, then it can be problematic when viewed using IE or Edge. It can appear with a cut down height.

In some cases, especially for mobile devices, it can be impractical to use this method.

One option is to follow these instructions to make the the iframe and H5P container responsive.

https://benmarshall.me/responsive-iframes/

On the other hand, if you leave it at a set height then it may scale down in some browsers or will allow you to scroll right to view the complete H5P content.

As you will probably want to make this work in all browsers, I would suggest you take notice of the extra resizing code to make sure it works in your students environment.

If you have any thoughts, suggestion or solutions for the IE/Edge issues, please let me know.

 

2 Comments

  1. Allyson

    Hi. So if we can’t amend CSS in our Moodle pages, how far can we go with Ben Marshall’s suggestions?

    Reply
    • Chris Richter

      Hi Allyson,
      If you can’t add CSS to your page or site then you will not be able to use Ben Marshalls solution.
      The downside of Ben solution is that it is based on ratios which means it is only really useful on H5P activities that have a set screen ration.
      Are you able to use the H5P resizer script?
      Thank,
      Chris

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

[convertkit form=1092962]