redip / h5p-bundle
Symfony 的 H5P Bundle
0.3.0
2018-07-24 08:42 UTC
Requires
- doctrine/orm: ~2.4
- guzzlehttp/guzzle: ~6.0
- h5p/h5p-core: ^1.17
- h5p/h5p-editor: ^1.17
- symfony/framework-bundle: ~2.7|~3.0
This package is auto-updated.
Last update: 2024-09-25 07:43:26 UTC
README
将 H5P 集成到 Symfony 中的 Bundle。此 Bundle 是 H5P Drupal 模块的移植。有关 H5P 的更多信息,请参阅 H5P.org
此 Bundle 在 Symfony 3.4 上进行了测试
安装
使用 composer 安装
composer require emmedy/h5p-bundle
在 AppKernel.php
中启用该 Bundle
$bundles = array( // ... new Emmedy\H5PBundle\EmmedyH5PBundle(), )
将 H5P 资产添加到 Bundle
php app/console h5p-bundle:include-assets php app/console assets:install --symlink
将所需的表和关系添加到数据库
php app/console doctrine:schema:update --force
在 routing.yml
中启用路由
emmedy_h5p.demo: resource: "@EmmedyH5PBundle/Resources/config/routing_demo.yml" prefix: / emmedy_h5p: resource: "@EmmedyH5PBundle/Resources/config/routing.yml" prefix: /
emmedy_h5p.demo 是可选的。它可以作为在 Symfony 中使用 H5P 的示例,并测试此 Bundle 是否正常工作。
配置
在 config.yml
中配置 Bundle。(注意 h5 和 p 之间的下划线)
emmedy_h5_p: use_permission: true # This is false by default to let the demo work out of the box. storage_dir: h5p # Location to store all H5P libraries and files web_dir: web # Location of the public web directory
有关所有配置信息,请参阅 Configuration.php
使用方法
首先添加一个指向您项目的虚拟主机。然后在浏览器中访问 http://<您的虚拟主机>/h5p/list
待办事项
尚未移植所有内容。以下事项还需要完成:
- 上传库。目前只能从 Hub 中选择 H5P 默认库。
- 下载包
- 嵌入包
- 存储使用数据和分数