YUI.add("moodle-backup-backupselectall",function(e,t){M.core_backup=M.core_backup||{},M.core_backup.backupselectall=function(t){var n=null,r=function(t,r,i,s){t.preventDefault();var o="";typeof s!="undefined"&&(o="setting_activity_"+s+"_");var u=i.length;e.all('input[type="checkbox"]').each(function(e){var t=e.get("name");if(o&&t.substring(0,o.length)!==o)return;t.substring(t.length-u)===i&&e.set("checked",r)}),n&&M.form&&M.form.updateFormState(n)},i=function(e,t,n,r){return typeof r=="undefined"&&(r=""),'
');l.hide(),l.currentlyshown=!1,a.appendChild(l);for(var c in t){if(!t.hasOwnProperty(c))continue;u=i("include_setting section_level","mod_"+c,t[c]),o&&(u+=i("normal_setting","userdata-mod_"+c,t[c]));var h=e.Node.create('
'+u+"
");l.appendChild(h),f(h,c)}var p=function(){var t=e.one("#backup-bytype");l.currentlyshown?t.setHTML(M.util.get_string("showtypes","backup")):t.setHTML(M.util.get_string("hidetypes","backup")),l.currentlyshown=!l.currentlyshown;var n={node:l,duration:.2},r;l.currentlyshown?(l.show(),n.to={maxHeight:l.get("clientHeight")+"px"},l.setStyle("maxHeight","0px"),r=new e.Anim(n),r.on("end",function(){l.setStyle("maxHeight","none")}),r.run()):(n.to={maxHeight:"0px"},l.setStyle("maxHeight",l.get("clientHeight")+"px"),r=new e.Anim(n),r.on("end",function(){l.hide(),l.setStyle("maxHeight","none")}),r.run())};e.one("#backup-bytype").on("click",function(e){e.preventDefault(),p()}),e.one("#backup-all-included").on("click",function(e){r(e,!0,"_included")}),e.one("#backup-none-included").on("click",function(e){r(e,!1,"_included")}),o&&(e.one("#backup-all-userdata").on("click",function(e){r(e,!0,o)}),e.one("#backup-none-userdata").on("click",function(e){r(e,!1,o)}))}},"@VERSION@",{requires:["node","event","node-event-simulate","anim"]});