YUI.add("moodle-mod_offlinequiz-offlinequizbase",function(e,i){var n=function(){n.superclass.constructor.apply(this,arguments)};e.extend(n,e.Base,{registermodules:[],register_module:function(e){return this.registermodules.push(e),this},invoke_function:function(e,i){for(var n in this.registermodules)e in this.registermodules[n]&&this.registermodules[n][e](i);return this}},{NAME:"mod_offlinequiz-offlinequizbase",ATTRS:{}}),M.mod_offlinequiz=M.mod_offlinequiz||{},M.mod_offlinequiz.offlinequizbase=M.mod_offlinequiz.offlinequizbase||new n,M.mod_offlinequiz.edit=M.mod_offlinequiz.edit||{},M.mod_offlinequiz.edit.swap_sections=function(e,i,n){var o="mod-offlinequiz-edit-content",t="section_add_menus",o=e.Node.all("."+o+" "+M.mod_offlinequiz.edit.get_section_selector(e));o.item(i).one("."+t).swap(o.item(n).one("."+t))},M.mod_offlinequiz.edit.process_sections=function(d,e,i,n,o){var t,s,f,r,c,_="sectionname",u=".left .section-handle img";if("move"===i.action){for(o<n&&(t=o,o=n,n=t),c=n;c<=o;c++)e.item(c).one("."+_).setContent(i.sectiontitles[c]),r=(f=(s=e.item(c).one(u)).getAttribute("alt")).lastIndexOf(" "),r=f.substr(0,r+1)+c,s.setAttribute("alt",r),s.setAttribute("title",r),e.item(c).removeClass("current");-1!==i.current&&e.item(i.current).addClass("current")}},M.mod_offlinequiz.edit.get_config=function(){return{container_node:"ul",container_class:"slots",section_node:"li",section_class:"section"}},M.mod_offlinequiz.edit.get_section_selector=function(){var e=M.mod_offlinequiz.edit.get_config();return e.section_node&&e.section_class?e.section_node+"."+e.section_class:null},M.mod_offlinequiz.edit.get_section_wrapper=function(e){var i=M.mod_offlinequiz.edit.get_config();return i.section_wrapper_node&&i.section_wrapper_class?i.section_wrapper_node+"."+i.section_wrapper_class:M.mod_offlinequiz.edit.get_section_selector(e)},M.mod_offlinequiz.edit.get_containernode=function(){var e=M.mod_offlinequiz.edit.get_config();if(e.container_node)return e.container_node},M.mod_offlinequiz.edit.get_containerclass=function(){var e=M.mod_offlinequiz.edit.get_config();if(e.container_class)return e.container_class},M.mod_offlinequiz.edit.get_sectionwrappernode=function(){var e=M.mod_offlinequiz.edit.get_config();return e.section_wrapper_node||e.section_node},M.mod_offlinequiz.edit.get_sectionwrapperclass=function(){var e=M.mod_offlinequiz.edit.get_config();return e.section_wrapper_class||e.section_class},M.mod_offlinequiz.edit.get_sectionnode=function(){var e=M.mod_offlinequiz.edit.get_config();if(e.section_node)return e.section_node},M.mod_offlinequiz.edit.get_sectionclass=function(){var e=M.mod_offlinequiz.edit.get_config();if(e.section_class)return e.section_class}},"@VERSION@",{requires:["base","node"]});