JI-1285 Add comment
parent
7a8f894c85
commit
0922db6fab
|
@ -142,7 +142,13 @@ H5P.XAPIEvent.prototype.setObject = function (instance) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
// Empty object
|
||||
// Content types view always expect to have a contentId when they are displayed.
|
||||
// This is not the case if they are displayed in the editor as part of a preview.
|
||||
// The fix is to set an empty object with definition for the xAPI event, so all
|
||||
// the content types that rely on this does not have to handle it. This means
|
||||
// that content types that are being previewed will send xAPI completed events,
|
||||
// but since there are no scripts that catch these events in the editor,
|
||||
// this is not a problem.
|
||||
this.data.statement.object = {
|
||||
definition: {}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue