--- loncom/lti/ltiauth.pm 2022/02/08 15:08:53 1.33 +++ loncom/lti/ltiauth.pm 2022/02/17 22:35:51 1.34 @@ -1,7 +1,7 @@ # The LearningOnline Network # Basic LTI Authentication Module # -# $Id: ltiauth.pm,v 1.33 2022/02/08 15:08:53 raeburn Exp $ +# $Id: ltiauth.pm,v 1.34 2022/02/17 22:35:51 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -143,9 +143,9 @@ sub handler { # my ($itemid,$ltitype,%crslti,%lti_in_use); - $itemid = &get_lti_itemid($requri,$hostname,$params,$cdom,$cnum,'deeplink'); + $itemid = &get_lti_itemid($requri,$hostname,$params,$cdom,$cnum,'linkprot'); if ($itemid) { - %crslti = &Apache::lonnet::get_course_lti($cnum,$cdom,'provider'); + %crslti = &Apache::lonnet::get_course_lti($cnum,$cdom); } if (($itemid) && (ref($crslti{$itemid}) eq 'HASH')) { $ltitype = 'c'; @@ -157,10 +157,10 @@ sub handler { return OK; } } else { - $itemid = &get_lti_itemid($requri,$hostname,$params,$cdom,'','deeplink'); + $itemid = &get_lti_itemid($requri,$hostname,$params,$cdom,'','linkprot'); my %lti; if ($itemid) { - %lti = &Apache::lonnet::get_domain_lti($cdom,'provider'); + %lti = &Apache::lonnet::get_domain_lti($cdom,'linkprot'); } if (($itemid) && (ref($lti{$itemid}) eq 'HASH')) { $ltitype = 'd'; @@ -185,7 +185,7 @@ sub handler { } if ($ltiauth) { my $possuname; - my $mapuser = $crslti{$itemid}{'mapuser'}; + my $mapuser = $lti_in_use{'mapuser'}; if ($mapuser eq 'sourcedid') { if ($params->{'lis_person_sourcedid'} =~ /^$match_username$/) { $possuname = $params->{'lis_person_sourcedid'}; @@ -1054,9 +1054,9 @@ sub linkprot_session { my ($r,$uname,$cnum,$cdom,$uhome,$itemid,$ltitype,$dest,$lonhost) = @_; $r->user($uname); if ($ltitype eq 'c') { - &Apache::lonnet::logthis("Link Protector: $itemid (c) authorized student: $uname:$cdom, course: $cdom\_$cnum"); + &Apache::lonnet::logthis("Course Link Protector ($itemid) authorized student: $uname:$cdom, course: $cdom\_$cnum"); } elsif ($ltitype eq 'd') { - &Apache::lonnet::logthis("Link Protector: $itemid (d) authorized student: $uname:$cdom, course: $cdom\_$cnum"); + &Apache::lonnet::logthis("Domain LTI for link protection ($itemid) authorized student: $uname:$cdom, course: $cdom\_$cnum"); } my ($is_balancer,$otherserver,$hosthere) = &check_balancer($r,$uname,$cdom); if (($is_balancer) && (!$hosthere)) {