--- loncom/interface/londocs.pm 2008/12/10 21:46:58 1.318
+++ loncom/interface/londocs.pm 2012/01/29 19:50:53 1.475
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.318 2008/12/10 21:46:58 kaisler Exp $
+# $Id: londocs.pm,v 1.475 2012/01/29 19:50:53 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -35,11 +35,13 @@ use Apache::Constants qw(:common :http);
use Apache::imsexport;
use Apache::lonnet;
use Apache::loncommon;
+use Apache::lonhtmlcommon;
use LONCAPA::map();
use Apache::lonratedt();
use Apache::lonxml;
use Apache::lonclonecourse;
use Apache::lonnavmaps;
+use Apache::lonnavdisplay();
use HTML::Entities;
use GDBM_File;
use Apache::lonlocal;
@@ -59,7 +61,6 @@ my $hadchanges;
my %help=();
-
sub mapread {
my ($coursenum,$coursedom,$map)=@_;
return
@@ -73,7 +74,7 @@ sub storemap {
&LONCAPA::map::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'.
$map,1);
if ($errtext) { return ($errtext,2); }
-
+
$hadchanges=1;
return ($errtext,0);
}
@@ -84,14 +85,14 @@ sub authorhosts {
my %outhash=();
my $home=0;
my $other=0;
- foreach (keys %env) {
- if ($_=~/^user\.role\.(au|ca)\.(.+)$/) {
+ foreach my $key (keys(%env)) {
+ if ($key=~/^user\.role\.(au|ca)\.(.+)$/) {
my $role=$1;
my $realm=$2;
- my ($start,$end)=split(/\./,$env{$_});
+ my ($start,$end)=split(/\./,$env{$key});
if (($start) && ($start>time)) { next; }
if (($end) && (time>$end)) { next; }
- my $ca; my $cd;
+ my ($ca,$cd);
if ($1 eq 'au') {
$ca=$env{'user.name'};
$cd=$env{'user.domain'};
@@ -117,36 +118,39 @@ sub authorhosts {
sub dumpbutton {
my ($home,$other,%outhash)=&authorhosts();
- my $type = &Apache::loncommon::course_type();
+ my $crstype = &Apache::loncommon::course_type();
if ($home+$other==0) { return ''; }
if ($home) {
- return '