--- rat/lonsequence.pm 2002/04/02 21:05:50 1.6 +++ rat/lonsequence.pm 2006/04/04 15:32:12 1.26 @@ -2,7 +2,7 @@ # # Sequence Handler # -# $Id: lonsequence.pm,v 1.6 2002/04/02 21:05:50 www Exp $ +# $Id: lonsequence.pm,v 1.26 2006/04/04 15:32:12 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -28,13 +28,6 @@ # # (Handler to resolve ambiguous file locations # -# (TeX Content Handler -# -# 05/29/00,05/30,10/11 Gerd Kortemeyer) -# -# 10/11,10/12 Gerd Kortemeyer) -# -# 10/16 Gerd Kortemeyer package Apache::lonsequence; @@ -42,110 +35,320 @@ use strict; use Apache::lonnet; use Apache::Constants qw(:common :http REDIRECT); use GDBM_File; +use Apache::lonratedt; +use Apache::lonratsrv; +use Apache::lonpageflip; +use Apache::loncommon; +use Apache::lonlocal; + +my %selhash; +my $successtied; + +# ----------------------------------------- Attempt to read from resource space + +sub attemptread { + my $fn=shift; + &Apache::lonnet::repcopy($fn); + if (-e $fn) { + return &Apache::lonratedt::attemptread($fn); + } else { + return (); + } +} +sub mapread { + my $fn=shift; + &Apache::lonnet::repcopy($fn); + if (-e $fn) { + return &Apache::lonratedt::mapread($fn,''); + } else { + return (); + } +} + +# ---------------------------------------------------------------- View Handler -# ----------------------------------------------------------- Could not resolve +sub viewmap { + my ($r,$url)=@_; -sub getlost { - my ($r,$errmsg)=@_; - $r->content_type('text/html'); - $r->send_http_header; - $r->print( - '
'.$errmsg. - '