version 1.23, 2005/04/07 06:56:23
|
version 1.27, 2005/10/04 18:27:32
|
Line 151 function process(calling,numauto,nummanu
|
Line 151 function process(calling,numauto,nummanu
|
} |
} |
|; |
|; |
if ($action eq 'viewclass') { |
if ($action eq 'viewclass') { |
|
$scripttag .= &Apache::loncommon::check_uncheck_jscript(); |
$scripttag .= qq| |
$scripttag .= qq| |
function checkAll(field) { |
|
if (field.length > 0) { |
|
for (i = 0; i < field.length; i++) { |
|
field[i].checked = true ; |
|
} |
|
} else { |
|
field.checked = true |
|
} |
|
} |
|
|
|
function uncheckAll(field) { |
|
if (field.length > 0) { |
|
for (i = 0; i < field.length; i++) { |
|
field[i].checked = false ; |
|
} |
|
} else { |
|
field.checked = false ; |
|
} |
|
} |
|
|
|
function countChecked(field) { |
function countChecked(field) { |
var count = 0; |
var count = 0; |
if (field.length > 0) { |
if (field.length > 0) { |
Line 559 ENDTWO
|
Line 540 ENDTWO
|
my @roleinfo = split/:/,$_; |
my @roleinfo = split/:/,$_; |
if ($roleinfo[0] eq 'cc') { |
if ($roleinfo[0] eq 'cc') { |
unless (grep/^$roleinfo[1]\@$roleinfo[2]/,@ccs) { |
unless (grep/^$roleinfo[1]\@$roleinfo[2]/,@ccs) { |
my $active_cc = &LONCAPA::Enrollment::check_user_status($roleinfo[2],$roleinfo[1],$dom,$crs,'cc'); |
my $active_cc = &Apache::loncommon::check_user_status($roleinfo[2],$roleinfo[1],$dom,$crs,'cc'); |
if ($active_cc eq 'ok') { |
if ($active_cc eq 'active') { |
push @ccs, "$roleinfo[1]\@$roleinfo[2]"; |
push @ccs, "$roleinfo[1]\@$roleinfo[2]"; |
$pname{"$roleinfo[1]\@$roleinfo[2]"} = &Apache::loncommon::plainname($roleinfo[1],$roleinfo[2]); |
$pname{"$roleinfo[1]\@$roleinfo[2]"} = &Apache::loncommon::plainname($roleinfo[1],$roleinfo[2]); |
if (grep/^$roleinfo[1]\@$roleinfo[2]$/,@notified) { |
if (grep/^$roleinfo[1]\@$roleinfo[2]$/,@notified) { |
Line 2241 sub print_viewclass_response {
|
Line 2222 sub print_viewclass_response {
|
my %otherdom = (); |
my %otherdom = (); |
my %lockchg = (); |
my %lockchg = (); |
my %nolockchg = (); |
my %nolockchg = (); |
my $classlist = &Apache::loncoursedata::get_classlist($cid,$dom,$crs); |
my $classlist = &Apache::loncoursedata::get_classlist($dom,$crs); |
my $endidx = &Apache::loncoursedata::CL_END; |
my $endidx = &Apache::loncoursedata::CL_END; |
my $startidx = &Apache::loncoursedata::CL_START; |
my $startidx = &Apache::loncoursedata::CL_START; |
my $ididx=&Apache::loncoursedata::CL_ID; |
my $ididx=&Apache::loncoursedata::CL_ID; |
my $secidx=&Apache::loncoursedata::CL_SECTION; |
my $secidx=&Apache::loncoursedata::CL_SECTION; |
my $typeidx=&Apache::loncoursedata::CL_TYPE; |
my $typeidx=&Apache::loncoursedata::CL_TYPE; |
my $lockedidx=&Apache::loncoursedata::CL_LOCKEDTYPE; |
my $lockedidx=&Apache::loncoursedata::CL_LOCKEDTYPE; |
my @typechglist = (); |
|
my @lockchglist = (); |
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['chgauto','chgmanual','lockchg','unlockchg']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['chgauto','chgmanual','lockchg','unlockchg']); |
if ($env{'form.chgauto'}) { |
my @typechglist = (&Apache::loncommon::get_env_multiple('form.chgauto'), |
if (ref($env{'form.chgauto'}) eq 'ARRAY') { |
&Apache::loncommon::get_env_multiple('form.chgmanual')); |
push @typechglist, @{$env{'form.chgauto'}}; |
my @lockchglist = (&Apache::loncommon::get_env_multiple('form.lockchg'), |
} else { |
&Apache::loncommon::get_env_multiple('form.unlockchg')); |
push @typechglist, $env{'form.chgauto'}; |
|
} |
|
} |
|
if ($env{'form.chgmanual'}) { |
|
if (ref($env{'form.chgmanual'}) eq 'ARRAY') { |
|
push @typechglist, @{$env{'form.chgmanual'}}; |
|
} else { |
|
push @typechglist, $env{'form.chgmanual'}; |
|
} |
|
} |
|
if ($env{'form.lockchg'}) { |
|
if (ref($env{'form.lockchg'}) eq 'ARRAY') { |
|
push @lockchglist, @{$env{'form.lockchg'}}; |
|
} else { |
|
push @lockchglist, $env{'form.lockchg'}; |
|
} |
|
} |
|
if ($env{'form.unlockchg'}) { |
|
if (ref($env{'form.unlockchg'}) eq 'ARRAY') { |
|
push @lockchglist, @{$env{'form.unlockchg'}}; |
|
} else { |
|
push @lockchglist, $env{'form.unlockchg'}; |
|
} |
|
} |
|
foreach my $student (sort @typechglist) { |
foreach my $student (sort @typechglist) { |
my ($uname,$udom) = split/:/,$student; |
my ($uname,$udom) = split/:/,$student; |
my $sdata = $classlist->{$student}; |
my $sdata = $classlist->{$student}; |
Line 2348 sub print_viewclass_response {
|
Line 2304 sub print_viewclass_response {
|
} |
} |
if ($chgtotal > 0) { |
if ($chgtotal > 0) { |
$response = "You requested a change in enrollment type for $chgtotal students.<br /><br />\n"; |
$response = "You requested a change in enrollment type for $chgtotal students.<br /><br />\n"; |
$classlist = &Apache::loncoursedata::get_classlist($cid,$dom,$crs); |
$classlist = &Apache::loncoursedata::get_classlist($dom,$crs); |
if ($chgok > 0) { |
if ($chgok > 0) { |
$response .= "The following $chgok changes were successful:<br />"; |
$response .= "The following $chgok changes were successful:<br />"; |
$response .= &enrolltype_result(\%chg,$classlist,$endidx,$startidx,$ididx,$secidx,$typeidx); |
$response .= &enrolltype_result(\%chg,$classlist,$endidx,$startidx,$ididx,$secidx,$typeidx); |
Line 2365 sub print_viewclass_response {
|
Line 2321 sub print_viewclass_response {
|
} |
} |
if ($locktotal > 0) { |
if ($locktotal > 0) { |
$response .= "You requested locking/unlocking for $locktotal manually enrolled students.<br /><br />\n"; |
$response .= "You requested locking/unlocking for $locktotal manually enrolled students.<br /><br />\n"; |
$classlist = &Apache::loncoursedata::get_classlist($cid,$dom,$crs); |
$classlist = &Apache::loncoursedata::get_classlist($dom,$crs); |
if ($lockok > 0) { |
if ($lockok > 0) { |
$response .= "The following $lockok changes were successful:<br />"; |
$response .= "The following $lockok changes were successful:<br />"; |
$response .= &enrolltype_result(\%lockchg,$classlist,$endidx,$startidx,$ididx,$secidx,$typeidx,$lockedidx); |
$response .= &enrolltype_result(\%lockchg,$classlist,$endidx,$startidx,$ididx,$secidx,$typeidx,$lockedidx); |