├── .gitignore ├── pix ├── icon.png └── icon.svg ├── templates ├── contact_site_administrator.mustache ├── iframe_embedding_disabled.mustache ├── mobile_view_page.mustache └── review.mustache ├── .jshintrc ├── .gitmodules ├── thirdpartylibs.xml ├── embed.css ├── settings-hide-key.js ├── version.php ├── db ├── events.php ├── mobile.php ├── messages.php ├── tasks.php ├── install.php └── access.php ├── editor.js ├── dataviews.js ├── classes ├── event │ ├── course_module_instance_list_viewed.php │ ├── attempt_submitted.php │ └── course_module_viewed.php ├── task │ ├── remove_old_log_entries.php │ ├── look_for_updates.php │ ├── remove_old_auth_tokens.php │ └── remove_tmpfiles.php ├── content_type_cache_form.php ├── event.php ├── output │ └── mobile.php ├── mobile_auth.php ├── xapi_result.php ├── upload_libraries_form.php ├── editor_ajax.php ├── user_grades.php ├── content_user_data.php └── view_assets.php ├── xapi-custom-report.css ├── styles.css ├── README.md ├── view.php ├── renderer.php ├── backup └── moodle2 │ ├── backup_hvp_activity_task.class.php │ ├── restore_hvp_activity_task.class.php │ ├── backup_hvp_stepslib.php │ └── restore_hvp_stepslib.php ├── autoloader.php ├── embed.php ├── embed.js ├── index.php ├── .travis.yml ├── upgrade_content_page.php ├── grade.php ├── library_list.php ├── xapi-collector.js ├── .eslintrc ├── settings.php ├── review.php └── ajax.php /.gitignore: -------------------------------------------------------------------------------- 1 | files/tmp/* 2 | files/content/* 3 | files/libraries/* 4 | *~ 5 | -------------------------------------------------------------------------------- /pix/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-mod_hvp/stable/pix/icon.png -------------------------------------------------------------------------------- /templates/contact_site_administrator.mustache: -------------------------------------------------------------------------------- 1 |
This site is not configured properly for displaying mobile H5P content. Please contact a site administrator.
-------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esversion": 6, 3 | "globals": { 4 | "H5PDataView": true, 5 | "H5P": true, 6 | "H5PIntegration": true, 7 | "HVPSettingsHideKey": true, 8 | "console": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /templates/iframe_embedding_disabled.mustache: -------------------------------------------------------------------------------- 1 |
2 |
Iframe embedding must be enabled in order to display H5P content in the mobile app.
3 |
You can enable it by checking "Allow frame embedding" in Site Administration / Security / Http Security
4 |
-------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "library"] 2 | path = library 3 | url = https://github.com/h5p/h5p-php-library.git 4 | branch = stable 5 | [submodule "editor"] 6 | path = editor 7 | url = https://github.com/h5p/h5p-editor-php-library.git 8 | branch = stable 9 | [submodule "reporting"] 10 | path = reporting 11 | url = https://github.com/h5p/h5p-php-report.git 12 | branch = stable 13 | -------------------------------------------------------------------------------- /templates/mobile_view_page.mustache: -------------------------------------------------------------------------------- 1 | {{=<% %>=}} 2 |
3 | 9 |
10 | -------------------------------------------------------------------------------- /thirdpartylibs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | library 5 | H5P Core 6 | 1.13 7 | MIT 8 | 9 | 10 | editor 11 | H5P Editor 12 | (86b5450) 13 | MIT 14 | 15 | 16 | reporting 17 | H5P Reporting 18 | (8fe2c5d) 19 | MIT 20 | 21 | 22 | -------------------------------------------------------------------------------- /embed.css: -------------------------------------------------------------------------------- 1 | body.h5p-embed { 2 | font-family: Sans-Serif; 3 | width: 100%; 4 | height: 100%; 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | body.h5p-embed.h5p-resizing { 10 | overflow: hidden; 11 | } 12 | 13 | body.h5p-embed .h5p-container { 14 | overflow: hidden; 15 | } 16 | 17 | body.h5p-embed .h5p-content { 18 | font-size: 16px; 19 | line-height: 1.5em; 20 | width: 100%; 21 | height: auto; 22 | } 23 | 24 | body.h5p-embed .h5p-fullscreen .h5p-content, 25 | body.h5p-embed .h5p-semi-fullscreen .h5p-content { 26 | height: 100%; 27 | } 28 | 29 | body.h5p-embed .clearer, 30 | body.h5p-embed #maincontent, 31 | body.h5p-embed #user-notifications { 32 | display: none; 33 | } -------------------------------------------------------------------------------- /settings-hide-key.js: -------------------------------------------------------------------------------- 1 | /* global HVPSettingsHideKey */ 2 | /** 3 | * Prepares for hiding of the Site Key setting since you cannot modify attributes and such in Moodle. 4 | */ 5 | (function($) { 6 | $(document).ready(function() { 7 | if (!window.HVPSettingsHideKey) { 8 | return; 9 | } 10 | 11 | var $input = $('#' + HVPSettingsHideKey.input); 12 | if (!$input.length) { 13 | return; 14 | } 15 | 16 | var placeHolder = $input.val() || HVPSettingsHideKey.value ? HVPSettingsHideKey.placeholder : HVPSettingsHideKey.empty; 17 | $input.attr('maxlength', 36) 18 | .attr('placeholder', placeHolder) 19 | .data('value', HVPSettingsHideKey.value) 20 | .val(''); 21 | 22 | $('