--- rat/lonsequence.pm 2001/11/29 19:23:49 1.5 +++ rat/lonsequence.pm 2021/04/19 18:21:13 1.54 @@ -2,7 +2,7 @@ # # Sequence Handler # -# $Id: lonsequence.pm,v 1.5 2001/11/29 19:23:49 www Exp $ +# $Id: lonsequence.pm,v 1.54 2021/04/19 18:21:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -26,15 +26,8 @@ # # http://www.lon-capa.org/ # -# (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,116 +35,473 @@ use strict; use Apache::lonnet; use Apache::Constants qw(:common :http REDIRECT); use GDBM_File; +use LONCAPA::map(); +use LONCAPA::ltiutils; +use LONCAPA; +use Apache::lonpageflip(); +use Apache::loncommon(); +use Apache::groupsort(); +use Apache::lonlocal; +use Apache::lonnavmaps(); +use Apache::lonenc(); +use HTML::Entities(); + +my %selhash; +my $successtied; + +# ----------------------------------------- Attempt to read from resource space + +sub attemptread { + my ($fn,$unsorted)=@_; + &Apache::lonnet::repcopy($fn); + if (-e $fn) { + return &LONCAPA::map::attemptread($fn,$unsorted); + } else { + return (); + } +} + +sub mapread { + my $fn=shift; + &Apache::lonnet::repcopy($fn); + if (-e $fn) { + return &LONCAPA::map::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. - '