}
function checkall() {
- var el = document.getElementsByTagName('input');
- for(var i=0; i<el.length; i++) {
- if(el[i].type == 'checkbox') {
- el[i].checked = true;
+ var inputs = document.getElementsByTagName('input');
+ for (var i = 0; i < inputs.length; i++) {
+ if (inputs[i].type == 'checkbox') {
+ inputs[i].checked = true;
+ }
}
- }
}
function checknone() {
- var el = document.getElementsByTagName('input');
- for(var i=0; i<el.length; i++) {
- if(el[i].type == 'checkbox') {
- el[i].checked = false;
+ var inputs = document.getElementsByTagName('input');
+ for (var i = 0; i < inputs.length; i++) {
+ if (inputs[i].type == 'checkbox') {
+ inputs[i].checked = false;
+ }
}
- }
}
function lockoptions(formid, master, subitems) {
function openpopup(url, name, options, fullscreen) {
var fullurl = url;
if (!url.match(/https?:\/\//)) {
- var fullurl = moodle_cfg.wwwroot + url;
+ fullurl = moodle_cfg.wwwroot + url;
}
var windowobj = window.open(fullurl,name,options);
+ if (!windowobj) {
+ return true;
+ }
if (fullscreen) {
windowobj.moveTo(0,0);
windowobj.resizeTo(screen.availWidth,screen.availHeight);