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=""),'
'+'
'+'
'+n+"
"+'"+"
"+"
"},s=e.one("fieldset#id_coursesettings .fcontainer.clearfix .grouped_settings.section_level");if(!s)return;if(!s.one('input[type="checkbox"]'))return;n=s.ancestor("form").getAttribute("id");var o=!1;e.all('input[type="checkbox"]').each(function(e){var t=e.get("name");t.substring(t.length-9)==="_userdata"?o="_userdata":t.substring(t.length-9)==="_userinfo"&&(o="_userinfo")});var u=i("include_setting section_level","included",M.util.get_string("select","moodle"),' ('+M.util.get_string("showtypes","backup")+")");o&&(u+=i("normal_setting","userdata",M.util.get_string("select","moodle")));var a=e.Node.create('
'+u+"
");s.insert(a,"before");var f=function(t,n){e.one("#backup-all-mod_"+n).on("click",function(e){r(e,!0,"_included",n)}),e.one("#backup-none-mod_"+n).on("click",function(e){r(e,!1,"_included",n)}),o&&(e.one("#backup-all-userdata-mod_"+n).on("click",function(e){r(e,!0,o,n)}),e.one("#backup-none-userdata-mod_"+n).on("click",function(e){r(e,!1,o,n)}))},l=e.Node.create('