parent
b91be29cec
commit
e2634070d4
25
js/h5p.js
25
js/h5p.js
|
@ -1037,6 +1037,28 @@ H5P.findCopyrights = function (info, parameters, contentId) {
|
|||
if (!parameters.hasOwnProperty(field)) {
|
||||
continue; // Do not check
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: Make parameters clean again
|
||||
* Some content types adds jQuery or other objects to parameters
|
||||
* in order to determine override settings for sub-content-types.
|
||||
* For instance Question Set tells Multiple Choice that it should
|
||||
* attach Multi Choice's confirmation dialog to a Question Set
|
||||
* jQuery element, so that the confirmation dialog will not be restricted
|
||||
* to the space confined by Multi Choice.
|
||||
* Ideally this should not be added to parameters, we must make a better
|
||||
* solution. We should likely be adding these to sub-content through
|
||||
* functions/setters instead of passing them down as params.
|
||||
*
|
||||
* This solution is implemented as a hack that will ignore all parameters
|
||||
* inside a "overrideSettings" field, this should suffice for now since
|
||||
* all overridden objects are added to this field, however this is not very
|
||||
* robust solution and will very likely lead to problems in the future.
|
||||
*/
|
||||
if (field === 'overrideSettings') {
|
||||
continue;
|
||||
}
|
||||
|
||||
var value = parameters[field];
|
||||
|
||||
if (value instanceof Array) {
|
||||
|
@ -1062,9 +1084,6 @@ H5P.findCopyrights = function (info, parameters, contentId) {
|
|||
info.addMedia(copyrights);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue