Diff for /loncom/xml/lonxml.pm between versions 1.95 and 1.96

version 1.95, 2001/06/16 16:09:09 version 1.96, 2001/06/16 18:34:31
Line 225  sub printalltags { Line 225  sub printalltags {
   
 sub xmlparse {  sub xmlparse {
  my ($target,$content_file_string,$safeinit,%style_for_target) = @_;   my ($target,$content_file_string,$safeinit,%style_for_target) = @_;
  if ($target eq 'meta') {  
    $Apache::lonxml::redirection = 0;   &setup_globals($target);
    $Apache::lonxml::metamode = 1;  
    $Apache::lonxml::evaluate = 1;  
    $Apache::lonxml::import = 0;  
  } elsif ($target eq 'grade') {  
    &startredirection;  
    $Apache::lonxml::metamode = 0;  
    $Apache::lonxml::evaluate = 1;  
    $Apache::lonxml::import = 1;  
  } elsif ($target eq 'modified') {  
    $Apache::lonxml::redirection = 0;  
    $Apache::lonxml::metamode = 0;  
    $Apache::lonxml::evaluate = 0;  
    $Apache::lonxml::import = 0;  
  } else {  
    $Apache::lonxml::redirection = 0;  
    $Apache::lonxml::metamode = 0;  
    $Apache::lonxml::evaluate = 1;  
    $Apache::lonxml::import = 1;  
  }  
  #&printalltags();   #&printalltags();
  my @pars = ();   my @pars = ();
  @Apache::lonxml::pwd=();   @Apache::lonxml::pwd=();
Line 472  sub callsub { Line 453  sub callsub {
   return $currentstring;    return $currentstring;
 }  }
   
   sub setup_globals {
     my ($target)=@_;
     if ($target eq 'meta') {
       $Apache::lonxml::redirection = 0;
       $Apache::lonxml::metamode = 1;
       $Apache::lonxml::evaluate = 1;
       $Apache::lonxml::import = 0;
     } elsif ($target eq 'grade') {
       &startredirection;
       $Apache::lonxml::metamode = 0;
       $Apache::lonxml::evaluate = 1;
       $Apache::lonxml::import = 1;
     } elsif ($target eq 'modified') {
       $Apache::lonxml::redirection = 0;
       $Apache::lonxml::metamode = 0;
       $Apache::lonxml::evaluate = 0;
       $Apache::lonxml::import = 0;
     } elsif ($target eq 'edit') {
       $Apache::lonxml::redirection = 0;
       $Apache::lonxml::metamode = 0;
       $Apache::lonxml::evaluate = 0;
       $Apache::lonxml::import = 0;
     } else {
       $Apache::lonxml::redirection = 0;
       $Apache::lonxml::metamode = 0;
       $Apache::lonxml::evaluate = 1;
       $Apache::lonxml::import = 1;
     }
   }
   
 sub init_safespace {  sub init_safespace {
   my ($target,$safeeval,$safehole,$safeinit) = @_;    my ($target,$safeeval,$safehole,$safeinit) = @_;
   $safeeval->permit("entereval");    $safeeval->permit("entereval");
Line 809  ENDNOTFOUND Line 820  ENDNOTFOUND
     
 sub debug {  sub debug {
   if ($Apache::lonxml::debug eq 1) {    if ($Apache::lonxml::debug eq 1) {
     print "DEBUG:".$_[0]."<br />\n";      print("DEBUG:".$_[0]."<br />\n");
   }    }
 }  }
   

Removed from v.1.95  
changed lines
  Added in v.1.96


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