--- loncom/interface/lonpdfupload.pm 2014/02/28 19:20:06 1.23 +++ loncom/interface/lonpdfupload.pm 2015/06/09 21:22:57 1.25 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # PDF Form Upload Handler # -# $Id: lonpdfupload.pm,v 1.23 2014/02/28 19:20:06 bisitz Exp $ +# $Id: lonpdfupload.pm,v 1.25 2015/06/09 21:22:57 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -122,6 +122,7 @@ sub handler() { sub get_javascripts() { my $message = &mt('Please choose a PDF-File.'); + &js_escape(\$message); # simple test if the upload ends with ".pdf" # it's only for giving a message to the user @@ -380,7 +381,7 @@ sub parse_grade_answer { 'DRAFT' => &mt('Copy saved but not submitted.'), ); - foreach my $key (keys %answerhash) { + foreach my $key (keys(%answerhash)) { if($shortcut eq $key) { return $answerhash{$shortcut}; } @@ -394,12 +395,12 @@ sub dumpenv { my $r = shift; $r->print ("
-------------------
"); - foreach my $key (sort (keys %env)) { + foreach my $key (sort(keys(%env))) { $r->print ("
$key -> $env{$key}"); } $r->print ("
-------------------
"); $r->print ("
-------------------
"); - foreach my $key (sort (keys %ENV)) { + foreach my $key (sort(keys(%ENV))) { $r->print ("
$key -> $ENV{$key}"); } $r->print ("
-------------------
");