--- loncom/lti/ltiutils.pm 2018/04/14 17:52:48 1.7 +++ loncom/lti/ltiutils.pm 2018/04/17 14:03:01 1.8 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA LTI interactions # -# $Id: ltiutils.pm,v 1.7 2018/04/14 17:52:48 raeburn Exp $ +# $Id: ltiutils.pm,v 1.8 2018/04/17 14:03:01 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -479,6 +479,21 @@ sub lti_provider_scope { my $rest = $1; if ($rest eq '') { $scope = 'map'; + $realuri = $tail; + } else { + my ($map,$resid,$url) = &Apache::lonnet::decode_symb($tail); + $realuri = &Apache::lonnet::clutter($url); + if ($url =~ /\.sequence$/) { + $scope = 'map'; + } else { + $scope = 'resource'; + $realuri .= '?symb='.$tail; + } + } + } elsif ($tail =~ m{^/res/$match_domain/$match_username/.+\.(?:sequence|page)(|___\d+___.+)$}) { + my $rest = $1; + if ($rest eq '') { + $scope = 'map'; $realuri = $tail; } else { my ($map,$resid,$url) = &Apache::lonnet::decode_symb($tail);