YUI.add("moodle-course-formatchooser",function(i,o){var e=function(){e.superclass.constructor.apply(this,arguments)};i.extend(e,i.Base,{initializer:function(o){var e,n,r,t;o&&o.formid&&(e=i.one("#"+o.formid+" #id_updatecourseformat"),n=i.one("#"+o.formid+" #id_format"),r=e.ancestor("fieldset"),t=i.one("form.mform").get("action"),e&&n&&(e.setStyle("display","none"),n.on("change",function(){i.one("form.mform").set("action",t+"#"+r.get("id")),e.simulate("click")})))}}),M.course=M.course||{},M.course.init_formatchooser=function(o){return new e(o)}},"@VERSION@",{requires:["base","node","node-event-simulate"]});