![]() You can upload your changes to your Drupal 8 system when you're done. That's our recommended system that's prepared for this job. My suggestion is that you simply use Drupal 7 for development. It needs to contain the ID of the memory library, the ID of the timer library (both from the table h5p_libraries) and the depencency type "preloaded". Alternatively, you could add the missing row to the database table. However, without a dev mode, you'll have to increment the patch version of the library every time you do that, because libraries will not be replaced with the same version. ![]() ![]() You could either do that manually, or pack your source (wherever it is, doesn't have to be the H5P library folder in that case) using h5p_cli and upload the library file to drupal. I can only assume that Drupal 8 (without a dev mode) doesn't update the database table that holds the libraries that need to be loaded for a content type ("h5p_libraries_libraries"). The library json file will not be loaded by the browser, but by the PHP based core of the H5P plugin, that's why you don't see it on the the network tab. I assume WE really need to update our documentation and/or add some links to other resources! That's a so callled "linter" that can be included in development environments and will instantly give you a hint if your code violates the coding style.Īpart from pure formatting, there are other general best practices of course, and also some particular things for H5P. We also provide a configuration file for eslint. It's not supposed to be the "correct" coding style, just a convention for our project. To make the code look uniform on H5P, we have provided some style guide at. Some developers may have forgotton that they were not born as "super stars", but in general, everyone is pretty much aware that your first steps are most likely to be "non standard" -) You should NEVER be afraid of sharing your code on github. Cleaning it up however should force the H5P core to rebuild it from the regular libraries folder. I've never used Drupal 8 for development however (as it doesn't have a dev mode), and so I am not sure what it's called there. On WordPress, it's wp-content/uploads/h5p/cachedassets, on drupal 7 it seems to be sites/default/files/h5p/temp. You can then check if the browser is loading the files that you modified, or if it's loading from another location - usually the cache.Īs I mentioned, there's a special folder that's used to cache libraries. You should maybe check which files are loaded from where using the development console (network tab) that most browsers offer you by pressing F12. Thanks for being so patient with me and helping out far far beyond any support you might be obliged to give! thanks. I shall continue in this tread as to not cause confusion again. I now have 6 lines of code witch hardly seems enough) This code probably is not up to standard so i am scared of offering it on github maybe screwing up the main code as I asked is there a guideline to what the code needs to be before I should submit it ? (to clarify I know how to offer it on github But I like code formating guide as to where it should be placed and how complete it should be. (still learning how to get the timer to continue when browser is refreshed.) when i am done i like to share my code. I am learning coding and i did manage to get a nice timer to work with the quiz i am still fine tunning it. I am so new at this you can still smell the green paint :) so i must be doing something stupid. I hope you can point me into the correct direction or anyone else. I edited liberary.json at /sites/default/files/h5p/libraries/H5P.QuestionSet-1.15 to load the timer.js Also placed timer.js in /js dir where questionset.js is as well and point to that directly from the library file. I loaded the timer.js in drupal under content -> H5P Liberary. So i thought the js files of H5P must be cached as wel somewhere. When manualy editing the files i never get timer.js loaded cache cleared, drupal in dev mode i tried all of them. Din't mean avoid you just follow proper structure. Thats why i asked here din't want to bother you when the issue might be with H5P. Yes but its not loading so i figured I needed the dev mode.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |