Moodle plugins directory: Interactive Content – H5P | Moodle.org
Interactive Content – H5P
One of the great benefits with using H5P is that it gives you access to lots of different interactive content types.
Another great benefit with H5P is that it allows you to easily share and reuse content. To reuse content, you just download the H5P you would like to edit and make your changes – e.g. translate to a new language or adjust it to a new situation.
H5P is:
- Open Source
- Free to Use
- HTML5
- Responsive
Note that it is currently possible for people with programming skills to cheat in H5P interactions and obtain the full score without knowing the correct answers. H5Ps must not be used for exams or similar.
The H5P community is actively contributing to improve H5P. Updates and new features are continuously made available on the community portal H5P.org.
View our setup for Moodle to get information on how to get started with H5P.
GDPR Compliance
Information useful to help you achieve GDPR compliance while using this plugin can be found at H5P.org's GDPR Compliance page.
Thank you for your suggestions, it is a great idea Please feel free to post this in the "feature request" (https://h5p.org/forum/16) forum on H5P.org, where it will be possible to prioritize the issues that are most important to the community.
It is currently possible to do this with the detailed xAPI events H5P sends out, but the storing and analysis of data is currently left to an LRS' or similar systems. You can read more about how you can use this at: https://h5p.org/documentation/for-authors/analyzing-results-and-answers.
I agree that a tighter integration with the h5p reports would be an easier to use approach though, hopefully we can do this somewhere down the road.
Thanks for the feedback!
Having upgraded to version 1.5 of the plugin on Moodle 3.2 I now get the error that the function H5PCore::getLocalization() doesn't exist. This is in various places.
I've tried using the ZIP downloads from both this site and GitHub with the same results. An 'fgrep' of the codebase appears to show only one occurrence of the string 'getLocalization' - where the function is called in 'locallib.php'.
When I download the plugin from this page, I see no problem when inspecting code. I.e, getLocalization is defined in hvp/library/h5p.classes.php. If you pulled the repo from github, you would also need to checkout the submodules, but I wouldn't recommend fetching the plugin from github.
Please retry with the module found here on moodle.org
Best,
Pål
Many thanks. My problem did stem from getting the first ZIP file from GitHub.
All OK now.
Best regards
Peter
In the case of H5P, I see that there is no redirect from the gradebook link setup to point a student to begin the activity in the case when they haven't attempted that H5P activity. Is this intentional, or a design flaw? Please watch this YouTube walkthrough the issue:
Thanks for any insight! -Ben
Thank you for sharing.
I do agree that this is an issue that should be solved. I've created a ticket for it here: https://h5ptechnology.atlassian.net/browse/HFP-1702
Thanks for this great plugin. We have an issue where we cannot delete an H5P activity in a moodle course. It looks like it is deleted but when refreshing the page it is still there. Has anybody come accross this before? Many thanks
This sounds like a strange bug. You should check the web server/PHP error log to determine the exact cause of this issue.
The system was unable to install the H5P Editor Range List component from the package, it requires a newer version of the H5P plugin. This site is currently running version 1.13, whereas the required version is 1.14 or higher. You should consider upgrading and then try again.
The system was unable to install the H5P Editor Table List component from the package, it requires a newer version of the H5P plugin. This site is currently running version 1.13, whereas the required version is 1.14 or higher. You should consider upgrading and then try again.
I've purged all caches and I've verified to have last version of h5p module, but the errors are still there.
Can you help me?
Thank you very much.
Alberto
How did you update the plugin? It looks like not all of your files have been updated successfully.
I double checked the version you get from the 'Download' button and it's running 1.14 of the core component. You can check this manually in the mod/hvp/library/h5p.classes.php file around line 1731.
If you are using Git to update, make sure that you update the submodules as well.
Your feedback has been decisive.
Debug info: Table 'mdl_hvp' already exists
CREATE TABLE mdl_hvp (
id BIGINT(10) NOT NULL auto_increment,
course BIGINT(10) NOT NULL DEFAULT 0,
name VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
intro LONGTEXT COLLATE utf8mb4_general_ci,
introformat SMALLINT(4) NOT NULL DEFAULT 0,
json_content LONGTEXT COLLATE utf8mb4_general_ci NOT NULL,
embed_type VARCHAR(127) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
disable BIGINT(10) NOT NULL DEFAULT 0,
main_library_id BIGINT(10) NOT NULL,
content_type VARCHAR(127) COLLATE utf8mb4_general_ci,
author VARCHAR(127) COLLATE utf8mb4_general_ci,
license VARCHAR(7) COLLATE utf8mb4_general_ci,
meta_keywords LONGTEXT COLLATE utf8mb4_general_ci,
meta_description LONGTEXT COLLATE utf8mb4_general_ci,
filtered LONGTEXT COLLATE utf8mb4_general_ci,
slug VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
timecreated BIGINT(10) NOT NULL DEFAULT 0,
timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
COMMENT='Activity data'
;
CREATE TABLE mdl_hvp_content_user_data (
id BIGINT(10) NOT NULL auto_increment,
user_id BIGINT(10) NOT NULL,
hvp_id BIGINT(10) NOT NULL,
sub_content_id BIGINT(10) NOT NULL,
data_id VARCHAR(127) COLLATE utf8mb4_general_ci,
data LONGTEXT COLLATE utf8mb4_general_ci,
preloaded TINYINT(1) NOT NULL,
delete_on_content_change TINYINT(1) NOT NULL,
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
COMMENT='Stores user data about the content'
;
CREATE TABLE mdl_hvp_libraries (
id BIGINT(10) NOT NULL auto_increment,
machine_name VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
title VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
major_version SMALLINT(4) NOT NULL,
minor_version SMALLINT(4) NOT NULL,
patch_version SMALLINT(4) NOT NULL,
runnable TINYINT(1) NOT NULL,
fullscreen TINYINT(1) NOT NULL DEFAULT 0,
embed_types VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
preloaded_js LONGTEXT COLLATE utf8mb4_general_ci,
preloaded_css LONGTEXT COLLATE utf8mb4_general_ci,
drop_library_css LONGTEXT COLLATE utf8mb4_general_ci,
semantics LONGTEXT COLLATE utf8mb4_general_ci NOT NULL,
restricted TINYINT(1) NOT NULL DEFAULT 0,
tutorial_url VARCHAR(1000) COLLATE utf8mb4_general_ci,
CONSTRAINT PRIMARY KEY (id)
, KEY mdl_hvplibr_macmajminpatrun_ix (machine_name, major_version, minor_version, patch_version, runnable)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
COMMENT='Stores information about libraries.'
;
CREATE TABLE mdl_hvp_libraries_libraries (
id BIGINT(10) NOT NULL auto_increment,
library_id BIGINT(10) NOT NULL,
required_library_id BIGINT(10) NOT NULL,
dependency_type VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
COMMENT='Library dependencies'
;
CREATE TABLE mdl_hvp_libraries_languages (
id BIGINT(10) NOT NULL auto_increment,
library_id BIGINT(10) NOT NULL,
language_code VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
language_json LONGTEXT COLLATE utf8mb4_general_ci NOT NULL,
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
COMMENT='Translations for libraries'
;
CREATE TABLE mdl_hvp_libraries_cachedassets (
id BIGINT(10) NOT NULL auto_increment,
library_id BIGINT(10) NOT NULL,
hash VARCHAR(64) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
CONSTRAINT PRIMARY KEY (id)
, UNIQUE KEY mdl_hvplibrcach_libhas_uix (library_id, hash)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
COMMENT='Use to know which caches to clear when a library is updated'
;
CREATE TABLE mdl_hvp_contents_libraries (
id BIGINT(10) NOT NULL auto_increment,
hvp_id BIGINT(10) NOT NULL,
library_id BIGINT(10) NOT NULL,
dependency_type VARCHAR(10) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
drop_css TINYINT(1) NOT NULL,
weight BIGINT(10) NOT NULL,
CONSTRAINT PRIMARY KEY (id)
, KEY mdl_hvpcontlibr_dro_ix (drop_css)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
COMMENT='Store which library is used in which content.'
;
CREATE TABLE mdl_hvp_events (
id BIGINT(10) NOT NULL auto_increment,
user_id BIGINT(10) NOT NULL,
created_at BIGINT(10) NOT NULL,
type VARCHAR(63) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
sub_type VARCHAR(63) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
content_id BIGINT(10) NOT NULL,
content_title VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
library_name VARCHAR(127) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
library_version VARCHAR(31) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
COMMENT='Keep track of logged H5P events'
;
CREATE TABLE mdl_hvp_tmpfiles (
id BIGINT(10) NOT NULL,
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
COMMENT='Keep track of files uploaded before content is saved'
;
CREATE TABLE mdl_hvp_counters (
id BIGINT(10) NOT NULL auto_increment,
type VARCHAR(63) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
library_name VARCHAR(127) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
library_version VARCHAR(31) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
num BIGINT(10) NOT NULL,
CONSTRAINT PRIMARY KEY (id)
, KEY mdl_hvpcoun_typliblib_ix (type, library_name, library_version)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
COMMENT='A set of global counters to keep track of H5P usage'
Error code: ddlexecuteerror
H5P expects these tables to not be defined so you need to backup any old data you have in these tables if you want to keep the data, then remove the tables specified in the error message (mdl_hvp, mdl_hvp_content, mdl_hvp_libraries, mdl_hvp_libraries_languages, mdl_hvp_libraries_cachedassets, etc.) and then try to install H5P again.
Best regards, Thomas
I don't know if the issue is with H5P or Sharing cart ...