XBlock to play self hosted h5p content inside open edX
Project description
Play H5P content in Open edX using h5pxblock
H5P Xblock provides ability to host and play H5P content in open edX. It has few more features
- Ability to mark H5P content complete in open edX
- Ability to capture score of H5P content in open edX
- Save learner state which can be retrieved later
- Ability to host H5P content on cloud storage like AWS S3
Setup
Install Xblock
pip install h5p-xblock
or if you're using tutor to manage your organization:
tutor config save --append OPENEDX_EXTRA_PIP_REQUIREMENTS=h5p-xblock
tutor images build openedx
Update Advanced Settings of course
Update course advanced settings by adding h5pxblock
Upload H5P Content
Xblock should be available in Advanced component list of course unit now. Add xblock in unit and click "Edit" button to upload H5P content and configure it.
Publish Content
Use "Preview" button to preview it or publish your content and use "View Live Version" button to see how it appears on LMS
Configuring storage backend (S3 example)
H5P relies on DEFAULT_FILE_STORAGE by default. If you want to use a different
storage for H5P content (e.g., a dedicated S3 bucket, or when AWS_QUERYSTRING_AUTH = True
and you need unsigned URLs), configure one of the following:
- Django ≥ 4.2/5.x (preferred): add a storage entry named
h5pxblock_storagetoSTORAGES:
STORAGES = {
"default": {
"BACKEND": "django.core.files.storage.FileSystemStorage",
"OPTIONS": {"location": "/var/media"},
},
"h5pxblock_storage": {
"BACKEND": "storages.backends.s3boto3.S3Boto3Storage",
"OPTIONS": {
"bucket_name": "my-s3-public-bucket",
"querystring_auth": False,
},
},
}
- Legacy fallback (still supported):
H5PXBLOCK_STORAGE = {
"storage_class": "storages.backends.s3boto3.S3Boto3Storage", # or "STORAGE_CLASS"
"settings": { # or "STORAGE_KWARGS"
"bucket_name": "my-s3-public-bucket",
"querystring_auth": False,
},
}
Please ensure that your bucket is publicly accessible (or otherwise correctly configured) to enable seamless content storage and retrieval via S3.
Working with translations
You can help by translating this project. Follow the steps below:
- You need
i18n_toolto "collect" and "compile" translations. If you already have it, proceed to the next item; otherwise:
pip install git+https://github.com/openedx/i18n-tools
- Create a folder for the translations in
locale/, eg:locale/es_419/LC_MESSAGES/, and create yourtext.pofile with all the translations. - Run
make compile_translations, this will generate thetext.mofile. - Create a pull request with your changes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file h5p_xblock-0.2.18.tar.gz.
File metadata
- Download URL: h5p_xblock-0.2.18.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d46198e8365895fa73e120ee92bd10f0e957c09053357b91c9f381b730bb2f9
|
|
| MD5 |
5bf08d79a343051bc260a929342b64a0
|
|
| BLAKE2b-256 |
b200d5b4637c3ef345244c6eb725672d02df086cc4d00814a32f9cbf51a029f4
|
Provenance
The following attestation bundles were made for h5p_xblock-0.2.18.tar.gz:
Publisher:
publish_pypi.yml on edly-io/h5pxblock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
h5p_xblock-0.2.18.tar.gz -
Subject digest:
9d46198e8365895fa73e120ee92bd10f0e957c09053357b91c9f381b730bb2f9 - Sigstore transparency entry: 868254102
- Sigstore integration time:
-
Permalink:
edly-io/h5pxblock@9302b21070e29399b5d6768554596db6d5d9fd89 -
Branch / Tag:
refs/tags/v0.2.18 - Owner: https://github.com/edly-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yml@9302b21070e29399b5d6768554596db6d5d9fd89 -
Trigger Event:
push
-
Statement type:
File details
Details for the file h5p_xblock-0.2.18-py3-none-any.whl.
File metadata
- Download URL: h5p_xblock-0.2.18-py3-none-any.whl
- Upload date:
- Size: 43.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ee2aa2365b8f8ca372bb5ebc29463d02a913867feadeec5ed1e9cba6f0ad853
|
|
| MD5 |
e4ec83eed284418e30bd55bb464ad1f9
|
|
| BLAKE2b-256 |
25b04968fba7beb7fc2a9bf0a20e4fd833c068eb0b3a588d8a4c1c043351cab0
|
Provenance
The following attestation bundles were made for h5p_xblock-0.2.18-py3-none-any.whl:
Publisher:
publish_pypi.yml on edly-io/h5pxblock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
h5p_xblock-0.2.18-py3-none-any.whl -
Subject digest:
3ee2aa2365b8f8ca372bb5ebc29463d02a913867feadeec5ed1e9cba6f0ad853 - Sigstore transparency entry: 868254127
- Sigstore integration time:
-
Permalink:
edly-io/h5pxblock@9302b21070e29399b5d6768554596db6d5d9fd89 -
Branch / Tag:
refs/tags/v0.2.18 - Owner: https://github.com/edly-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yml@9302b21070e29399b5d6768554596db6d5d9fd89 -
Trigger Event:
push
-
Statement type: