File for download
Submitted by farrisimin on Wed, 05/31/2023 - 15:31
Forums:
Hi there,
I believe I saw this somewhere, or maybe I wrote a request before. It is highly needed to have special in mathematics classrooms where students learn an activity and can download a file for practice. I really hope it could be shared here. Thanks in advance!!
otacke
Wed, 05/31/2023 - 23:40
Permalink
Done before you even asked ;-
Done before you even asked ;-)
https://github.com/otacke/h5p-file-for-download
farrisimin
Thu, 06/01/2023 - 19:08
Permalink
Thank you so much Oliver..
Thank you so much Oliver.. This is really good!!
farrisimin
Tue, 06/06/2023 - 16:12
Permalink
Hi Oliver,Small question,
Hi Oliver,
Small question, does the file download work for pdf and doc files, as sometimes there is a need for that in higher grades to consolidate the learning or will it only work for images? I am also having a litte trouble making it work, I ran both npm install, npm run build but unable to save files as suggested. I have added the File-for-download library to the content builder to allow me to save files with other content.
Cheers,
Farrisimin
otacke
Tue, 06/06/2023 - 20:40
Permalink
Hi!You will also need to pack
Hi!
You will also need to pack the files into an H5P library, see https://github.com/otacke/h5p-file-for-download#readme. I will not give support for that content type. It was contract work, and I don't want to play a role in keeping "PDF dispensers" alive.
Any file type (extension) that is enabled in the H5P integration should work. PDF, DOC, DOCX and others are among those by default.
Best,
Oliver
farrisimin
Wed, 06/07/2023 - 15:26
Permalink
That is totally fair, I ran
That is totally fair, I ran into this error while install
farrisimin
Wed, 06/07/2023 - 15:26
Permalink
That is totally fair, I ran
That is totally fair, I ran into this error while install
otacke
Wed, 06/07/2023 - 19:10
Permalink
And have you looked at the
And have you looked at the potential output above of what you show in the image or at the log that is hinted to?
farrisimin
Wed, 06/07/2023 - 20:15
Permalink
Yes, it is very similar to
Yes, it is very similar to the image above:
16 verbose Linux 3.10.0-1160.90.1.el7.x86_64
17 verbose argv "/usr/bin/node" "/bin/npm" "run" "build"
18 verbose node v12.22.12
19 verbose npm v6.14.16
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: `webpack --mode=production`
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
otacke
Wed, 06/07/2023 - 22:37
Permalink
You're using ancient versions
You're using ancient versions of node.js (current is 18/20) and npm (current is 9). The former is most likely the issue.
farrisimin
Tue, 06/13/2023 - 02:34
Permalink
You are correct!! Thank you
You are correct!! Thank you very much!!
cheers
farrisimin
Tue, 01/02/2024 - 05:19
Permalink
Hi Oliver,Happy new year!!
Hi Oliver,
Happy new year!! Hope you are doing great!! Need your help one more time with the npm install cmd for the minicourse content type. I have recently made the switch from Drupal to WordPress, so just wondering if I run npm install code in the minicourse dir will it work on WordPress the same way it worked in Drupal? Thanks in advance.
Farrisimin
otacke
Tue, 01/02/2024 - 12:24
Permalink
Please have a look at https:/
Please have a look at https://peter.baumgartner.name/2021/04/12/h5p-library-installation/ including the comments.
farrisimin
Tue, 01/02/2024 - 17:22
Permalink
Thanks for the quick response
Thanks for the quick response, Cheers!!