--- loncom/lonnet/perl/lonnet.pm 2004/01/26 21:58:34 1.464 +++ loncom/lonnet/perl/lonnet.pm 2004/01/30 14:42:00 1.467 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.464 2004/01/26 21:58:34 albertel Exp $ +# $Id: lonnet.pm,v 1.467 2004/01/30 14:42:00 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1446,6 +1446,7 @@ sub get_course_adv_roles { if (($tend) && ($tend<$now)) { next; } if (($tstart) && ($now<$tstart)) { next; } my ($role,$username,$domain,$section)=split(/\:/,$_); + if (&privileged($username,$domain)) { next; } my $key=&plaintext($role); if ($section) { $key.=' (Sec/Grp '.$section.')'; } if ($returnhash{$key}) { @@ -4486,6 +4487,30 @@ sub hreflocation { return $file; } +sub current_machine_domains { + my $hostname=$hostname{$perlvar{'lonHostID'}}; + my @domains; + while( my($id, $name) = each(%hostname)) { +# &logthis("-$id-$name-$hostname-"); + if ($hostname eq $name) { + push(@domains,$hostdom{$id}); + } + } + return @domains; +} + +sub current_machine_ids { + my $hostname=$hostname{$perlvar{'lonHostID'}}; + my @ids; + while( my($id, $name) = each(%hostname)) { +# &logthis("-$id-$name-$hostname-"); + if ($hostname eq $name) { + push(@ids,$id); + } + } + return @ids; +} + # ------------------------------------------------------------- Declutters URLs sub declutter {