sandstorm / neosh5p
Neos CMS 的 H5P 平台集成插件
Requires
- ext-zip: *
- guzzlehttp/guzzle: ~6.3.0
- h5p/h5p-core: ~1.20.0
- h5p/h5p-editor: ~1.20.0
- neos/neos: >=4.0.0
- neos/neos-ui: *
- dev-master
- 2.1.10
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.x-dev
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-h5p-migration
- dev-neos-upgrade
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/qs-6.11.0
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/shell-quote-1.7.3
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/async-2.6.4
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/chownr-1.1.4
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/mout-1.2.3
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/shelljs-0.8.5
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/tar-4.4.19
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/merge-1.2.1
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/lodash-4.17.21
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/dot-prop-4.2.1
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/y18n-3.2.2
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/ini-1.3.7
- dev-dependabot/npm_and_yarn/Resources/Private/Editors/websocket-extensions-0.1.4
This package is auto-updated.
Last update: 2024-09-22 13:16:54 UTC
README
此包不再维护
Neos CMS 的 H5P 平台集成插件
什么是 H5P?
H5P 是一个在浏览器中实现丰富内容的开放标准,主要用于(但不仅限于)学习和环境。它提供了各种可重用的内容类型,如记忆游戏、填空题、多项选择题等。要了解 H5P 及其内容类型的概览,请访问 https://h5p.org/content-types-and-applications。
此插件做什么?
此插件为 H5P 提供了与 Neos 内容应用平台 的平台集成,允许您在 Neos 中无缝使用 H5P 内容类型。
维护和兼容性
Sandstorm.NeosH5P 目前维护以下版本
安装
安装简单,包括以下步骤
- 运行
composer require sandstorm/neosh5p
- 通过
./flow doctrine:migrate
安装数据库模型 - 通过
./flow h5p:generateconfig
创建默认配置集 - 确保 H5P 核心资产(JS 和 CSS 文件)通过运行
./flow resource:publish
发布
就这样 - 您可以在网站上使用 H5P 内容了。您现在有一个新的插件节点类型 "H5P 内容",可以用来集成 H5P。您还有一个一组后端模块来创建和管理 H5P 内容、库、结果和设置。
请务必阅读并遵循以下集成指南,以充分利用 H5P 包。
使用方法
参考此视频了解如何使用 H5P 插件: https://www.youtube.com/watch?v=eslFaQ3oj7E
集成指南
1. 根据您的需求调整设置
检查 Configuration/Settings.yaml
文件,并根据您的需求调整配置设置。您通常不需要更改 h5pPublicFolder
键下的任何内容,因为它控制 H5P 插件的发布机制 - 这应该可以正常工作。您可以按需调整 configSettings
和 xAPI
下的任何内容。具体的配置设置在 Configuration/Settings.yaml
中直接描述。
重要:在更改 configSettings
键下的任何内容后,您需要重新运行 ./flow h5p:generateconfig
命令,将其放入数据库并使其可供 H5P 使用。这是出于设计考虑,因为 H5P 设计为允许管理员更改这些配置设置(我们尚未实现,并且可能永远不会实现)。
2. 配置内容结果和内容状态的保存
H5P 支持持久化内容状态(例如,多项选择题中当前选定的答案)和内容结果(例如,用户对多项选择题的答案)。为了在 Neos 中实现这一点,我们需要添加一些设置。
在你的网站的 Policy.yaml
包中,为想要使用控制器动作的角色提供权限。如果你正在使用前端登录包,如 Sandstorm.UserManagement,你的配置可能如下所示。将角色 Sandstorm.UserManagement:User
替换为你前端用户实际拥有的角色。如果你想为非登录用户保存内容结果和用户数据,请将其设置为 Neos.Flow:Everybody
。请注意 GDPR 的相关规定,因为此时你会保存与你的网站上 H5P 内容互动的每个用户的资料。
roles: Sandstorm.UserManagement:User: privileges: - privilegeTarget: 'Sandstorm.NeosH5P:FrontendControllerActions' permission: GRANT
3. 集成 xAPI
你可以通过实现自己的 FrontendUserServiceInterface
来控制哪个用户名和电子邮件地址被发送到 xAPI 语句中。以默认的 Sandstorm\NeosH5P\Domain\Service\FrontendUserService
为例。你需要在你的网站包的 Objects.yaml
中配置 Neos 使用你的实现。这将给你机会与自己的前端用户模型交互,并提取名称和电子邮件地址。
要将 xAPI 语句发送到 LRS 或其他外部端点,你需要提供一个处理发送过程的 JavaScript。这样,你可以控制发送过程,并在自己的包中处理任何登录/路由/语句操作的要求。此脚本会自动注入 - 你需要做的只是提供配置设置 Sandstorm.NeosH5P.xAPI.integrationScript
下脚本文件的路径。请参阅此包的 Settings.yaml
获取详细说明(请参阅配置中 "xAPI" 部分的注释)。
4. 设置定时任务以删除临时 H5P 编辑器文件
计划一个定时任务来删除所有 EditorTempfiles 和相关资源。当用户开始创建 H5P 内容元素并已上传资产(如图片)然后取消过程时,会创建 EditorTempfiles。我们为此提供了 CLI 命令:./flow h5p:cleareditortempfiles
。根据有多少用户创建 H5P 内容,这应该大约每周运行一次。
已知问题/待办事项
- 国际化尚未实现。
- H5P 编辑器中的表单验证未考虑。
- 全屏内容编辑器中的闪存消息无法工作。
- 尚未实现使用统计方法。
- 配置设置无法在 GUI 中更改,只能通过 CLI 命令更改(这可能没问题)。
许可
许可:MIT。
赞助商
感谢我们的宝贵客户 Deutsches Institut für Erwachsenenbildung Bonn 对此包的赞助!