Commit Graph

652 Commits (8a29796cabce76c59f798b0f9fb933e3a887620e)

Author SHA1 Message Date
Oliver Tacke d3a63dd756 HFP-2133 Fix additional space 2018-07-23 15:30:10 +02:00
Oliver Tacke e22766157b HFP-2133 Add Creative Commons acronyms 2018-07-23 14:57:14 +02:00
Oliver Tacke a295d7d434 HFP-1925 Fix typo 2018-07-12 10:07:01 +02:00
Oliver Tacke 972c7a13f6 HFP-2074 Remove CC prefix in license names
Now that the optgroup feature is in place, the prefix is obsolete
2018-06-28 11:44:01 +02:00
Oliver Tacke ae85ea3f2a Merge branch 'HFP-1905-metadata-system' of https://github.com/h5p/h5p-php-library into HFP-1905-metadata-system 2018-06-27 16:01:20 +02:00
Oliver Tacke 9432d80b23 HFP-2075 Don't require protocol for metadata source field 2018-06-27 15:59:34 +02:00
thomasmars d963a23a15 HFP-2074 Add optgroup to Creative Commons licenses in metadata dialog. 2018-06-26 10:51:48 +02:00
Oliver Tacke 4d286b0bdb Fix HFP-1905 Add CC for creative commons license names 2018-06-25 14:14:51 +02:00
Oliver Tacke 8190fe1d42 HFP-1896 Fix metadata form error handling 2018-06-25 11:31:09 +02:00
Oliver Tacke 2a53b7bb7b HFP-2059 Accept objects as library options, too
Compound content types should be able to deactivate the metadata
button for their subcontent types. This should be achievable
by amending the options property of a library field.

The options array can not either contains strings with library names
or objects with the property "name" (mandatory) and further properties,
one of them being "hasmetadata"
2018-06-22 13:45:59 +02:00
Oliver Tacke 04707a9f8a HFP-1871 Add function to load MathDisplay if params contain math 2018-06-13 18:36:23 +02:00
Oliver Tacke 367763a215 Merge remote-tracking branch 'origin/master' into HFP-1905-metadata-system 2018-06-05 13:07:01 +02:00
Oliver Tacke be77130fef HFP-1905 Require words for author roles 2018-06-05 08:54:12 +02:00
Oliver Tacke ea722126ff HFP-1905 Fix property naming and validation defaults
Fix property naming for more harmony (and peace in the world)
Fix validation on uploading content by adding Author as a role
2018-06-04 15:44:04 +02:00
thomasmars 3ce0adf418 HFP-1942 Add crossorigin api call.
Update minor version of core since interface changes
2018-06-01 11:09:45 +02:00
Oliver Tacke a30a93e62e HFP-1897 Set correct field types and boundaries 2018-05-29 17:23:06 +02:00
Oliver Tacke 47be831f49 HFP-1897 Fix author as default role 2018-05-29 17:00:56 +02:00
Oliver Tacke 00deb02aa7 HFP-1897 Set author as default role, change placeholder text for change 2018-05-28 18:01:28 +02:00
Oliver Tacke 3deda27f9b HFP-1898 Move mocked semantics to backend 2018-05-25 18:38:42 +02:00
Paal Joergensen d99ab7eda2 HFP-1994 Bump core minor version 2018-05-08 11:30:54 +02:00
Oliver Tacke 3b38e273eb HFP-1905 Bump minor core version number 2018-04-06 17:11:33 +02:00
Oliver Tacke b28624ba8e HFP-1905 Allow metadata as keyword for subcontent 2018-03-26 17:44:00 +02:00
Oliver Tacke c589285351 HFP-1905 Fix unset values for array fields
Some array fields were filled with undefined and lead to warnings.
2018-03-26 11:24:26 +02:00
Oliver Tacke 6ef2f96e8b HFP-1905 Add logic for download/upload
Add metadata fields to h5p.json
2018-03-23 13:11:00 +01:00
Paal Joergensen 95901159d0 HFP-1768 Send core api version as a single element 2017-11-23 15:15:03 +01:00
Paal Joergensen 90d1e7579d HFP-1768 Add api core version to requests to api.h5p.org 2017-11-23 11:39:03 +01:00
Frode Petterson f3efd217c8 HFP-1678 Remove unsued variable 2017-11-20 16:12:22 +01:00
Paal Joergensen f91f2e82fb HFP-1678 Add error code to error messages 2017-11-16 16:24:29 +01:00
Frode Petterson 6798e0bbbf HFP-924 Add singular version of plural install info 2017-11-15 13:24:56 +01:00
Frode Petterson 717edc2a6f HFP-924 Add support for more detailed messages when using AJAX 2017-11-14 15:06:54 +01:00
Frode Petterson 500c264b88 Merge branch 'master' of github.com:h5p/h5p-php-library 2017-08-28 10:49:57 +02:00
Frode Petterson dfdfb3bd99 Add prevent deleting sub content of linked directories
Sometimes devs may link to library folders elsewhere, then we
should prevent traversing and deleting the linked content.
Default behavior now is to remove the link and not its content.
2017-08-28 10:45:54 +02:00
Paal Joergensen 64f170b8a3 Define H5P Hub endpoints one place in code 2017-08-24 12:40:53 +02:00
Frode Petterson 7728243c18 Improve hashing logic 2017-07-27 13:36:51 +02:00
Cornel Les 75803f8dfb Fixing font-family regex pattern when validating text 2017-07-20 17:54:12 +03:00
Frode Petterson 3a2cd46f6a Merge branch 'HFP-1174-feedback' 2017-07-13 13:30:39 +02:00
Frode Petterson cc5440cc4a Merge branch 'master' into HFP-1100-improve-file-handling 2017-07-07 10:59:38 +02:00
Frode Petterson b1531bcbc0 Add support for temporary file suffix
HFP-1100
2017-07-07 10:51:57 +02:00
Timothy Lim 91ff99145a HFP-1258 Whitelist .webvtt 2017-07-07 10:11:23 +02:00
Timothy Lim cc7caa6604 HFP-1258 Whitelist .vtt extension 2017-07-07 09:56:24 +02:00
Frode Petterson 6444c1443b Bump coreApi due to editor changes
HFP-1174
2017-06-26 10:43:59 +02:00
Paal Joergensen 46d772cb51 Added missing parameter in getLibraryUsage [HFP-1067] 2017-05-31 11:17:28 +02:00
Frode Petterson 9adc92d3c4 Move license definition for localization to work
HFP-1079
2017-05-30 15:43:26 +02:00
Frode Petterson 59fd08594f Support localized licenses
HFP-1079
2017-05-30 15:23:25 +02:00
Frode Petterson 42e0c99fd3 Add version info to license
HFP-1079
2017-05-30 14:12:22 +02:00
thomasmars fa31c56dce Fixed returnBytes function return correct amount of bytes 2017-05-29 11:18:12 +02:00
thomasmars 0ce7d66c3a Cast bytes to int before multiplying it.
Removes warning in PHP 7.0+
2017-05-25 13:52:50 +02:00
thomasmars d1bbed49fc Don't assume fetchLibrariesMetadata is AJAX
HFP-1103
2017-05-22 12:57:43 +02:00
Paal Joergensen 677adb0d8a HFP-1035 Whitelisted wav files 2017-05-03 10:02:27 +02:00
Paal Joergensen 3fda439aa1 Bumping core version 2017-05-02 10:30:27 +02:00
Timothy Lim fb76e09e8c HFP-967 Revert a revert
Ensures that latest code from stable is added.
2017-04-25 16:30:52 +02:00
Timothy Lim 56e453f6c1 HFP-967 Apply correct changes 2017-04-25 15:59:25 +02:00
Timothy Lim edb9e6244c Revert "HFP-967 Update content validator to handle headers and tables"
This reverts commit 9ee5d2ebe7.
2017-04-25 15:58:28 +02:00
Timothy Lim 9ee5d2ebe7 HFP-967 Update content validator to handle headers and tables 2017-04-25 15:37:04 +02:00
Frode Petterson c475db843d Separate statistics reporting from 'Use H5P Hub' option
JI-114
2017-04-10 14:09:02 +02:00
Frode Petterson 29fd758bf5 Update phpdoc
HFP-884
2017-04-04 12:44:22 +02:00
Frode Petterson c5974e6212 Update fetch api 2017-04-03 14:51:54 +02:00
Frode Petterson 280946979f Remove update functionality
JI-111
2017-04-03 13:33:47 +02:00
Timothy Lim 33406c69cc JI-89 Fix spelling error 2017-03-28 13:32:30 +02:00
thomasmars d3d5dbe1a7 Removed api_version from site data, since it is part of url now. 2017-03-21 14:48:52 +01:00
thomasmars 3611da5921 Only send the necessary data when registering a site
Merge in the rest of the metadata when fetching ct cache
HFP-489
2017-03-18 15:39:27 +01:00
thomasmars 4098f7a0d9 Merge branches 'HFP-822-ajax-refactor' and 'master' of https://github.com/h5p/h5p-php-library into HFP-822-ajax-refactor
# Conflicts:
#	h5p.classes.php
2017-03-16 20:01:08 +01:00
thomasmars fd93b30a38 Fixed return statement of fetch libraries metadata
HFP-489
2017-03-16 10:09:52 +01:00
thomasmars 675c87df68 Added more detailed messages when site is or fails to register
HFP-489
2017-03-16 10:01:41 +01:00
thomasmars 93e9d6e0ec Register site with new endpoint if no site is already registered
HFP-489
2017-03-16 09:51:46 +01:00
thomasmars 754346992b Minor documentation details 2017-03-14 14:21:36 +01:00
thomasmars 1b19f2701d Make data optional in fetchExternalData function
HFP-822
2017-03-13 14:56:01 +01:00
thomasmars cf3022af43 Moved editor specific functionality to editor interface
Refactored hub endpoints into an abstract class for consistency and easier lookup
Fixed bug in moveContentDirectory function
HFP-822
2017-03-12 17:56:36 +01:00
thomasmars 0970f74b43 Made it easier to use ajax functions in core with existing endpoints
Moved common ajax functionality to core.
Created interface functions for ajax functionality that must be handled by each plugin
Re-encapsulated storage functions to keep a clean interface
Added function for moving temp files to the editor
HFP-822
2017-03-11 18:43:08 +01:00
Paal Joergensen b3e0539261 Resetting [HFP-805] 2017-03-10 14:29:49 +01:00
Frode Petterson 907396e49b Merge branch 'master' of github.com:h5p/h5p-php-library 2017-03-10 13:06:31 +01:00
Frode Petterson 2b327323e1 Add missing default 2017-03-10 13:06:19 +01:00
Paal Joergensen f247bbdfe8 Improved json returned from content type cache endpoint 2017-03-07 11:24:08 +01:00
Paal Joergensen 914ee55ac5 Fixed broken core - using wrong function name [HFP-805] 2017-03-07 10:36:49 +01:00
Paal Joergensen 37f4399ab4 Added interface function that returns library file URL [HFP-805] 2017-03-07 10:25:52 +01:00
Paal Joergensen c8b123c5c3 Using local icon if present (HFP-807) 2017-03-07 09:46:16 +01:00
thomasmars ae56eef91d Use ID instead of library_id for lbiraries
HFP-793
2017-03-03 15:45:19 +01:00
thomasmars a95323948e Improved upload size error msg
HFP-509
2017-03-03 14:47:15 +01:00
thomasmars 217c2006a4 Separate between setup error messages and disabling hub
HFP-509
2017-03-03 11:29:09 +01:00
thomasmars 318b9f4819 Restrict LRS dependent content if set
HFP-797
2017-03-03 10:43:39 +01:00
thomasmars 410c2a9ae1 Added permission check for restricted local libraries
Renamed cached library map function to something more appropriate
HFP-797
2017-03-03 10:33:21 +01:00
thomasmars 0af411bac8 Send json as camelCase
HFP-794
2017-03-02 14:39:36 +01:00
thomasmars c0e82edfb4 Fixed endpoint address
HFP-794
2017-03-02 14:25:30 +01:00
thomasmars 79e32f0a7f Added proper protocol for endpoints
HFP-794
2017-03-02 14:21:11 +01:00
thomasmars 515365d8df Add common hub endpoint to core
HFP-794
2017-03-02 14:14:26 +01:00
thomasmars 34b8a2fb58 Updated phpdocs
HFP-797
2017-03-02 13:10:00 +01:00
thomasmars 16228b3086 Merge branch 'master' of https://github.com/h5p/h5p-php-library 2017-03-02 12:49:45 +01:00
thomasmars 0e2edff5a8 Helper functions for ct cache
Generates properly formatted json from content type cache
Merges content type cache with locally installed libraries
HFP-797
2017-03-02 12:48:30 +01:00
Paal Joergensen 3dbb8fae70 Added check for icon.svg [HFP-806] 2017-03-02 11:43:45 +01:00
Frode Petterson b6ca0cd2df Merge branch 'master' of github.com:h5p/h5p-php-library 2017-02-28 13:05:50 +01:00
Frode Petterson 0f08031abf Allow Core to override permission check
HFP-504 HFP-505
2017-02-28 13:05:11 +01:00
thomasmars 362464ad56 Updated endpoint
JI-90
2017-02-27 16:01:08 +01:00
Frode Petterson a83ea9999d Merge branch 'master' of github.com:h5p/h5p-php-library 2017-02-27 14:15:17 +01:00
thomasmars 3068d58b2b Make update content type cache function public
JI-53
2017-02-24 17:00:43 +01:00
thomasmars 933b95f5ce Allow ajaxError to specify an error code as well.
JI-53
2017-02-24 16:34:16 +01:00
thomasmars ec5a164971 Send in current content type cache update timestamp when updating content type cache
JI-53
2017-02-24 16:06:55 +01:00
thomasmars 0641b3b824 Restored old package and tutorial functionality
Removed uuid registration, will need separate endpoint
Use time instead of localized time when setting ct cache update time
Changed variable names to match API docs
2017-02-24 15:38:49 +01:00
thomasmars 2b5a10bec6 Merge branches 'HFP-502-install-errors' and 'master' of https://github.com/h5p/h5p-php-library 2017-02-24 14:11:07 +01:00
thomasmars 585f4d238a Fixed incorrect hub enabled value after server check
HFP-502
2017-02-23 15:22:55 +01:00
thomasmars e88a23d265 Changed hub variable name to match new settings name
HFP-502
2017-02-23 14:54:37 +01:00
thomasmars aa861fc8ce Make disable hub, into enable hub to match the checkbox state.
Implemented write access check
HFP-502
2017-02-23 14:20:56 +01:00
thomasmars 183ec0a930 Pass postData as array when fetching external ct cache data
JI-54
2017-02-23 13:28:59 +01:00
thomasmars 4a8a791327 Fixed default arg for update content type cache
JI-53
2017-02-23 12:43:18 +01:00
thomasmars 952a07456c Merge fetch libraries metadata and update content type cache into one request.
Use fetchExteralData instead of adding new functionality since we're now using post.
JI-53
2017-02-23 11:33:39 +01:00
thomasmars ff531a157c Improved error msg and check for openssl extension
HFP-502
2017-02-22 18:29:21 +01:00
thomasmars 1f7d03dfd4 Don't use verb in setting name.
HFP-502
2017-02-22 18:03:23 +01:00
thomasmars f556cde385 Added localized time interface for displaying correct time of content type cache update.
JI-53
2017-02-22 16:20:09 +01:00
thomasmars 58cbfc7f0c Moved update content type cache into library core and interface.
JI-53
2017-02-22 14:50:45 +01:00
Frode Petterson 79fa5076f2 Use realpath() instead of document root = safer
Document root might be rewritten or incorrect for some sites(observed on multiple WP)
HFP-784
2017-02-22 11:25:05 +01:00
thomasmars 24fd6b1bc5 Made server setup check return errors instead of setting them.
This is useful in cases where you want to process the error messages differently
HFP-502
2017-02-22 11:14:35 +01:00
thomasmars c4affb23dd Added confirmation dialog functionality when disabling hub.
Refactored server setup check into check and var updates.
Moved bytes string parsing out of server setup check and fixed naming convention.
Fixed indentation to match library core instead of Moodle style.
2017-02-21 17:37:01 +01:00
thomasmars c70f8521bb Use core naming convention for requirements function
HFP-502
2017-02-21 14:31:01 +01:00
thomasmars ff496d9a38 Check for H5P requirements.
HFP-502
2017-02-21 14:01:49 +01:00
Frode Petterson ea3b86dcfe Development mode must be set by default
HFP-724
2017-02-07 12:55:53 +01:00
Timothy Lim 3b9dd95683 HFP-580 Update regex 2017-01-30 14:49:09 +01:00
Paal Joergensen ef4165a11d Fixed developer mode for Drupal 2017-01-30 11:38:34 +01:00
Frode Petterson 9abe7ef321 Merge branch 'master' of github.com:h5p/h5p-php-library 2017-01-26 15:35:53 +01:00
Timothy Lim 5dc9e3ddd1 HFP-580 Handle language files with hyphens 2017-01-26 15:31:51 +01:00
Frode Petterson 95cfaf6b9e Merge branch 'master' into improved-file-handling 2017-01-26 14:12:43 +01:00
Frode Petterson e02df35bb1 Fix compability with PHP <5.4
Big thanks to andyrandom at drupal.org for providing the fix.
2017-01-26 10:37:26 +01:00
Paal Joergensen a41df0ad9e Merge branch 'master' into improved-file-handling 2016-12-21 15:17:56 +01:00
Paal Joergensen e00bdbd125 Making sure displayoptions.icon is a boolean [HFP-277] 2016-12-21 15:17:36 +01:00
Paal Joergensen 20042fba85 Merge branch 'master' into improved-file-handling 2016-12-21 13:34:06 +01:00
Paal Joergensen 117e1457b7 Merge branch 'master' into improved-embed-and-download 2016-12-20 14:37:52 +01:00
Paal Joergensen 87ec43d687 Using constants for the different display options, and avoid special cases [HFP-277] 2016-12-16 14:22:03 +01:00
Paal Joergensen 7b39a6900c Inheriting global disable setting for export & embed when saving [HFP-277] 2016-12-16 13:29:18 +01:00
Paal Joergensen ea0362c3da Making lines shorter [HFP-277] 2016-12-16 13:27:40 +01:00
Paal Joergensen a1e68d212b Updated comments [HFP-277] 2016-12-16 11:38:47 +01:00
Paal Joergensen cfd6cb1e63 Fixed download/embed button bug when permissions are used 2016-12-13 15:57:05 +01:00
thomasmars a326066c97 Only set tutorial url if it exists.
HFP-348
2016-12-13 11:36:28 +01:00
Paal Joergensen e69a81f403 Added description of new interface method [HFP-277] 2016-12-13 10:33:59 +01:00
Paal Joergensen 0a23dc043d Download and embed granularity (HFP-277) 2016-12-13 10:29:33 +01:00
Timothy Lim a4d6f3aaab Restore deprecated variable H5P.canHasFullScreen for backwards compatability
HFP-339
2016-12-12 11:28:59 +01:00
thomasmars 47c35d5135 Merge branches 'master' and 'stable' of https://github.com/h5p/h5p-php-library 2016-12-06 11:35:24 +01:00
Paal Joergensen 4d010ef38f Improved message presented to user 2016-12-01 11:34:28 +01:00
Paal Joergensen ed1fb00745 Merge branch 'release' into improved-file-handling 2016-11-30 11:19:08 +01:00
Tom Arild Jakobsen 32d06356b1 Bump to version 1.11
Relates to: #HFP-285
2016-11-29 16:44:20 +01:00
Tom Arild Jakobsen 5494443533 validateGroup must handle isSubContent
* Update validateGroup in h4p.classes.php to allow subContentId into the data
 * Fix h5p-content-upgrade-process.js to take into account isSubContent

Relates to: #HFP-285
2016-11-29 15:44:32 +01:00
Tom Arild Jakobsen 0882879552 Allow subContentId in group validation. Relates to: #HFP-285 2016-11-28 14:55:57 +01:00
Tom Arild Jakobsen b4615e01b1 Allow subContentId in group validation. Relates to: #HFP-285 2016-11-28 14:54:33 +01:00
Frode Petterson 08a1cece26 Merge branch 'master' into improved-file-handling 2016-10-27 11:20:18 +02:00
thomasmars f28036ca0e Bumped core API version because of API changes in editor 2016-10-21 09:53:59 +02:00
Frode Petterson c9e5680e85 Merge branch 'master' into improved-file-handling 2016-10-03 15:12:32 +02:00
Frode Petterson e4266efb22 Added framework method to clear dirsize cache
HFP-23
2016-09-30 13:41:50 +02:00
Mikael Lindqvist ce796cf0cf don't fail silently in createExportFile 2016-09-26 12:05:02 +02:00
Frode Petterson 1c5b9707e5 Regenerate export if missing on view
Thanks to paravibe on Drupal.org for contributing.
2016-09-23 10:52:40 +02:00
Frode Petterson 263a987eeb Added document root when creating zip
Thanks to paravibe on Drupal.org for contributing.
2016-09-23 10:31:55 +02:00
Frode Petterson f0e7ea1283 Merge branch 'moodle-rc3' into improved-file-handling 2016-09-23 10:14:19 +02:00
Paal Joergensen 5f38e2b7f8 Bumped core because of bugfix for optional selects [HFJ-2183] 2016-09-21 13:22:35 +02:00
Frode Petterson fd34af6964 Use content array instead of just id
Makes it easier when additional properties are needed.
Also, don't try to translate PHP exception messages.
h5p/h5p-moodle-plugin#112
2016-09-14 10:44:10 +02:00