Diff for /loncom/xml/lonxml.pm between versions 1.295 and 1.299

version 1.295, 2003/11/21 20:21:20 version 1.299, 2004/01/30 17:27:34
Line 192  sub xmlend { Line 192  sub xmlend {
  $mode='problem';   $mode='problem';
  $status=$Apache::inputtags::status[-1];    $status=$Apache::inputtags::status[-1]; 
     }      }
     return &Apache::lonfeedback::list_discussion().'</html>';      return &Apache::lonfeedback::list_discussion($mode,$status).'</html>';
 }  }
   
 sub tokeninputfield {  sub tokeninputfield {
Line 405  sub latex_special_symbols { Line 405  sub latex_special_symbols {
  $string =~ s/_/ /g;   $string =~ s/_/ /g;
     } else {      } else {
  $string=~s/\\ /\\char92 /g;   $string=~s/\\ /\\char92 /g;
  $string=~s/\^/\\\^ /g;   $string=~s/\^/\\\^\\strut /g;
  $string=~s/\~/\\char126 /g;   $string=~s/\~/\\char126 /g;
  #fixup & if it doesn't look like   #fixup & if it doesn't look like
         # &#123; or &alpha;          # &#123; or &alpha;
Line 998  sub parstring { Line 998  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; }
       if ($val !~ m/^\s*\$[a-z_]/i) { $val =~ s/\$/\\\$/g; }  
       $temp .= "my \$$_=\"$val\";";        $temp .= "my \$$_=\"$val\";";
     }      }
   }    }
Line 1295  sub display_title { Line 1294  sub display_title {
 }  }
   
 sub debug {  sub debug {
   if ($Apache::lonxml::debug eq 1) {      if ($Apache::lonxml::debug eq "1") {
     $|=1;   $|=1;
     print('<font size="-2"<pre>DEBUG:'.&HTML::Entities::encode($_[0])."</pre></font>\n");   Apache->request->print('<font size="-2"<pre>DEBUG:'.&HTML::Entities::encode($_[0])."</pre></font>\n");
   }      }
 }  }
   
 sub error {  sub error {
Line 1346  sub get_param { Line 1345  sub get_param {
     if ( ! $context ) { $context = -1; }      if ( ! $context ) { $context = -1; }
     my $args ='';      my $args ='';
     if ( $#$parstack > (-2-$context) ) { $args=$$parstack[$context]; }      if ( $#$parstack > (-2-$context) ) { $args=$$parstack[$context]; }
       if ( ! $Apache::lonxml::usestyle ) {
    $args=$Apache::lonxml::style_values.$args;
       }
     if ( ! $args ) { return undef; }      if ( ! $args ) { return undef; }
     if ( $case_insensitive ) {      if ( $case_insensitive ) {
  if ($args =~ s/(my \$)(\Q$param\E)(=\")/$1.lc($2).$3/ei) {   if ($args =~ s/(my \$)(\Q$param\E)(=\")/$1.lc($2).$3/ei) {
Line 1369  sub get_param_var { Line 1371  sub get_param_var {
   if ( ! $context ) { $context = -1; }    if ( ! $context ) { $context = -1; }
   my $args ='';    my $args ='';
   if ( $#$parstack > (-2-$context) ) { $args=$$parstack[$context]; }    if ( $#$parstack > (-2-$context) ) { $args=$$parstack[$context]; }
     if ( ! $Apache::lonxml::usestyle ) {
         $args=$Apache::lonxml::style_values.$args;
     }
   &Apache::lonxml::debug("Args are $args param is $param");    &Apache::lonxml::debug("Args are $args param is $param");
   if ($case_insensitive) {    if ($case_insensitive) {
       if (! ($args=~s/(my \$)(\Q$param\E)(=\")/$1.lc($2).$3/ei)) {        if (! ($args=~s/(my \$)(\Q$param\E)(=\")/$1.lc($2).$3/ei)) {

Removed from v.1.295  
changed lines
  Added in v.1.299


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