Merge branch 'master' into release

Conflicts:
	js/h5p-x-api.js
pull/17/head
Frode Petterson 2015-12-17 14:04:58 +01:00
commit 5e45e7d7dd
3 changed files with 16 additions and 1 deletions

10
composer.json Normal file
View File

@ -0,0 +1,10 @@
{
"name": "h5p/h5p-php-library",
"license": "GPL-3.0",
"autoload": {
"files": [
"h5p-development.class.php",
"h5p.classes.php"
]
}
}

View File

@ -2391,6 +2391,10 @@ class H5PCore {
if($platformInfo['uuid'] === '' && isset($json->uuid)) {
$this->h5pF->setOption('site_uuid', $json->uuid);
}
if (isset($json->latest) && !empty($json->latest)) {
$this->h5pF->setOption('update_available', $json->latest->releasedAt);
$this->h5pF->setOption('update_available_path', $json->latest->path);
}
}
}

View File

@ -95,7 +95,8 @@ H5P.EventDispatcher.prototype.triggerXAPIScored = function (score, maxScore, ver
H5P.EventDispatcher.prototype.setActivityStarted = function() {
if (this.activityStartTime === undefined) {
// Don't trigger xAPI events in the editor
if (this.contentId !== undefined && H5PIntegration.contents !== undefined && H5PIntegration.contents['cid-' + this.contentId] !== undefined) {
if (H5PIntegration.contents !== undefined &&
H5PIntegration.contents['cid-' + this.contentId] !== undefined) {
this.triggerXAPI('attempted');
}
this.activityStartTime = Date.now();