Diff for /loncom/interface/lontest.pm between versions 1.15 and 1.17

version 1.15, 2005/04/05 20:43:27 version 1.17, 2005/04/07 08:15:41
Line 39  use Apache::lonnet; Line 39  use Apache::lonnet;
 # what section the given env var is in, which is the part  # what section the given env var is in, which is the part
 # of the env var before the first period.  # of the env var before the first period.
 # Returns the section, or blank string for 'no section',  # Returns the section, or blank string for 'no section',
 # which is normal for the standard ENV vars like REQUEST_URI.  # which is normal for the standard env vars like REQUEST_URI.
 sub section  sub section
 {  {
     my ($name) = @_;      my ($name) = @_;
Line 87  sub handler { Line 87  sub handler {
     my $html=&Apache::lonxml::xmlbegin();      my $html=&Apache::lonxml::xmlbegin();
     my $bodytag=&Apache::loncommon::bodytag("List Environment","admin");      my $bodytag=&Apache::loncommon::bodytag("List Environment","admin");
     $r->print($html.'<head></head>'.$bodytag);      $r->print($html.'<head></head>'.$bodytag);
    
     $r->print("<hr /><h1>Debugging</h1><hr />\n");      $r->print("<hr /><h1>Debugging</h1><hr />\n");
     $r->print("<font face='Courier'>");      $r->print("<font face='Courier'>");
            $r->print("<hr /><h2>ENV</h2><hr />\n");
     my %differences=%ENV;  
     foreach my $key (sort(keys(%env))) {  
  if ($env{$key} eq $differences{$key}) {  
     delete($differences{$key});  
  }  
     }  
     &print_hash($r,\%differences);  
     &print_hash($r,\%env);  
     &print_hash($r,\%ENV);      &print_hash($r,\%ENV);
       $r->print("<hr /><h2>env</h2><hr />\n");
       &print_hash($r,\%env);
 # ------------------------------------------------ If in a course, print hashes  # ------------------------------------------------ If in a course, print hashes
     if ($ENV{'request.course.id'}) {      if ($env{'request.course.id'}) {
   
  my %parmhash;   my %parmhash;
  my %symbhash;   my %symbhash;
  my %hash;   my %hash;
   
  my $fn=$ENV{'request.course.fn'};   my $fn=$env{'request.course.fn'};
   
  if (tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640)) {   if (tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640)) {
     $r->print('<h2>Big Hash</h2>');      $r->print('<h2>Big Hash</h2>');
Line 119  sub handler { Line 113  sub handler {
     $r->print('<h2>Count not tie big hash</h2>');      $r->print('<h2>Count not tie big hash</h2>');
  }   }
  if (tie(%parmhash,'GDBM_File',   if (tie(%parmhash,'GDBM_File',
  $ENV{'request.course.fn'}.'_parms.db',   $env{'request.course.fn'}.'_parms.db',
  &GDBM_READER(),0640)) {   &GDBM_READER(),0640)) {
     $r->print('<h2>Parm Hash</h2>');      $r->print('<h2>Parm Hash</h2>');
     foreach (sort keys %parmhash) {      foreach (sort keys %parmhash) {

Removed from v.1.15  
changed lines
  Added in v.1.17


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