version 1.19, 2004/08/23 16:53:06
|
version 1.21, 2005/02/17 08:29:43
|
Line 38 use LONCAPA::Enrollment;
|
Line 38 use LONCAPA::Enrollment;
|
|
|
############################################################### |
############################################################### |
sub header { |
sub header { |
|
my $html=&Apache::lonxml::xmlbegin(); |
my $bodytag=&Apache::loncommon::bodytag('Classlist Manager'); |
my $bodytag=&Apache::loncommon::bodytag('Classlist Manager'); |
return(<<ENDHEAD); |
return(<<ENDHEAD); |
<html> |
$html |
<head> |
<head> |
<title>LON-CAPA Classlist Manager</title> |
<title>LON-CAPA Classlist Manager</title> |
</head> |
</head> |
Line 118 function process(calling,numauto,nummanu
|
Line 119 function process(calling,numauto,nummanu
|
} |
} |
} |
} |
if (calling == "viewclass") { |
if (calling == "viewclass") { |
document.forms.studentform.state.value = "process"; |
|
var totcheck = 0 |
var totcheck = 0 |
|
var numchk = 0 |
if (numauto > 0) { |
if (numauto > 0) { |
for (var i=0; i<document.studentform.chgauto.length; i++) { |
numchk = countChecked(document.studentform.chgauto); |
if (document.studentform.chgauto[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (nummanual > 0) { |
if (nummanual > 0) { |
for (var i=0; i<document.studentform.chgmanual.length; i++) { |
numchk = countChecked(document.studentform.chgmanual); |
if (document.studentform.chgmanual[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (numlock > 0) { |
if (numlock > 0) { |
for (var i=0; i<document.studentform.lockchg.length; i++) { |
numchk = countChecked(document.studentform.lockchg); |
if (document.studentform.lockchg[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (numunlock > 0) { |
if (numunlock > 0) { |
for (var i=0; i<document.studentform.unlockchg.length; i++) { |
numchk = countChecked(document.studentform.unlockchg); |
if (document.studentform.unlockchg[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (totcheck > 0) { |
if (totcheck > 0) { |
checker = 1 |
document.forms.studentform.state.value = "process"; |
} else { |
} |
|
if (totcheck == 0) { |
alert("You must check at least one checkbox, before proceeding to the next page") |
alert("You must check at least one checkbox, before proceeding to the next page") |
checker = 0 |
checker = 0 |
} |
} |
Line 163 function process(calling,numauto,nummanu
|
Line 153 function process(calling,numauto,nummanu
|
if ($action eq 'viewclass') { |
if ($action eq 'viewclass') { |
$scripttag .= qq| |
$scripttag .= qq| |
function checkAll(field) { |
function checkAll(field) { |
for (i = 0; i < field.length; i++) |
if (field.length > 0) { |
field[i].checked = true ; |
for (i = 0; i < field.length; i++) { |
|
field[i].checked = true ; |
|
} |
|
} else { |
|
field.checked = true |
|
} |
} |
} |
|
|
function uncheckAll(field) { |
function uncheckAll(field) { |
for (i = 0; i < field.length; i++) |
if (field.length > 0) { |
field[i].checked = false ; |
for (i = 0; i < field.length; i++) { |
|
field[i].checked = false ; |
|
} |
|
} else { |
|
field.checked = false ; |
|
} |
|
} |
|
|
|
function countChecked(field) { |
|
var count = 0; |
|
if (field.length > 0) { |
|
for (var i=0; i<field.length; i++) { |
|
if (field[i].checked == true) { |
|
count ++ |
|
} |
|
} |
|
} else { |
|
if (field.checked == true) { |
|
count ++ |
|
} |
|
} |
|
return count |
} |
} |
|
|
|; |
|; |
} |
} |
$scripttag .= qq| |
$scripttag .= qq| |
// End hiding --> |
// End hiding --> |
</script> |
</script> |
|; |
|; |
|
my $html=&Apache::lonxml::xmlbegin(); |
return(<<ENDHEAD); |
return(<<ENDHEAD); |
<html> |
$html |
<head> |
<head> |
<title>LON-CAPA Classlist Manager</title> |
<title>LON-CAPA Classlist Manager</title> |
$scripttag |
$scripttag |