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