--- loncom/interface/lonpdfupload.pm 2010/03/22 15:39:37 1.20 +++ loncom/interface/lonpdfupload.pm 2014/02/28 19:20:06 1.23 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # PDF Form Upload Handler # -# $Id: lonpdfupload.pm,v 1.20 2010/03/22 15:39:37 onken Exp $ +# $Id: lonpdfupload.pm,v 1.23 2014/02/28 19:20:06 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -130,7 +130,7 @@ sub get_javascripts() { // ' - .&mt("Can't find any valid PDF formfields.") + .&mt("Can't find any valid PDF form fields.") .'

'; } } @@ -193,12 +193,12 @@ sub get_pdf_data() { my $pdf = CAM::PDF->new($env{'form.file'}); if($pdf) { - my @formFields = $pdf->getFormFieldList(); #get names of formfields + my @formFields = $pdf->getFormFieldList(); #get names of form fields 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 # "i", "i.am" and "i.am.aFormfield". The fragmentary names keep no values and will be ignored. if($dict->{'V'}) { @@ -299,10 +299,12 @@ sub grade_pdf { $result .= ''). - '">'.$problemname.''.$problemname.' &mt('You are correct.'), 'APPROX_ANS' => &mt('You are correct.'), 'INCORRECT' => &mt('You are incorrect'), + 'DRAFT' => &mt('Copy saved but not submitted.'), ); foreach my $key (keys %answerhash) {