Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version now in path of content types #18

Open
Jakeii opened this issue Oct 7, 2016 · 2 comments
Open

Version now in path of content types #18

Jakeii opened this issue Oct 7, 2016 · 2 comments

Comments

@Jakeii
Copy link

Jakeii commented Oct 7, 2016

Hi,

I created https://github.com/tunapanda/h5p-standalone for viewing H5Ps without any server side code.

I'm not sure when this changed, but previously paths to the content types were just the content type name (H5P.Audio), now they include a version (H5P.Audio-1.2). This is fine, I have modified it to work with it. But is there anywhere in the JSON files I can use to determine what the structure would be, so I can make it backward compatible? As using front end JS I can't just scan the directory to determine it.

Thanks

@icc
Copy link
Member

icc commented Oct 10, 2016

Do you mean the paths inside the .h5p files?

To begin with, there weren't any version numbers in the path, but as new content types and dependencies were added the need quickly arose, needing different versions of the same library in packages. So, version numbers were added to the library paths. However, it was seldom needed in exported packages so the old exporter wasn't updated with this feature. Creating a bit of inconsistency between the packages.
At the beginning of 2016, as the exporter was refactored to support more advanced file system APIs, like the one used by Moodle, the versioned paths were made default.

I don't know that there's any easy way to detect this. I think you'll need some sort of backend code that checks this and then sets a variable.

@Jakeii
Copy link
Author

Jakeii commented Oct 15, 2016

Thanks for the info, unfortunately by it's very nature there is no backend code! Perhaps I could just try retrieving with the versions and then retry without if it fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants