version 1.67, 2008/09/12 04:44:13
|
version 1.69, 2008/09/12 14:35:46
|
Line 2244 END
|
Line 2244 END
|
time.'_'.rand(1000000000).'.csv'; |
time.'_'.rand(1000000000).'.csv'; |
unless ($CSVfile = Apache::File->new('>/home/httpd'.$CSVfilename)) { |
unless ($CSVfile = Apache::File->new('>/home/httpd'.$CSVfilename)) { |
$r->log_error("Couldn't open $CSVfilename for output $!"); |
$r->log_error("Couldn't open $CSVfilename for output $!"); |
$r->print(&mt('Problems occurred in writing the csv file. ' |
$r->print(&mt('Problems occurred in writing the CSV file. ' |
.'This error has been logged. ' |
.'This error has been logged. ' |
.'Please alert your LON-CAPA administrator.')); |
.'Please alert your LON-CAPA administrator.')); |
$CSVfile = undef; |
$CSVfile = undef; |
Line 2564 END
|
Line 2564 END
|
$r->print(&Apache::loncommon::end_data_table().'<br />'); |
$r->print(&Apache::loncommon::end_data_table().'<br />'); |
} elsif ($mode eq 'excel') { |
} elsif ($mode eq 'excel') { |
$excel_workbook->close(); |
$excel_workbook->close(); |
$r->print('<p><a href="'.$excel_filename.'">'. |
$r->print(&mt('[_1]Your Excel spreadsheet[_2] is ready for download.', '<p><a href="'.$excel_filename.'">','</a>')."</p>\n"); |
&mt('Your Excel spreadsheet').'</a> '.&mt('is ready for download').'.</p>'."\n"); |
|
} elsif ($mode eq 'csv') { |
} elsif ($mode eq 'csv') { |
close($CSVfile); |
close($CSVfile); |
$r->print('<p><a href="'.$CSVfilename.'">'. |
$r->print(&mt('[_1]Your CSV file[_2] is ready for download.', '<p><a href="'.$CSVfilename.'">','</a>')."</p>\n"); |
&mt('Your CSV file').'</a> '.&mt('is ready for download').'.</p>'."\n"); |
|
$r->rflush(); |
$r->rflush(); |
} |
} |
if ($mode eq 'autoenroll') { |
if ($mode eq 'autoenroll') { |