Diff for /loncom/xml/lonxml.pm between versions 1.266.2.2 and 1.267

version 1.266.2.2, 2003/09/27 04:15:26 version 1.267, 2003/08/04 14:30:34
Line 158  $Apache::lonxml::usestyle=1; Line 158  $Apache::lonxml::usestyle=1;
 $Apache::lonxml::style_values='';  $Apache::lonxml::style_values='';
 $Apache::lonxml::style_end_values='';  $Apache::lonxml::style_end_values='';
   
 #array of ssi calls that need to occur after we are done parsing  
 @Apache::lonxml::ssi_info=();  
   
 sub xmlbegin {  sub xmlbegin {
   my $output='';    my $output='';
   if ($ENV{'browser.mathml'}) {    if ($ENV{'browser.mathml'}) {
Line 454  sub xmlparse { Line 451  sub xmlparse {
  if ($ENV{'request.uri'}) {   if ($ENV{'request.uri'}) {
     &writeallows($ENV{'request.uri'});      &writeallows($ENV{'request.uri'});
  }   }
  &do_registered_ssi();  
  if ($Apache::lonxml::counter_changed) { &store_counter() }   if ($Apache::lonxml::counter_changed) { &store_counter() }
  return $finaloutput;   return $finaloutput;
 }  }
Line 496  sub latex_special_symbols { Line 492  sub latex_special_symbols {
  $current_token=~s/(>|<)/\$$1\$/g; #more or less   $current_token=~s/(>|<)/\$$1\$/g; #more or less
  if ($current_token=~m/\d%/) {$current_token =~ s/(\d)%/$1\\%/g;} #percent after digit   if ($current_token=~m/\d%/) {$current_token =~ s/(\d)%/$1\\%/g;} #percent after digit
  if ($current_token=~m/\s%/) {$current_token =~ s/(\s)%/$1\\%/g;} #persent after space   if ($current_token=~m/\s%/) {$current_token =~ s/(\s)%/$1\\%/g;} #persent after space
    if ($current_token eq '%.') {$current_token = '\%.';} #persent at the end of statement
     }      }
     return $current_token;      return $current_token;
 }  }
Line 703  sub setup_globals { Line 700  sub setup_globals {
   &init_counter();    &init_counter();
   @Apache::lonxml::pwd=();    @Apache::lonxml::pwd=();
   @Apache::lonxml::extlinks=();    @Apache::lonxml::extlinks=();
   @Apache::lonxml::ssi_info=();  
   if ($target eq 'meta') {    if ($target eq 'meta') {
     $Apache::lonxml::redirection = 0;      $Apache::lonxml::redirection = 0;
     $Apache::lonxml::metamode = 1;      $Apache::lonxml::metamode = 1;
Line 1054  sub parstring { Line 1050  sub parstring {
       my $val=$token->[2]->{$_};        my $val=$token->[2]->{$_};
       $val =~ s/([\%\@\\\"\'])/\\$1/g;        $val =~ s/([\%\@\\\"\'])/\\$1/g;
       #if ($val =~ m/^[\%\@]/) { $val="\\".$val; }        #if ($val =~ m/^[\%\@]/) { $val="\\".$val; }
       $temp .= "my \$$_=\"$val\";"        $temp .= "my \$$_=\"$val\";";
     }      }
   }    }
   return $temp;    return $temp;
Line 1077  sub writeallows { Line 1073  sub writeallows {
     &Apache::lonnet::appenv(%httpref);      &Apache::lonnet::appenv(%httpref);
 }  }
   
 sub register_ssi {  
     my ($url,%form)=@_;  
     push (@Apache::lonxml::ssi_info,{'url'=>$url,'form'=>\%form});  
     return '';  
 }  
   
 sub do_registered_ssi {  
     foreach my $info (@Apache::lonxml::ssi_info) {  
  my %form=%{ $info->{'form'}};  
  my $url=$info->{'url'};  
  &Apache::lonnet::ssi($url,%form);  
     }  
 }  
 #  #
 # Afterburner handles anchors, highlights and links  # Afterburner handles anchors, highlights and links
 #  #
Line 1461  sub whichuser { Line 1444  sub whichuser {
   my ($symb,$courseid,$domain,$name,$publicuser);    my ($symb,$courseid,$domain,$name,$publicuser);
   if (defined($ENV{'form.grade_symb'})) {    if (defined($ENV{'form.grade_symb'})) {
     my $tmp_courseid=$ENV{'form.grade_courseid'};      my $tmp_courseid=$ENV{'form.grade_courseid'};
     my $allowed=&Apache::lonnet::allowed('vgr',$tmp_courseid);      my $allowed=&Apache::lonnet::allowed('mgr',$tmp_courseid);
     if ($allowed) {      if ($allowed) {
       $symb=$ENV{'form.grade_symb'};        $symb=$ENV{'form.grade_symb'};
       $courseid=$ENV{'form.grade_courseid'};        $courseid=$ENV{'form.grade_courseid'};

Removed from v.1.266.2.2  
changed lines
  Added in v.1.267


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