version 1.99, 2005/03/04 04:36:35
|
version 1.101, 2005/03/10 17:33:57
|
Line 362 my @Fields = (
|
Line 362 my @Fields = (
|
sortable => 'no', |
sortable => 'no', |
graphable => 'no', |
graphable => 'no', |
long_title => 'Problem weight (for instructor)', |
long_title => 'Problem weight (for instructor)', |
selectable => 'no', |
selectable => 'yes', |
defaultselected => 'yes', |
defaultselected => 'yes', |
}, |
}, |
); |
); |
Line 1264 sub Excel_output {
|
Line 1264 sub Excel_output {
|
&compute_all_statistics($r); |
&compute_all_statistics($r); |
my $c = $r->connection; |
my $c = $r->connection; |
return if ($c->aborted()); |
return if ($c->aborted()); |
|
# |
|
my ($starttime,$endtime) = &Apache::lonstathelpers::get_time_limits(); |
## |
## |
## Create the excel workbook |
## Create the excel workbook |
my $filename = '/prtspool/'. |
my ($excel_workbook,$filename,$format) = |
$ENV{'user.name'}.'_'.$ENV{'user.domain'}.'_'. |
&Apache::loncommon::create_workbook($r); |
time.'_'.rand(1000000000).'.xls'; |
return if (! defined($excel_workbook)); |
my ($starttime,$endtime) = &Apache::lonstathelpers::get_time_limits(); |
|
# |
|
# Create sheet |
|
my $excel_workbook = Spreadsheet::WriteExcel->new('/home/httpd'.$filename); |
|
# |
|
# Check for errors |
|
if (! defined($excel_workbook)) { |
|
$r->log_error("Error creating excel spreadsheet $filename: $!"); |
|
$r->print(&mt("Problems creating new Excel file. ". |
|
"This error has been logged. ". |
|
"Please alert your LON-CAPA administrator.")); |
|
return 0; |
|
} |
|
# |
|
# The excel spreadsheet stores temporary data in files, then put them |
|
# together. If needed we should be able to disable this (memory only). |
|
# The temporary directory must be specified before calling 'addworksheet'. |
|
# File::Temp is used to determine the temporary directory. |
|
$excel_workbook->set_tempdir($Apache::lonnet::tmpdir); |
|
# |
# |
# Add a worksheet |
# Add a worksheet |
my $sheetname = $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
my $sheetname = $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
Line 1296 sub Excel_output {
|
Line 1279 sub Excel_output {
|
} |
} |
my $excel_sheet = $excel_workbook->addworksheet( |
my $excel_sheet = $excel_workbook->addworksheet( |
&Apache::loncommon::clean_excel_name($sheetname)); |
&Apache::loncommon::clean_excel_name($sheetname)); |
# |
|
my $format = &Apache::loncommon::define_excel_formats($excel_workbook); |
|
## |
## |
## Begin creating excel sheet |
## Begin creating excel sheet |
## |
## |