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