--- loncom/interface/lonpdfupload.pm 2009/05/21 03:09:01 1.7 +++ loncom/interface/lonpdfupload.pm 2009/05/23 04:07:09 1.10 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpdfupload.pm,v 1.7 2009/05/21 03:09:01 onken Exp $ +# $Id: lonpdfupload.pm,v 1.10 2009/05/23 04:07:09 onken 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(&mt('Upload PDF Form'))); + $r->print(&Apache::loncommon::start_page('Upload PDF Form')); #load post data into environment &Apache::lonacc::get_posted_cgi($r); @@ -272,11 +272,12 @@ sub grade_pdf { $result .= &Apache::loncommon::start_data_table_row(); $result .= "$problemname$grade"; $result .= &Apache::loncommon::end_data_table_row(); } @@ -306,6 +307,23 @@ sub grade_problem { return ($title, $grade); } +sub parse_grade_answer { + my ($shortcut) = @_; + my %answerhash = ('EXACT_ANS' => &mt('You are correct.'), + 'APPROX_ANS' => &mt('You are correct.'), + 'INCORRECT' => &mt('You are incorrect'), + ); + + foreach my $key (keys %answerhash) { + if($shortcut eq $key) { + return $answerhash{$shortcut}; + } + } + return &mt('See course contents for further information.'); + +} + + sub dumpenv { my $r = shift;