Diff for /loncom/Lond.pm between versions 1.2 and 1.3

version 1.2, 2012/04/26 19:51:40 version 1.3, 2012/04/26 20:00:57
Line 300  sub useable_role { Line 300  sub useable_role {
 }  }
   
   
   sub get_courseinfo_hash {
       my ($cnum,$cdom,$home) = @_;
       my %info;
       eval {
           local($SIG{ALRM}) = sub { die "timeout\n"; };
           local($SIG{__DIE__})='DEFAULT';
           alarm(3);
           %info = &Apache::lonnet::courseiddump($cdom,'.',1,'.','.',$cnum,1,[$home],'.');
           alarm(0);
       };
       if ($@) {
           if ($@ eq "timeout\n") {
               &logthis("<font color='blue'>WARNING courseiddump for $cnum:$cdom from $home timedout</font>");
           } else {
               &logthis("<font color='yellow'>WARNING unexpected error during eval of call for courseiddump from $home</font>");
           }
       } else {
           if (ref($info{$cdom.'_'.$cnum}) eq 'HASH') {
               my $hashid = $cdom.':'.$cnum;
               return &Apache::lonnet::do_cache_new('courseinfo',$hashid,$info{$cdom.'_'.$cnum},600);
           }
       }
       return;
   }
   
   
   
Line 408  the version available on the client serv Line 432  the version available on the client serv
 is compatible, 1 will be returned.  is compatible, 1 will be returned.
   
   
   =item get_courseinfo_hash( $cnum, $cdom, $home )
   
   get_courseinfo_hash() is used to retrieve course information from the db
   file: nohist_courseids.db for a course for which the current server is *not*
   the home server.
   
   A hash of a hash will be retrieved. The outer hash contains a single key --
   courseID -- for the course for which the data are being requested.
   The contents of the inner hash, for that single item in the outer hash
   are returned (and cached in memcache for 10 minutes).
   
   
   
 =back  =back
   
 =head1 BUGS  =head1 BUGS

Removed from v.1.2  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>