--- loncom/interface/londocs.pm 2004/02/11 00:10:01 1.104 +++ loncom/interface/londocs.pm 2004/02/19 21:51:11 1.107 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.104 2004/02/11 00:10:01 albertel Exp $ +# $Id: londocs.pm,v 1.107 2004/02/19 21:51:11 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -97,13 +97,15 @@ sub authorhosts { } else { ($cd,$ca)=($realm=~/^\/(\w+)\/(\w+)$/); } - if (&Apache::lonnet::homeserver($ca,$cd) eq - $Apache::lonnet::perlvar{'lonHostID'}) { + my $allowed=0; + my $myhome=&Apache::lonnet::homeserver($ca,$cd); + my @ids=&Apache::lonnet::current_machine_ids(); + foreach my $id (@ids) { if ($id eq $myhome) { $allowed=1; } } + if ($allowed) { $home++; $outhash{'home_'.$ca.'@'.$cd}=1; } else { - $outhash{'otherhome_'.$ca.'@'.$cd}= - &Apache::lonnet::homeserver($ca,$cd); + $outhash{'otherhome_'.$ca.'@'.$cd}=$myhome; $other++; } } @@ -395,7 +397,7 @@ sub editor { foreach (@Apache::lonratedt::order) { my ($name,$url)=split(/\:/,$Apache::lonratedt::resources[$_]); unless ($name) { $name=(split(/\//,$url))[-1]; } - unless ($name) { $name='NO RESOURCE'; $url='/adm/notfound.html'; } + unless ($name) { next; } $r->print(&entryline($idx,$name,$url,$folder,$allowed,$_)); $idx++; } @@ -1026,7 +1028,7 @@ function changename(folder,index,oldtitl } function removeres(folder,index,oldtitle) { - if ((oldtitle=='NO RESOURCE') || (confirm('Remove "'+oldtitle+'"?'))) { + if (confirm('Remove "'+oldtitle+'"?')) { this.document.forms.renameform.cmd.value='del_'+index; this.document.forms.renameform.folder.value=folder; this.document.forms.renameform.submit(); @@ -1278,7 +1280,6 @@ ENDFORM $r->print(< $lt{'upls'} -$lt{'impp'} $lt{'spec'} @@ -1297,23 +1298,6 @@ ENDFORM -
- - - - -$help{'Importing_LON-CAPA_Resource'} -

-


- -$help{'Load_Map'} -

-
-