Diff for /loncom/xml/lonxml.pm between versions 1.484.2.2 and 1.485

version 1.484.2.2, 2008/10/24 19:36:40 version 1.485, 2008/09/05 12:11:45
Line 505  sub inner_xmlparse { Line 505  sub inner_xmlparse {
   if (!$Apache::lonxml::usestyle) {    if (!$Apache::lonxml::usestyle) {
       $extras=$Apache::lonxml::style_values;        $extras=$Apache::lonxml::style_values;
   }    }
           if ($token->[1] ne 'translated') {   if ( $#$parstack > -1 ) {
       if ( $#$parstack > -1 ) {    $result=&Apache::run::evaluate($result,$safeeval,$extras.$$parstack[-1]);
           $result=&Apache::run::evaluate($result,$safeeval,$extras.$$parstack[-1]);   } else {
       } else {    $result= &Apache::run::evaluate($result,$safeeval,$extras);
           $result=&Apache::run::evaluate($result,$safeeval,$extras);   }
       }  
           }  
       }        }
       $Apache::lonxml::post_evaluate=1;        $Apache::lonxml::post_evaluate=1;
   
Line 1856  sub error { Line 1854  sub error {
  my ($symb)=&Apache::lonnet::symbread();   my ($symb)=&Apache::lonnet::symbread();
  if ( !$symb ) {   if ( !$symb ) {
     #public or browsers      #public or browsers
     $errormsg=&mt("An error occurred while processing this resource. The author has been notified.");      $errormsg=&mt("An error occured while processing this resource. The author has been notified.");
  }   }
  my $host=$Apache::lonnet::perlvar{'lonHostID'};   my $host=$Apache::lonnet::perlvar{'lonHostID'};
  push(@errors,   push(@errors,
Line 1895  sub error { Line 1893  sub error {
  }   }
     }      }
     if ($env{'request.role.adv'}) {      if ($env{'request.role.adv'}) {
  $errormsg=&mt("An error occurred while processing this resource. The course personnel ([_1]) and the author have been notified.",join(', ',@userlist));   $errormsg=&mt("An error occured while processing this resource. The course personnel ([_1]) and the author have been notified.",join(', ',@userlist));
     } else {      } else {
  $errormsg=&mt("An error occurred while processing this resource. The instructor has been notified.");   $errormsg=&mt("An error occured while processing this resource. The instructor has been notified.");
     }      }
  }   }
  push(@Apache::lonxml::error_messages,"<b>$errormsg</b> <br />");   push(@Apache::lonxml::error_messages,"<b>$errormsg</b> <br />");
Line 2139  sub get_tag { Line 2137  sub get_tag {
     return $insertlist{"$tagnum.tag"};      return $insertlist{"$tagnum.tag"};
 }  }
   
   ############################################################
   #                                           PDF-FORM-METHODS
   
   =pod
   
   =item &print_pdf_radiobutton(fieldname, value,  text)
   
   Returns a latexline to generate a PDF-Form-Radiobutton with Text.
   
   $fieldname: PDF internalname of the radiobutton
   $value:     Value of radiobutton (read when dumping the PDF data)
   $text:      Text on the rightside of the radiobutton
   
   =cut
   sub print_pdf_radiobutton {
       my $result = '';
       my ($fieldName, $value, $text) = @_;
       $result .= '\begin{tabularx}{\textwidth}{p{0cm}X}'."\n";
       $result .= '\radioButton[\symbolchoice{circle}]{'. 
                  $fieldName.'}{10bp}{10bp}{'.$value.'}&'.$text."\n";
       $result .= '\end{tabularx}' . "\n";
       $result .= '\hspace{2mm}' . "\n";
       return $result;
   }
   
   
   =pod
   
   =item &print_pdf_start_combobox(fieldname)
   
   Starts a latexline to generate a PDF-Form-Combobox with text.
   
   $fieldname: PDF internal name of the Combobox
   
   =cut
   sub print_pdf_start_combobox {
       my $result;
       my ($fieldName) = @_;
       $result .= '\begin{tabularx}{\textwidth}{p{2.5cm}X}'."\n";
       $result .= '\comboBox[]{'.$fieldName.'}{2.3cm}{14bp}{'; # 
   
       return $result;
   }
   
   
   =pod
   
   =item &print_pdf_add_combobox_option(options)
   
   Generates a latexline to add Options to a PDF-Form-ComboBox.
   
   $option: PDF internal name of the Combobox-Option
   
   =cut
   sub print_pdf_add_combobox_option {
   
       my $result;
       my ($option) = @_;  
   
       $result .= '('.$option.')';
       
       return $result;
   }
   
   
   =pod
   
   =item &print_pdf_end_combobox(text) {
   
   Returns latexcode to end a PDF-Form-Combobox with text.
   
   =cut
   sub print_pdf_end_combobox {
       my $result;
       my ($text) = @_;
   
       $result .= '}&'.$text."\\\\\n";
       $result .= '\end{tabularx}' . "\n";
       $result .= '\hspace{2mm}' . "\n";
       return $result;
   }
   
   
   =pod
   
   =item &print_pdf_hiddenField(fieldname, user, domain)
   
   Returns a latexline to generate a PDF-Form-hiddenField with userdata.
   
   $fieldname label for hiddentextfield
   $user:    name of user
   $domain:  domain of user
   
   =cut
   sub print_pdf_hiddenfield {
       my $result;
       my ($fieldname, $user, $domain) = @_;
   
       $result .= '\textField [\F{\FHidden}\F{-\FPrint}\V{'.$domain.'&'.$user.'}]{'.$fieldname.'}{0in}{0in}'."\n";
   
       return $result;
   }
   
 1;  1;
 __END__  __END__
   
   

Removed from v.1.484.2.2  
changed lines
  Added in v.1.485


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