Diff for /loncom/interface/lonpdfupload.pm between versions 1.22 and 1.23

version 1.22, 2012/09/14 11:24:06 version 1.23, 2014/02/28 19:20:06
Line 183  sub processPDF { Line 183  sub processPDF {
         &grade_pdf(@pdfdata);          &grade_pdf(@pdfdata);
     } else {      } else {
         $result .= '<p class="LC_error">'          $result .= '<p class="LC_error">'
                   .&mt("Can't find any valid PDF formfields.")                    .&mt("Can't find any valid PDF form fields.")
                   .'</p>';                    .'</p>';
     }      }
 }  }
Line 193  sub get_pdf_data() { Line 193  sub get_pdf_data() {
     my $pdf = CAM::PDF->new($env{'form.file'});      my $pdf = CAM::PDF->new($env{'form.file'});
   
     if($pdf) {      if($pdf) {
         my @formFields = $pdf->getFormFieldList(); #get names of formfields          my @formFields = $pdf->getFormFieldList(); #get names of form fields
   
         foreach my $field (@formFields) {          foreach my $field (@formFields) {
             my $dict = $pdf->getFormFieldDict($pdf->getFormField($field)); # get formfield dictonary              my $dict = $pdf->getFormFieldDict($pdf->getFormField($field)); # get form field dictonary
   
             # this is necessary because CAM::PDF has a problem with formfieldnames which include a              # this is necessary because CAM::PDF has a problem with form fieldnames which include a
             # dot in fieldnames. So a fieldname like "i.am.aFormfield" will offer three fieldnames              # dot in fieldnames. So a fieldname like "i.am.aFormfield" will offer three fieldnames
             # "i", "i.am" and "i.am.aFormfield". The fragmentary names keep no values and will be ignored.              # "i", "i.am" and "i.am.aFormfield". The fragmentary names keep no values and will be ignored.
             if($dict->{'V'}) {              if($dict->{'V'}) {

Removed from v.1.22  
changed lines
  Added in v.1.23


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