--- loncom/interface/londocs.pm 2004/09/18 17:04:03 1.145 +++ loncom/interface/londocs.pm 2005/11/04 20:52:35 1.208 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.145 2004/09/18 17:04:03 albertel Exp $ +# $Id: londocs.pm,v 1.208 2005/11/04 20:52:35 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -30,6 +30,7 @@ package Apache::londocs; use strict; use Apache::Constants qw(:common :http); +use Apache::imsexport; use Apache::lonnet; use Apache::loncommon; use Apache::lonratedt; @@ -85,17 +86,17 @@ sub authorhosts { my %outhash=(); my $home=0; my $other=0; - foreach (keys %ENV) { + foreach (keys %env) { if ($_=~/^user\.role\.(au|ca)\.(.+)$/) { my $role=$1; my $realm=$2; - my ($start,$end)=split(/\./,$ENV{$_}); + my ($start,$end)=split(/\./,$env{$_}); if (($start) && ($start>time)) { next; } if (($end) && (time>$end)) { next; } my $ca; my $cd; if ($1 eq 'au') { - $ca=$ENV{'user.name'}; - $cd=$ENV{'user.domain'}; + $ca=$env{'user.name'}; + $cd=$env{'user.domain'}; } else { ($cd,$ca)=($realm=~/^\/(\w+)\/(\w+)$/); } @@ -131,35 +132,44 @@ sub dumpbutton { } } +sub clean { + my ($title)=@_; + $title=~s/[^\w\/\!\$\%\^\*\-\_\=\+\;\:\,\\\|\`\~]+/\_/gs; + return $title; +} # -------------------------------------------------------- Actually dump course sub dumpcourse { my $r=shift; - $r->print('
\n"); + foreach my $res ($navmap->retrieveResources()) { + $r->print($res->compTitle()."\t".$res->symb()."\n"); + } + $r->print("\n\n"); + $r->print(''.&mt('Return to DOCS').''); +} + + +# # -------------------------------------------------------------- Verify Content # sub verifycontent { my $r=shift; my $loaderror=&Apache::lonnet::overloaderror($r); if ($loaderror) { return $loaderror; } - - $r->print('
'. &mt('It is recommended that you use an up-to-date virus scanner before handling this file.')."