Added JSDoc
parent
31780324ff
commit
4a2d83086f
11
presave.js
11
presave.js
|
@ -1,5 +1,12 @@
|
||||||
var H5PPresave = H5PPresave || {};
|
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) {
|
H5PPresave['H5P.QuestionSet'] = function (content, finished) {
|
||||||
var presave = H5PEditor.Presave;
|
var presave = H5PEditor.Presave;
|
||||||
|
|
||||||
|
@ -27,6 +34,10 @@ H5PPresave['H5P.QuestionSet'] = function (content, finished) {
|
||||||
finished({maxScore: score});
|
finished({maxScore: score});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if required parameters is present
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
function isContentInValid() {
|
function isContentInValid() {
|
||||||
return !presave.checkNestedRequirements(content, 'content.questions') || !Array.isArray(content.questions);
|
return !presave.checkNestedRequirements(content, 'content.questions') || !Array.isArray(content.questions);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue