Custom content type in Moodle (Save content state Documentation Tool)

wmsmckay's picture
Forums: 

I have been using the documentation tool on my Moodle site for a few months now and people really like it. The only issue is that it doens't have the save conetent state implemented yet and so if they leave the page or it reloads all of thir progress is lost. I found that on the Github page, someone has made the necessary changes but the core team hasn't pulled them yet. I contacted the person who made the changes and turns out, they have been using them for the last 2 years without any issue, so it works. 

I tried to add these changes to my moodle site, but moodle hashes the files and I had trouble finding where they were located. I found what I thought were the files and made the same changes on a test site but it isn't working. The page just doens't load the H5P content when the code has been changed. 

Does anyone have experience using their own developed H5P content in a moodle site or editing existing content? I can't seem to figure out what the solution is to get this working.

otacke's picture

Hi!

If you patch files locally (what you should avoid no matter what platform you're running on), then you'll still be served with versions that H5P has cached. If you want to run patched files, the proper way would be to pack library files with the H5P cli tool and to upload these to your moodle platform. Please note that you may have to temporarily (!) set moodle into H5P development mode or libraries will not be installed if the new ones have the identical version number as the ones that are already installed.

Best,
Oliver

wmsmckay's picture

I have spent some time getting familiar with the H5p CLI tool and I must be doing something wrong.

My process on the test site was:

  • set moodle into dev mode
  • in the terminal, use "h5p get h5p-documentation-tool" to get the directory for the tool
  • in the directory that downloads, make the necessary code changes.
  • use the command "h5p pack h5p-documentation-tool h5p-documentation-tool.h5p" to create a new content tool
  • upload that new tool to moodle through the h5p tool on "Manage H5P content types" page
  • empty moodle to cache to make sure changes are refreshed

 

After I went through this process, I created a new h5p documentation tool activity and typed some words, then refreshed the page. As a control I did the same thing with the essay tool to make sure I had the save content state working on the site and that worked like a dream.

Do you have any suggestions or input on how I can get this working?

otacke's picture

Hi wmsmckay!

Sounds about right. Hard to tell, because you told us what you did but not what the results were - messages on screen for instance.

Are you aware that Documentation Tool is modular and that other content libraries are involved as well? Please compare: https://github.com/h5p/h5p-documentation-tool/pull/10#issuecomment-413687486.

Best,
Oliver

p. s.: One can apply the changes directly from the pull-requests instead of adding them by hand as you may have done.

wmsmckay's picture

I was not aware that it was dependent on other repos so I'll make sure to set those correctly as well.

What command can I use to apply changes directly from the pull-requests? I have tried checkout but the branches are not a part of the main repo and so they are not recognized.

 

otacke's picture

Hi!

You'd simply use git for working with repositories that are not the official H5P repositories (and I use git for the official ones as well). If you're not familiar with git: Oh my git! is an entertaining way of learning what it is and what it can be used for.

Best,

Oliver 

wmsmckay's picture

I was not aware that it was dependent on other repos so I'll make sure to set those correctly as well.

What command can I use to apply changes directly from the pull-requests? I have tried checkout but the branches are not a part of the main repo and so they are not recognized.

 

Funancolong's picture

hola que tal ya intale h5p en moodle pero no he podido crear el contenido intercativo de video , se queda cargando y no pasa nada podrias ayudrame que puede ser ? lo que hize fue que desintale el plugin h5p y volvi a instalar, por que ateriormente psaba lo mismo, es mas no me salian nisiquiera las pciones de la lista para elegir el contenido ahora, que  renove el plugin si me salen pero carga el contenido para crear . gracais por su aporte y ayuda

"Hi, how are you already installing h5p in?

Hi, how are you? I installed h5p in moodle but I couldn't create the intercative video content, it keeps loading and nothing happens. What I did was that I uninstalled the h5p plugin and reinstalled it, because previously it was the same, what's more, I didn't even get the options on the list to choose the content now, that I renew the plugin if they leave me but load the content to to create . Thank you for your contribution and help"

BV52's picture

Hi Funancolong,

To help keep the threads within the topic of the original poster I suggest that you create a new forum topic. Also please provide as much information as requested in that forum.

-BV