Diff for /loncom/interface/loncommon.pm between versions 1.684 and 1.685

version 1.684, 2008/09/11 15:15:29 version 1.685, 2008/09/11 21:05:19
Line 61  use POSIX qw(strftime mktime); Line 61  use POSIX qw(strftime mktime);
 use Apache::lonmenu();  use Apache::lonmenu();
 use Apache::lonenc();  use Apache::lonenc();
 use Apache::lonlocal;  use Apache::lonlocal;
   use Apache::lonnet();
 use HTML::Entities;  use HTML::Entities;
 use Apache::lonhtmlcommon();  use Apache::lonhtmlcommon();
 use Apache::loncoursedata();  use Apache::loncoursedata();
Line 9467  sub _add_to_env { Line 9468  sub _add_to_env {
     }      }
 }  }
   
   # --- Get the symbolic name of a problem and the url
   sub get_symb {
       my ($request,$silent) = @_;
       (my $url=$env{'form.url'}) =~ s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--;
       my $symb=($env{'form.symb'} ne '' ? $env{'form.symb'} : (&Apache::lonnet::symbread($url)));
       if ($symb eq '') {
           if (!$silent) {
               $request->print("Unable to handle ambiguous references:$url:.");
               return ();
           }
       }
       &Apache::lonenc::check_decrypt(\$symb);
       return ($symb);
   }
   
   # --------------------------------------------------------------Get annotation
   
   sub get_annotation {
       my ($symb,$enc) = @_;
   
       my $key = $symb;
       if (!$enc) {
           $key =
               &Apache::lonnet::clutter((&Apache::lonnet::decode_symb($symb))[2]);
       }
       my %annotation=&Apache::lonnet::get('nohist_annotations',[$key]);
       return $annotation{$key};
   }
   
   sub clean_symb {
       my ($symb) = @_;
   
       &Apache::lonenc::check_decrypt(\$symb);
       my $enc = $env{'request.enc'};
       delete($env{'request.enc'});
   
       return ($symb,$enc);
   }
   
 =pod  =pod
   

Removed from v.1.684  
changed lines
  Added in v.1.685


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