Make sure title are added
parent
c4e488f9c8
commit
9a204b3d8f
|
@ -87,15 +87,23 @@ H5P.XAPIEvent.prototype.setObject = function(instance) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (instance.h5pUUID) {
|
if (instance.uuid) {
|
||||||
this.data.statement.object.extensions['http://h5p.org/x-api/h5p-uuid'] = instance.h5pUUID;
|
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') {
|
if (typeof instance.getH5PTitle === 'function') {
|
||||||
this.data.statement.object.definition.name = {
|
this.data.statement.object.definition.name = {
|
||||||
"en-US": instance.getH5PTitle()
|
"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