--- loncom/interface/lonpdfupload.pm 2009/05/21 03:09:01 1.7
+++ loncom/interface/lonpdfupload.pm 2009/05/21 04:58:40 1.8
@@ -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.8 2009/05/21 04:58:40 onken Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -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 approximated right'),
+ '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;