version 1.42, 2006/04/10 21:40:09
|
version 1.46, 2006/05/18 01:08:50
|
Line 34 use Apache::loncommon;
|
Line 34 use Apache::loncommon;
|
use Apache::loncoursedata; |
use Apache::loncoursedata; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::longroup; |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 96 sub handler {
|
Line 97 sub handler {
|
['-1','86400','604800','2592000','7776000', |
['-1','86400','604800','2592000','7776000', |
'15552000','31104000'])); |
'15552000','31104000'])); |
# if called from loncreateuser, report sections, then close |
# if called from loncreateuser, report sections, then close |
my (%loaditem,$seclist); |
my (%loaditem,$seclist,$groupslist); |
my $num_sections = 0; |
my $num_sections = 0; |
if ($env{'form.form'} eq 'cu' && $env{'form.pickedcourse'}) { |
if ($env{'form.form'} eq 'cu' && $env{'form.pickedcourse'}) { |
$loaditem{'onload'} ="setSections()"; |
$loaditem{'onload'} ="setSections()"; |
my ($cdom,$cnum) = split/_/,$env{'form.pickedcourse'}; |
my ($cdom,$cnum) = split/_/,$env{'form.pickedcourse'}; |
my %sections_count = (); |
|
$num_sections = &Apache::loncommon::get_sections($cdom,$cnum,\%sections_count); |
my %sections_count = &Apache::loncommon::get_sections($cdom,$cnum); |
my @sections = (); |
my @sections = (sort {$a <=> $b} keys(%sections_count)); |
if ($num_sections > 0) { |
$seclist = join('","',@sections); |
@sections = (sort {$a <=> $b} keys(%sections_count)); |
|
$seclist = join('","',@sections); |
my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum); |
} |
$groupslist = join(',',sort(keys(%curr_groups))); |
} |
} |
my $jscript; |
my $jscript; |
my $title = 'Selecting a course'; |
my $title = 'Selecting a course'; |
Line 236 function setSections() {
|
Line 237 function setSections() {
|
opener.document.$env{"form.form"}.currsec.options[0].selected = false |
opener.document.$env{"form.form"}.currsec.options[0].selected = false |
} |
} |
} |
} |
|
opener.document.$env{"form.form"}.groups.value='$groupslist'; |
self.close() |
self.close() |
} |
} |
|
|