--- loncom/lti/ltiutils.pm 2017/12/30 14:04:00 1.3 +++ loncom/lti/ltiutils.pm 2018/01/04 12:19:25 1.5 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA LTI interactions # -# $Id: ltiutils.pm,v 1.3 2017/12/30 14:04:00 raeburn Exp $ +# $Id: ltiutils.pm,v 1.5 2018/01/04 12:19:25 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -51,7 +51,7 @@ use LONCAPA qw(:DEFAULT :match); # # When LON-CAPA is operating as a Provider, nonce checking # occurs when a user in course context in another LMS (the -# Consumer launches an external tool to access a LON-CAPA URL: +# Consumer) launches an external tool to access a LON-CAPA URL: # /adm/lti/ with LON-CAPA symb, map, or deep-link ID appended. # @@ -286,7 +286,7 @@ sub verify_lis_item { my $expected_sig; if ($context eq 'grade') { my $uniqid = $digsymb.':::'.$diguser.':::'.$cdom.'_'.$cnum; - $expected_sig = &get_service_id($secret,$uniqid); + $expected_sig = (split(/:::/,&get_service_id($secret,$uniqid)))[0]; if ($expected_sig eq $sigrec) { return 1; } else { @@ -294,7 +294,7 @@ sub verify_lis_item { } } elsif ($context eq 'roster') { my $uniqid = $digsymb.':::'.$cdom.'_'.$cnum; - $expected_sig = &get_service_id($secret,$uniqid); + $expected_sig = (split(/:::/,&get_service_id($secret,$uniqid)))[0]; if ($expected_sig eq $sigrec) { return 1; } else { @@ -314,7 +314,7 @@ sub verify_lis_item { # LON-CAPA as LTI Consumer # # Sign a request used to launch an instance of an external -# too in a LON-CAPA course, using the key and secret supplied +# tool in a LON-CAPA course, using the key and secret supplied # by the Tool Provider. #