--- loncom/interface/lonexttool.pm 2025/06/14 18:51:58 1.22.2.7 +++ loncom/interface/lonexttool.pm 2025/06/06 20:36:58 1.28 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Launch External Tool Provider (LTI) # -# $Id: lonexttool.pm,v 1.22.2.7 2025/06/14 18:51:58 raeburn Exp $ +# $Id: lonexttool.pm,v 1.28 2025/06/06 20:36:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -96,7 +96,7 @@ sub handler { my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; my $chome = $env{'course.'.$env{'request.course.id'}.'.home'}; - my ($idx,$crstool,$is_tool,%toolhash,%toolsettings,$desturl,$delay); + my ($idx,$crstool,$is_tool,%toolhash,%toolsettings); if ($r->uri eq "/adm/$cdom/$cnum/$marker/$exttool") { %toolsettings=&Apache::lonnet::dump('exttool_'.$marker,$cdom,$cnum); @@ -131,30 +131,11 @@ sub handler { } } unless ($gotreturnurl) { - $toolhash{'returnurl'} = 'default'; + $toolhash{'returnurl'} = 'default'; } } else { $toolhash{'returnurl'} = 'none'; } - if ($toolhash{'desturl'}) { - if ((ref($toolhash{'crsconf'}) eq 'HASH')) { - if ($toolhash{'crsconf'}{'desturl'}) { - if ((exists($toolsettings{'desturl'})) && - ($toolsettings{'desturl'} =~ m{^(https?\://|/)})) { - $desturl = $toolsettings{'desturl'}; - if ((exists($toolsettings{'delay'})) && - ($toolsettings{'delay'} =~ /^\d+\.?\d*$/)) { - $delay = $toolsettings{'delay'}; - } - } - } elsif ($toolhash{'defdest'} =~ m{^(https?\://|/)}) { - $desturl = $toolhash{'defdest'}; - if ($toolhash{'defdelay'} =~ /^\d+\.?\d*$/) { - $delay = $toolhash{'defdelay'}; - } - } - } - } $is_tool = 1; } } @@ -252,31 +233,11 @@ sub handler { if ($toolhash{'crsappend'} ne '') { $url .= $toolhash{'crsappend'}; } - if ($desturl ne '') { - my ($scheme,$provider,$path); - if ($url =~ m{^https?\://}) { - ($scheme,$provider,$path) = ($url =~ m{^(https?\://)([^/]+)(|/.+)$}); - if ($desturl =~ m{^/}) { - if ($path eq $desturl) { - undef($desturl); - } else { - $desturl = $scheme.$provider.$desturl; - } - } elsif ($desturl =~ m{^https?\://}) { - if ($url eq $desturl) { - undef($desturl); - } - } - } elsif ($url eq $desturl) { - undef($desturl); - } - } my %info = ( method => $toolhash{'sigmethod'}, ); $r->print(&launch_html($cdom,$cnum,$crstool,$url,$idx, - $toolhash{'cipher'},$submittext, - \%lti,\%info,$desturl,$delay)); + $toolhash{'cipher'},$submittext,\%lti,\%info)); } else { $r->print('