version 1.103, 2004/02/26 22:42:21
|
version 1.106, 2004/03/01 16:34:54
|
Line 1145 sub print_html_classlist {
|
Line 1145 sub print_html_classlist {
|
foreach my $outputformat ('html','csv','excel') { |
foreach my $outputformat ('html','csv','excel') { |
my $option = '<option value="'.$outputformat.'" '; |
my $option = '<option value="'.$outputformat.'" '; |
if ($outputformat eq $ENV{'form.state'}) { |
if ($outputformat eq $ENV{'form.state'}) { |
$option .= 'checked '; |
$option .= 'selected '; |
} |
} |
$option .='>'.$lt{$outputformat}.'</option>'; |
$option .='>'.$lt{$outputformat}.'</option>'; |
$output_selector .= "\n".$option; |
$output_selector .= "\n".$option; |
Line 1154 sub print_html_classlist {
|
Line 1154 sub print_html_classlist {
|
$r->print(&mt('Output Format: [_1]',$output_selector).(' 'x3)); |
$r->print(&mt('Output Format: [_1]',$output_selector).(' 'x3)); |
} |
} |
$r->print(&mt('Student Status: [_1]',$status_select)."\n"); |
$r->print(&mt('Student Status: [_1]',$status_select)."\n"); |
$r->print('<input type="submit" value="'.&mt('Refresh Display').'" />'."\n</p>\n"); |
$r->print('<input type="submit" value="'.&mt('Update Display').'" />'. |
|
"\n</p>\n"); |
|
|
# |
# |
# Print the classlist |
# Print the classlist |
Line 1183 sub show_class_list {
|
Line 1184 sub show_class_list {
|
my $cid=$ENV{'request.course.id'}; |
my $cid=$ENV{'request.course.id'}; |
# |
# |
# Variables for excel output |
# Variables for excel output |
my ($excel_workbook, $excel_sheet, $excel_filename,$row); |
my ($excel_workbook, $excel_sheet, $excel_filename,$row,$format); |
# |
# |
# Variables for csv output |
# Variables for csv output |
my ($CSVfile,$CSVfilename); |
my ($CSVfile,$CSVfilename); |
Line 1267 END
|
Line 1268 END
|
$excel_workbook = Spreadsheet::WriteExcel->new('/home/httpd'. |
$excel_workbook = Spreadsheet::WriteExcel->new('/home/httpd'. |
$excel_filename); |
$excel_filename); |
$excel_workbook->set_tempdir('/home/httpd/perl/tmp'); |
$excel_workbook->set_tempdir('/home/httpd/perl/tmp'); |
|
# |
|
$format = &Apache::loncommon::define_excel_formats($excel_workbook); |
$excel_sheet = $excel_workbook->addworksheet('classlist'); |
$excel_sheet = $excel_workbook->addworksheet('classlist'); |
# |
# |
my $description = 'Class List for '. |
my $description = 'Class List for '. |
$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
$excel_sheet->write($row++,0,$description); |
$excel_sheet->write($row++,0,$description,$format->{'h1'}); |
# |
# |
$excel_sheet->write($row++,0,["username","domain","ID", |
$excel_sheet->write($row++,0,["username","domain","ID", |
"student name","section","status"]); |
"student name","section","status"],$format->{'bold'}); |
} |
} |
# |
# |
# Sort the students |
# Sort the students |
Line 2160 sub handler {
|
Line 2163 sub handler {
|
} elsif ($ENV{'form.action'} eq 'upload') { |
} elsif ($ENV{'form.action'} eq 'upload') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/dropadd?action=upload&state=', |
({href=>'/adm/dropadd?action=upload&state=', |
text=>"Upload Classlist", |
text=>"Upload Classlist"}); |
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,'Upload Classlist')); |
(undef,'Upload Classlist')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
Line 2180 sub handler {
|
Line 2182 sub handler {
|
} elsif ($ENV{'form.action'} eq 'drop') { |
} elsif ($ENV{'form.action'} eq 'drop') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/dropadd?action=drop', |
({href=>'/adm/dropadd?action=drop', |
text=>"Drop Students", |
text=>"Drop Students"}); |
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,'Drop Students')); |
(undef,'Drop Students')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
Line 2194 sub handler {
|
Line 2195 sub handler {
|
} elsif ($ENV{'form.action'} eq 'enrollstudent') { |
} elsif ($ENV{'form.action'} eq 'enrollstudent') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/dropadd?action=enrollstudent', |
({href=>'/adm/dropadd?action=enrollstudent', |
text=>"Enroll Student", |
text=>"Enroll Student"}); |
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,'Enroll Student')); |
(undef,'Enroll Student')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
Line 2210 sub handler {
|
Line 2210 sub handler {
|
} elsif ($ENV{'form.action'} eq 'classlist') { |
} elsif ($ENV{'form.action'} eq 'classlist') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/dropadd?action=classlist', |
({href=>'/adm/dropadd?action=classlist', |
text=>"View Classlist", |
text=>"View Classlist"}); |
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,'View Classlist')); |
(undef,'View Classlist')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
Line 2226 sub handler {
|
Line 2225 sub handler {
|
} elsif ($ENV{'form.action'} eq 'modifystudent') { |
} elsif ($ENV{'form.action'} eq 'modifystudent') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/dropadd?action=modifystudent', |
({href=>'/adm/dropadd?action=modifystudent', |
text=>"Modify Student Data", |
text=>"Modify Student Data"}); |
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,'Modify Student Data')); |
(undef,'Modify Student Data')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |