From 4a2d83086f9cc9b44b8f53c1daddddc58b3bf9f0 Mon Sep 17 00:00:00 2001 From: Thomas Horn Sivertsen Date: Wed, 28 Mar 2018 11:44:54 +0200 Subject: [PATCH] Added JSDoc --- presave.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/presave.js b/presave.js index dca68e5..6727b1e 100644 --- a/presave.js +++ b/presave.js @@ -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); }