--- loncom/lti/ltiauth.pm 2022/02/17 22:35:51 1.34 +++ loncom/lti/ltiauth.pm 2022/04/06 21:44:49 1.36 @@ -1,7 +1,7 @@ # The LearningOnline Network # Basic LTI Authentication Module # -# $Id: ltiauth.pm,v 1.34 2022/02/17 22:35:51 raeburn Exp $ +# $Id: ltiauth.pm,v 1.36 2022/04/06 21:44:49 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -30,6 +30,7 @@ package Apache::ltiauth; use strict; use LONCAPA qw(:DEFAULT :match); +use Encode; use Apache::Constants qw(:common :http); use Apache::lonlocal; use Apache::lonnet; @@ -63,7 +64,7 @@ sub handler { my $params = {}; foreach my $key (sort(keys(%env))) { if ($key =~ /^form\.(.+)$/) { - $params->{$1} = $env{$key}; + $params->{$1} = &Encode::decode('UTF-8',$env{$key}); } } # @@ -232,6 +233,7 @@ sub handler { } if ($lti_in_use{'notstudent'} eq 'reject') { &invalid_request($r,'Information for valid user missing from launch request'); + return OK; } } } @@ -1127,7 +1129,7 @@ sub invalid_request { '

'.&mt('Invalid LTI launch request').'

'. '

'. &mt('Launch of LON-CAPA is unavailable from the "external tool" link you had followed in another web application.'). - &mt('Launch failed for the following reason:'). + ' '.&mt('Launch failed for the following reason:'). '

'. '

'.$msg.'

'. &Apache::loncommon::end_page());