Added JSDoc

pull/29/head
Thomas Horn Sivertsen 2018-03-28 11:44:54 +02:00
parent 31780324ff
commit 4a2d83086f
1 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,12 @@
var H5PPresave = H5PPresave || {};
/**
* Resolve the presave logic for the content type Question Set
*
* @param {object} content
* @param finished
* @constructor
*/
H5PPresave['H5P.QuestionSet'] = function (content, finished) {
var presave = H5PEditor.Presave;
@ -27,6 +34,10 @@ H5PPresave['H5P.QuestionSet'] = function (content, finished) {
finished({maxScore: score});
}
/**
* Check if required parameters is present
* @return {boolean}
*/
function isContentInValid() {
return !presave.checkNestedRequirements(content, 'content.questions') || !Array.isArray(content.questions);
}