Merge branch 'master' into improved-file-handling
commit
61219a7d84
|
@ -78,7 +78,7 @@ class H5PDevelopment {
|
|||
}
|
||||
|
||||
$library = json_decode($libraryJSON, TRUE);
|
||||
if ($library === FALSE) {
|
||||
if ($library === NULL) {
|
||||
continue; // Invalid JSON.
|
||||
}
|
||||
|
||||
|
|
|
@ -2344,7 +2344,7 @@ class H5PCore {
|
|||
* rebuilt only if non-existing
|
||||
*/
|
||||
public function validateLibrarySupport($force = false) {
|
||||
if (!($this->h5pF->getUnsupportedLibraries() === NULL || $force)) {
|
||||
if (!$force && $this->h5pF->getUnsupportedLibraries() !== NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2379,9 +2379,8 @@ class H5PCore {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->h5pF->setUnsupportedLibraries(empty($unsupportedLibraries) ? NULL : $unsupportedLibraries);
|
||||
}
|
||||
$this->h5pF->setUnsupportedLibraries($unsupportedLibraries);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3428,7 +3427,7 @@ class H5PContentValidator {
|
|||
return '<';
|
||||
}
|
||||
|
||||
if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?|(<!--.*?-->)$%', $string, $matches)) {
|
||||
if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9\-]+)([^>]*)>?|(<!--.*?-->)$%', $string, $matches)) {
|
||||
// Seriously malformed.
|
||||
return '';
|
||||
}
|
||||
|
|
|
@ -188,6 +188,7 @@ H5P.XAPIEvent.prototype.setActor = function () {
|
|||
}
|
||||
else {
|
||||
var uuid;
|
||||
try {
|
||||
if (localStorage.H5PUserUUID) {
|
||||
uuid = localStorage.H5PUserUUID;
|
||||
}
|
||||
|
@ -195,6 +196,11 @@ H5P.XAPIEvent.prototype.setActor = function () {
|
|||
uuid = H5P.createUUID();
|
||||
localStorage.H5PUserUUID = uuid;
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
// LocalStorage and Cookies are probably disabled. Do not track the user.
|
||||
uuid = 'not-trackable-' + H5P.createUUID();
|
||||
}
|
||||
this.data.statement.actor = {
|
||||
'account': {
|
||||
'name': uuid,
|
||||
|
|
Loading…
Reference in New Issue