version 1.16, 2008/10/04 00:09:18
|
version 1.22, 2009/01/04 19:49:19
|
Line 26
|
Line 26
|
# http://www.lon-capa.org/ |
# http://www.lon-capa.org/ |
# |
# |
|
|
|
|
|
|
package Apache::lonerrorhandler; |
package Apache::lonerrorhandler; |
|
|
use strict; |
use strict; |
Line 43 sub handler {
|
Line 45 sub handler {
|
return OK if $r->header_only; |
return OK if $r->header_only; |
|
|
&Apache::lonacc::get_posted_cgi($r); |
&Apache::lonacc::get_posted_cgi($r); |
if (!$lh) { |
if (!$Apache::lonlocal::lh) { |
&Apache::lonlocal::get_language_handle($r); |
&Apache::lonlocal::get_language_handle($r); |
} |
} |
my $title = $env{'form.sendinfo'} ? 'Sending Error Report' |
my $title = $env{'form.sendinfo'} ? 'Sending Error Report' |
Line 103 ENDMESSAGE
|
Line 105 ENDMESSAGE
|
my $env=''; |
my $env=''; |
my $syllabus=''; |
my $syllabus=''; |
|
|
|
foreach $envkey (keys(%env)) { |
|
if ($envkey =~ /^form\.(.+)\.filename$/) { |
|
my $item = $1; |
|
if (exists($env{'form.'.$item.'.mimetype'})) { |
|
if (exists($env{'form.'.$item})) { |
|
my $size = (length($env{'form.'.$item}))/(1024.0 * 1024.0); |
|
$env{'form.'.$item} = &mt('File (contents not shown) - size was [_1] MB.',sprintf("%.4f",$size)); |
|
} |
|
} |
|
} |
|
} |
|
|
foreach $envkey (sort(keys(%env))) { |
foreach $envkey (sort(keys(%env))) { |
$env.="$envkey: $env{$envkey}\n"; |
$env.="$envkey: $env{$envkey}\n"; |
} |
} |
Line 142 ENDMESSAGE
|
Line 156 ENDMESSAGE
|
<input type="hidden" name="syllabus" value="'.$syllabus.'" /> |
<input type="hidden" name="syllabus" value="'.$syllabus.'" /> |
<input type="hidden" name="sendinfo" value="1" /> |
<input type="hidden" name="sendinfo" value="1" /> |
<p> |
<p> |
<input type="submit" value="'.&mt('Send Information').'" /> |
<input type="submit" title="'.&mt('Send Information').'" value="'.&mt('Send').'" /> |
</p> |
</p> |
</form> |
</form> |
<h1>'.&mt('Thank you for your help!').'</h1> |
<h1>'.&mt('Thank you for your help!').'</h1> |
Line 163 $syllabus.'
|
Line 177 $syllabus.'
|
|
|
1; |
1; |
__END__ |
__END__ |
|
|
|
|
|
=pod |
|
|
|
=head1 NAME |
|
|
|
Apache::lonerrorhandler.pm |
|
|
|
=head1 SYNOPSIS |
|
|
|
Handles errors. |
|
|
|
This is part of the LearningOnline Network with CAPA project |
|
described at http://www.lon-capa.org. |
|
|
|
=head1 OVERVIEW |
|
|
|
None |
|
|
|
=cut |