From 2e0498cd3acc1e9962cd7d4ccc6bc7f72c45fa83 Mon Sep 17 00:00:00 2001 From: Thomas Marstrander Date: Wed, 3 Feb 2016 15:36:35 +0100 Subject: [PATCH] HFJ-1610 - Track number of contents per library type. --- h5p.classes.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/h5p.classes.php b/h5p.classes.php index 4cbfa0a..838d80a 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -334,6 +334,16 @@ interface H5PFrameworkInterface { */ public function getLibraryUsage($libraryId); + /** + * Get a key value list of library version and count of content created + * using that library. + * + * @return array + * Array containing library, major and minor version - content count + * e.g. "H5P.CoursePresentation 1.6" => "14" + */ + public function getLibraryContentCount(); + /** * Loads a library * @@ -2405,6 +2415,7 @@ class H5PCore { $platformInfo['autoFetchingDisabled'] = $fetchingDisabled; $platformInfo['uuid'] = $this->h5pF->getOption('site_uuid', ''); $platformInfo['siteType'] = $this->h5pF->getOption('site_type', 'local'); + $platformInfo['libraryContentCount'] = $this->h5pF->getLibraryContentCount(); // Adding random string to GET to be sure nothing is cached $random = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 5);