--- loncom/lonnet/perl/lonnet.pm 2006/12/01 21:52:30 1.811 +++ loncom/lonnet/perl/lonnet.pm 2006/12/09 23:33:56 1.813 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.811 2006/12/01 21:52:30 albertel Exp $ +# $Id: lonnet.pm,v 1.813 2006/12/09 23:33:56 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3044,6 +3044,7 @@ sub getkeys { my $rep=reply("keys:$udomain:$uname:$namespace",$uhome); my @keyarray=(); foreach my $key (split(/\&/,$rep)) { + next if ($key =~ /^error: 2 /); push(@keyarray,&unescape($key)); } return @keyarray; @@ -4930,6 +4931,16 @@ ENDINITMAP return '/'.$udom.'/'.$uname; } +sub is_course { + my ($cdom,$cnum) = @_; + my %courses = &courseiddump($cdom,'.',1,'.','.',$cnum,undef, + undef,'.'); + if (exists($courses{$cdom.'_'.$cnum})) { + return 1; + } + return 0; +} + # ---------------------------------------------------------- Assign Custom Role sub assigncustomrole {