Make sure title are added
parent
c4e488f9c8
commit
9a204b3d8f
|
@ -87,13 +87,21 @@ H5P.XAPIEvent.prototype.setObject = function(instance) {
|
|||
}
|
||||
}
|
||||
};
|
||||
if (instance.h5pUUID) {
|
||||
this.data.statement.object.extensions['http://h5p.org/x-api/h5p-uuid'] = instance.h5pUUID;
|
||||
if (instance.uuid) {
|
||||
this.data.statement.object.definition.extensions['http://h5p.org/x-api/h5p-uuid'] = instance.uuid;
|
||||
// Don't set titles on main content, title should come from publishing platform
|
||||
if (typeof instance.getH5PTitle === 'function') {
|
||||
this.data.statement.object.definition.name = {
|
||||
"en-US": instance.getH5PTitle()
|
||||
};
|
||||
}
|
||||
}
|
||||
if (typeof instance.getH5PTitle === 'function') {
|
||||
this.data.statement.object.definition.name = {
|
||||
"en-US": instance.getH5PTitle()
|
||||
};
|
||||
else {
|
||||
if (H5PIntegration.contents['cid-' + instance.contentId].title) {
|
||||
this.data.statement.object.definition.name = {
|
||||
"en-US": H5P.createH5PTitle(H5PIntegration.contents['cid-' + instance.contentId].title)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue