--- loncom/interface/lonpdfupload.pm 2009/05/15 23:40:54 1.5 +++ loncom/interface/lonpdfupload.pm 2009/05/16 00:28:38 1.6 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpdfupload.pm,v 1.5 2009/05/15 23:40:54 bisitz Exp $ +# $Id: lonpdfupload.pm,v 1.6 2009/05/16 00:28:38 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -65,7 +65,7 @@ sub handler() { $env{'request.uri'}=$r->uri; $r->content_type('text/html'); $r->send_http_header(); - $r->print(&Apache::loncommon::start_page('Upload-PDF-Form')); + $r->print(&Apache::loncommon::start_page('Upload PDF Form')); #load post data into environment &Apache::lonacc::get_posted_cgi($r); @@ -80,7 +80,8 @@ sub handler() { } #link to course-content - $r->print('

'."\n" + $r->print('


' + .'

'."\n" .''."\n" .&mt("Navigate Contents")."\n" .''."\n" @@ -121,7 +122,7 @@ END sub get_javascripts() { - my $message = &mt('Please choose a PDF-File'); + my $message = &mt('Please choose a PDF-File.'); # simple test if the upload ends with ".pdf" # it's only for giving a message to the user @@ -146,9 +147,9 @@ END sub get_uploadform() { my %lt = &Apache::lonlocal::texthash( - 'title'=>'Submit a PDF-Form with problems', - 'chFile' => 'Choose file', - 'submit'=>'Submit' + 'title' => 'Upload a PDF Form with filled Form Fields', + 'chFile' => 'File', + 'submit' => 'Upload', ); my $result = @@ -165,8 +166,7 @@ sub get_uploadform() { .&Apache::lonhtmlcommon::end_pick_box() .'' .'' - .'
' - .'


'; + .'
'; return $result; } @@ -180,7 +180,9 @@ sub processPDF { if (scalar @pdfdata) { &grade_pdf(@pdfdata); } else { - $result .= "

".&mt("Can't find any valid PDF-formfields")."

"; + $result .= '

' + .&mt("Can't find any valid PDF formfields.") + .'

'; } } @@ -215,11 +217,13 @@ sub grade_pdf { my $debug = (); $debug .= "Found: ". scalar @pdfdata." Entries \n"; - $result .= '
'; - $result .= &Apache::loncommon::start_data_table(); - $result .= &Apache::loncommon::start_data_table_header_row(); - $result .= &mt('Results of PDF-Form problems'); - $result .= &Apache::loncommon::end_data_table_header_row(); + $result .= '

'.&mt('Results of PDF Form problems').'

'; + $result .= &Apache::loncommon::start_data_table() + .&Apache::loncommon::start_data_table_header_row() + .''.&mt('Problem Name').'' + .''.&mt('Grading').'' + .&Apache::loncommon::start_data_table_header_row() + .&Apache::loncommon::end_data_table_header_row(); foreach my $entry (sort(@pdfdata)) { if ($entry =~ /^meta.*/) { @@ -239,7 +243,7 @@ sub grade_pdf { my ($map,$id,$resource)=&Apache::lonnet::decode_symb($symb); $value =~ s/(.*)\n/$1/; - #fehlerhafte Radiobuttons rausfiltern (Bug in CABAReT Stage) + #filter incorrect radiobuttons (Bug in CABAReT Stage) if($type eq 'radiobuttonresponse' && $value eq 'Off' ) { next; } @@ -278,7 +282,6 @@ sub grade_pdf { $result .= "'>$grade"; $result .= &Apache::loncommon::end_data_table_row(); } - #$result .= "\n"; $result .= &Apache::loncommon::end_data_table();