--- rat/lonambiguous.pm 2001/11/29 19:23:48 1.4 +++ rat/lonambiguous.pm 2008/11/11 16:06:46 1.22 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to resolve ambiguous file locations # -# $Id: lonambiguous.pm,v 1.4 2001/11/29 19:23:48 www Exp $ +# $Id: lonambiguous.pm,v 1.22 2008/11/11 16:06:46 jms Exp $ # # Copyright Michigan State University Board of Trustees # @@ -25,11 +25,42 @@ # # http://www.lon-capa.org/ # -# (TeX Content Handler -# -# 05/29/00,05/30,10/11 Gerd Kortemeyer) -# -# 10/11,10/12,10/16 Gerd Kortemeyer + + +=head1 NAME + +Apache::lonambiguous + +=head1 SYNOPSIS + +Handler to resolve ambiguous file locations. + +This is part of the LearningOnline Network with CAPA project +described at http://www.lon-capa.org. + +=head1 HANDLER SUBROUTINE + +make_symb() + +and + +handler() + +=head1 OTHER SUBROUTINES + +=over + +=item * + +cleanup() + +=item * + +getlost() + +=back + +=cut package Apache::lonambiguous; @@ -37,50 +68,70 @@ use strict; use Apache::lonnet; use Apache::Constants qw(:common REDIRECT); use GDBM_File; +use Apache::loncommon; +use Apache::lonlocal; + +my %bighash; +sub cleanup { + if (tied(%bighash)){ + &Apache::lonnet::logthis('Cleanup ambiguous: bighash'); + unless (untie(%bighash)) { + &Apache::lonnet::logthis('Failed cleanup ambiguous: bighash'); + } + } + return OK; +} # ----------------------------------------------------------- Could not resolve sub getlost { my ($r,$errmsg)=@_; - $r->content_type('text/html'); + $errmsg=&mt($errmsg); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; - $r->print( - '
'.$errmsg. - '