h5p-xblock


Nameh5p-xblock JSON
Version 0.2.15 PyPI version JSON
download
home_pagehttps://github.com/edly-io/h5pxblock
SummaryXBlock to play self hosted h5p content inside open edX
upload_time2024-10-21 07:53:05
maintainerNone
docs_urlNone
authoredly
requires_pythonNone
licenseMIT
keywords python edx h5p xblock
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# 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

1. Ability to mark H5P content complete in open edX
2. Ability to capture score of H5P content in open edX
3. Save learner state which can be retrieved later
4. Ability to host H5P content on cloud storage like AWS S3

## Setup

### Install Xblock

```bash
pip install h5p-xblock
```

or if you're using tutor to manage your organization:

```bash
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`

![Update course advanced settings](https://github.com/edly-io/h5pxblock/blob/master/docs/images/course_advance_settings.png?raw=true)

### 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.

![Upload and configure H5P content in Studio](https://github.com/edly-io/h5pxblock/blob/master/docs/images/upload_content.png?raw=true)

### 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

![Preview H5P content in LMS](https://github.com/edly-io/h5pxblock/blob/master/docs/images/preview_content.png?raw=true)

### Configuring S3 as a Storage Backend

H5P relies on ``DEFAULT_FILE_STORAGE`` setting to stores h5p content. In case of S3 storage, make sure your platform level S3 storage settings are set appropriately. If you either have set ``AWS_QUERYSTRING_AUTH = True`` then you have to set custom S3 storage settings for H5P xblock since singed url are not supported or if you want to store H5P content in a separate S3 bucket instead of default one you have to set custom S3 storage settings too.

Here is the required configuration:

```python
H5PXBLOCK_STORAGE = {
    "storage_class": "storages.backends.s3boto3.S3Boto3Storage",
    "settings": {
        "bucket_name": "my-s3-public-bucket",
        "querystring_auth": False,
    },
}
```

Please ensure that your bucket is publicly accessible to enable seamless content storage and retrieval via S3.

## Working with translations

You can help by translating this project. Follow the steps below:

1. You need `i18n_tool` to "collect" and "compile" translations. If you already have it, proceed to the next item; otherwise:

```bash
pip install git+https://github.com/openedx/i18n-tools
```

1. Create a folder for the translations in `locale/`, eg: `locale/es_419/LC_MESSAGES/`, and create your `text.po` file
with all the translations.
1. Run `make compile_translations`, this will generate the `text.mo` file.
1. Create a pull request with your changes.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/edly-io/h5pxblock",
    "name": "h5p-xblock",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python edx h5p xblock",
    "author": "edly",
    "author_email": "hello@edly.io",
    "download_url": "https://files.pythonhosted.org/packages/c6/a8/b79b4240d0359d34e5d8b63815b3eeffc419bbc5169076f61004f1bf6949/h5p_xblock-0.2.15.tar.gz",
    "platform": null,
    "description": "\n# Play H5P content in Open edX using h5pxblock\n\nH5P Xblock provides ability to host and play H5P content in open edX. It has few more features\n\n1. Ability to mark H5P content complete in open edX\n2. Ability to capture score of H5P content in open edX\n3. Save learner state which can be retrieved later\n4. Ability to host H5P content on cloud storage like AWS S3\n\n## Setup\n\n### Install Xblock\n\n```bash\npip install h5p-xblock\n```\n\nor if you're using tutor to manage your organization:\n\n```bash\ntutor config save --append OPENEDX_EXTRA_PIP_REQUIREMENTS=h5p-xblock\ntutor images build openedx\n```\n\n### Update Advanced Settings of course\n\nUpdate course advanced settings by adding `h5pxblock`\n\n![Update course advanced settings](https://github.com/edly-io/h5pxblock/blob/master/docs/images/course_advance_settings.png?raw=true)\n\n### Upload H5P Content\n\nXblock 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.\n\n![Upload and configure H5P content in Studio](https://github.com/edly-io/h5pxblock/blob/master/docs/images/upload_content.png?raw=true)\n\n### Publish Content\n\nUse \"Preview\" button to preview it or publish your content and use \"View Live Version\" button to see how it appears on LMS\n\n![Preview H5P content in LMS](https://github.com/edly-io/h5pxblock/blob/master/docs/images/preview_content.png?raw=true)\n\n### Configuring S3 as a Storage Backend\n\nH5P relies on ``DEFAULT_FILE_STORAGE`` setting to stores h5p content. In case of S3 storage, make sure your platform level S3 storage settings are set appropriately. If you either have set ``AWS_QUERYSTRING_AUTH = True`` then you have to set custom S3 storage settings for H5P xblock since singed url are not supported or if you want to store H5P content in a separate S3 bucket instead of default one you have to set custom S3 storage settings too.\n\nHere is the required configuration:\n\n```python\nH5PXBLOCK_STORAGE = {\n    \"storage_class\": \"storages.backends.s3boto3.S3Boto3Storage\",\n    \"settings\": {\n        \"bucket_name\": \"my-s3-public-bucket\",\n        \"querystring_auth\": False,\n    },\n}\n```\n\nPlease ensure that your bucket is publicly accessible to enable seamless content storage and retrieval via S3.\n\n## Working with translations\n\nYou can help by translating this project. Follow the steps below:\n\n1. You need `i18n_tool` to \"collect\" and \"compile\" translations. If you already have it, proceed to the next item; otherwise:\n\n```bash\npip install git+https://github.com/openedx/i18n-tools\n```\n\n1. Create a folder for the translations in `locale/`, eg: `locale/es_419/LC_MESSAGES/`, and create your `text.po` file\nwith all the translations.\n1. Run `make compile_translations`, this will generate the `text.mo` file.\n1. Create a pull request with your changes.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "XBlock to play self hosted h5p content inside open edX",
    "version": "0.2.15",
    "project_urls": {
        "Homepage": "https://github.com/edly-io/h5pxblock"
    },
    "split_keywords": [
        "python",
        "edx",
        "h5p",
        "xblock"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f2e7eb578174eedca0c6722715e99153329d35c47522ff4220b2bf58aa8e0744",
                "md5": "a6a6db46f50a86f33865023391334538",
                "sha256": "05bd9d6e00442f251322cf837d81d04b9f8689b949f8756245a5567d6da8409e"
            },
            "downloads": -1,
            "filename": "h5p_xblock-0.2.15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a6a6db46f50a86f33865023391334538",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 42396,
            "upload_time": "2024-10-21T07:53:04",
            "upload_time_iso_8601": "2024-10-21T07:53:04.059086Z",
            "url": "https://files.pythonhosted.org/packages/f2/e7/eb578174eedca0c6722715e99153329d35c47522ff4220b2bf58aa8e0744/h5p_xblock-0.2.15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6a8b79b4240d0359d34e5d8b63815b3eeffc419bbc5169076f61004f1bf6949",
                "md5": "abcabbfdc02162b23ba1ecc284554809",
                "sha256": "46ab184d9851ba58ac17ee61b93b7d1ef7f4ae90f9539cce24e9e094369be33c"
            },
            "downloads": -1,
            "filename": "h5p_xblock-0.2.15.tar.gz",
            "has_sig": false,
            "md5_digest": "abcabbfdc02162b23ba1ecc284554809",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 25764,
            "upload_time": "2024-10-21T07:53:05",
            "upload_time_iso_8601": "2024-10-21T07:53:05.090610Z",
            "url": "https://files.pythonhosted.org/packages/c6/a8/b79b4240d0359d34e5d8b63815b3eeffc419bbc5169076f61004f1bf6949/h5p_xblock-0.2.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-21 07:53:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "edly-io",
    "github_project": "h5pxblock",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "h5p-xblock"
}
        
Elapsed time: 0.33170s