Merge branch 'master' of b.amendor.com:h5p

Conflicts:
	example_content/coursepresentation/H5P.CoursePresentation/library.json
	example_content/coursepresentation/H5P.CoursePresentation/styles/cp.css
namespaces
Pål Jørgensen 2013-07-08 09:39:39 +02:00
commit aba62d5b48
1 changed files with 21 additions and 1 deletions

View File

@ -102,7 +102,14 @@ H5P.fullScreen = function ($el, obj) {
};
/**
* Find the path to the content files base on the id of the content.
* Find the path to the content files based on the id of the content
*
* Also identifies and returns absolute paths
*
* @param string path
* Absolute path to a file, or relative path to a file in the content folder
* @param contentId
* Id of the content requesting a path
*/
H5P.getPath = function (path, contentId) {
if (path.substr(0, 7) === 'http://' || path.substr(0, 8) === 'https://') {
@ -112,6 +119,19 @@ H5P.getPath = function (path, contentId) {
return H5PIntegration.getContentPath(contentId) + path;
};
/**
* THIS FUNCTION IS DEPRECATED, USE getPath INSTEAD
*
* Find the path to the content files folder based on the id of the content
*
* @param contentId
* Id of the content requesting a path
*/
H5P.getContentPath = function (contentId) {
return H5PIntegration.getContentPath(contentId);
};
//
// Used from libraries to construct instances of other libraries' objects by
// name.