Timeline with database integration
Submitted by aoppo on Sun, 04/19/2020 - 20:39
Forums:
Hi guys,
I love the timeline instrument. I was using the timeline js from Knightlab and with google docs there was a way to integrate it with databases.
Is it possible to do it also with the h5p timeline?
Thank you for your awesome job.
Alessandro
Content types:
BV52
Mon, 04/20/2020 - 21:33
Permalink
Hi Alessandro,The Timeline
Hi Alessandro,
The Timeline that H5P uses was originaly created by Knightlab. It was actually the first version and what you have used is the upgraded version. The core team is currently maintaining this but only for bug fixes. Although if someone in the community is willing to contribute the code they are more than welcome to.
-BV
aoppo
Thu, 04/23/2020 - 09:05
Permalink
Hi and thank you.So I imagine
Hi and thank you.
So I imagine that right now is not possible to connect it to a database. :(
Once that I have the .h5p file, is it possible to see the source code of the file. (not the source code of the tool that is on Github).
otacke
Thu, 04/23/2020 - 15:04
Permalink
Hi!You could write json data
Hi!
You could write json data to the _filtered_ column of the contents' database table (not recommended though because it skips validation of the semantics). And you can simply unzip/change/rezip H5P files.
Best,
Oliver
aoppo
Tue, 04/28/2020 - 18:22
Permalink
Hi!Wow, that's the info I was
Hi!
Wow, that's the info I was searching for. I didn't think about changing the extension from .h5p to .zip.
My intention is to allow people to contribute to the timeline. I was thinking to make a form, writing everything in a database and to use the information from the database to build the timeline and the table that you can see here. https://www.9minuti.it/barbero-time-tutti-i-video-ordinati/ Righn now I'm doing everything manually and it's very time-consuming.
Is there a better way to reach the same result?
Thank you
Alessandro
otacke
Tue, 04/28/2020 - 19:42
Permalink
Hi Alessandro!I didn't think
Hi Alessandro!
No need to on decent operating systems ;-)
If you know what you're doing, then updating the database table of content is the quickest way, but altering the filtered column is probably also the dirtiest. You'd have to validate the input yourself, so the content type won't recieve anything that it's not supposed to receive (injected JavaScript in particular).
Cleaner, but you'd still take care of validation: I think you could also use the alter_parameters hook to completely override the parameters from the database with your own, but I've never tried to do that.
You could also write a script that takes your table input, and creates a valid content.json file that you can replace the one in a content file with - or you could even fully automate that including zipping. Then you'd only have to replace the file by uploading the new one.
Best,
Oliver
aoppo
Wed, 05/06/2020 - 19:35
Permalink
Hello otacke, I know... but
Hello otacke,
I know... but decent operative systems don't support the Adobe suite nor Fusion 360. Soon or later I'll definitely cancel Windows from my life.
Thank you for the suggestions, and yeah, I should be definitely really careful about js injections.
I have another question related to xapi. I'm new to this system and I see that there are not xapi for the time line. So this means that there is no way to know if the user 'completed' the time line, right?
Thank you again.
Alessandro
BV52
Wed, 05/06/2020 - 20:16
Permalink
Hi Alessandro,You are correct
Hi Alessandro,
You are correct regarding timeline not having xAPI statements. Unfortunately Knight Labs the developer of this content type has stopped actively developing this.
-BV
otacke
Thu, 05/07/2020 - 00:28
Permalink
Hi all!It could be simple to
Hi all!
It could be simple to add some "completed" xAPI statement though. The xAPI code is pretty standard, and all that'd be left to do is check if there's some trigger that can be listened to by injecting a listener to the DOM without touching the original code, just amending the wrapper code.
Best,
Oliver