Your IP : 192.168.165.1


Current Path : C:/xampp/htdocs/moodle/mod/quiz/amd/build/
Upload File :
Current File : C:/xampp/htdocs/moodle/mod/quiz/amd/build/add_random_form.min.js

define ("mod_quiz/add_random_form",["jquery","mod_quiz/random_question_form_preview"],function(a,b){var c={PREVIEW_CONTAINER:"[data-region=\"random-question-preview-container\"]",CATEGORY_FORM_ELEMENT:"[name=\"category\"]",SUBCATEGORY_FORM_ELEMENT:"[name=\"includesubcategories\"]",TAG_IDS_FORM_ELEMENT:"[name=\"fromtags[]\"]"},d=function(a){return a.find(c.CATEGORY_FORM_ELEMENT).val()},e=function(a){var b=d(a),c=b.split(",");return c[0]},f=function(a,b){var c=d(a);return-1<b.indexOf(c)},g=function(a,b){if(f(a,b)){return!0}else{return a.find(c.SUBCATEGORY_FORM_ELEMENT).is(":checked")}},h=function(a){var b=a.find(c.TAG_IDS_FORM_ELEMENT).val();return b.map(function(a){var b=a.split(",");return b[0]})},i=function(a,d,f){var i=a.find(c.PREVIEW_CONTAINER);b.reload(i,e(a),g(a,f),h(a),d)},j=function(a){if(0<a.closest(c.CATEGORY_FORM_ELEMENT).length){return!0}if(0<a.closest(c.SUBCATEGORY_FORM_ELEMENT).length){return!0}if(0<a.closest(c.TAG_IDS_FORM_ELEMENT).length){return!0}return!1},k=function(c,d,e){var f=null;c.on("change",function(g){if(!j(a(g.target))){return}b.showLoadingIcon(c);if(f){clearTimeout(f)}f=setTimeout(function(){i(c,d,e)},2000)})};return{init:function init(b,c,d,e){if(!0==e){var f=a("#"+b);i(f,c,d,e);k(f,c,d,e)}}}});
//# sourceMappingURL=add_random_form.min.js.map