YUI.add("moodle-mod_offlinequiz-questionchooser",function(r,e){var i='.menu [data-action="addquestion"]',s="div.createnewquestion",d="div.chooserdialoguebody",u="div.choosertitle",o=function(){o.superclass.constructor.apply(this,arguments)};r.extend(o,M.core.chooserdialogue,{initializer:function(){r.one("body").delegate("click",this.display_dialogue,i,this)},display_dialogue:function(e){var i,o,t,n;for(e.preventDefault(),i=r.one(s+" "+d),o=r.one(s+" "+u),null===this.container&&(this.setup_chooser_dialogue(i,o,{}),this.prepare_chooser()),i=r.QueryString.parse(e.currentTarget.get("search").substring(1)),o=this.container.one("form"),this.parameters_to_hidden_input(i,o,"returnurl"),this.parameters_to_hidden_input(i,o,"cmid"),this.parameters_to_hidden_input(i,o,"category"),this.parameters_to_hidden_input(i,o,"addonpage"),this.parameters_to_hidden_input(i,o,"appendqnumstring"),this.display_chooser(e),t=r.all("#chooseform input[type=radio]")._nodes,n=0;n<t.length;n++)"item_qtype_multichoiceset"!=t[n].id&&"item_qtype_multichoice"!=t[n].id&&"item_qtype_description"!=t[n].id&&(t[n].disabled=!0)},parameters_to_hidden_input:function(e,i,o){var e=e.hasOwnProperty(o)?e[o]:"",t=i.one("input[name="+o+"]");t||(t=i.appendChild('<input type="hidden">')).set("name",o),t.set("value",e)}},{NAME:"mod_offlinequiz-questionchooser"}),M.mod_offlinequiz=M.mod_offlinequiz||{},M.mod_offlinequiz.init_questionchooser=function(){return M.mod_offlinequiz.question_chooser=new o({}),M.mod_offlinequiz.question_chooser}},"@VERSION@",{requires:["moodle-core-chooserdialogue","moodle-mod_offlinequiz-util","querystring-parse"]});