[LON-CAPA-cvs] cvs: loncom /interface lonexttool.pm /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Fri Jun 6 16:36:58 EDT 2025
raeburn Fri Jun 6 20:36:58 2025 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
/loncom/interface lonexttool.pm
Log:
- When encrypturl is in effect extra effort may be needed to get the symb.
Also try to avoid sending an empty string in the signed LTI launch payload
for resource_link_title and resource_link_id, because for some reason, the
ProctorU LTI 1.1 Provider requires something other than no value for them.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1538 loncom/lonnet/perl/lonnet.pm:1.1539
--- loncom/lonnet/perl/lonnet.pm:1.1538 Wed Apr 2 23:44:03 2025
+++ loncom/lonnet/perl/lonnet.pm Fri Jun 6 20:36:56 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1538 2025/04/02 23:44:03 raeburn Exp $
+# $Id: lonnet.pm,v 1.1539 2025/06/06 20:36:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -15171,7 +15171,7 @@
}
sub whichuser {
- my ($passedsymb)=@_;
+ my ($passedsymb,$ignorecachednull)=@_;
my ($symb,$courseid,$domain,$name,$publicuser);
if (defined($env{'form.grade_symb'})) {
my ($tmp_courseid)=&get_env_multiple('form.grade_courseid');
@@ -15194,7 +15194,7 @@
}
}
if (!$passedsymb) {
- $symb=&symbread();
+ $symb=&symbread('','',$ignorecachednull);
} else {
$symb=$passedsymb;
}
Index: loncom/interface/lonexttool.pm
diff -u loncom/interface/lonexttool.pm:1.27 loncom/interface/lonexttool.pm:1.28
--- loncom/interface/lonexttool.pm:1.27 Sat Mar 15 17:28:14 2025
+++ loncom/interface/lonexttool.pm Fri Jun 6 20:36:58 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Launch External Tool Provider (LTI)
#
-# $Id: lonexttool.pm,v 1.27 2025/03/15 17:28:14 raeburn Exp $
+# $Id: lonexttool.pm,v 1.28 2025/06/06 20:36:58 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -322,8 +322,9 @@
if (scalar(@userlangs) == 1) {
$locale = $userlangs[0];
}
- my ($title,$digest_symb,$digest_suppurl,$resource_link_id);
- my ($symb) = &Apache::lonnet::whichuser();
+ my ($title,$digest_symb,$resource_link_id);
+ my $ignorecachednull = 1;
+ my ($symb) = &Apache::lonnet::whichuser('',$ignorecachednull);
my $uri = "/adm/$cdom/$cnum/$marker/$exttool";
if ($symb) {
$digest_symb = &Encode::decode('UTF-8',$symb);
@@ -338,9 +339,15 @@
}
}
} elsif ($env{'httpref.'.$uri} eq '/adm/coursedoc') {
- $digest_suppurl = &Encode::decode('UTF-8',$uri);
+ my $digest_suppurl = &Encode::decode('UTF-8',$uri);
$digest_suppurl = &Digest::SHA::sha1_hex($digest_suppurl);
$resource_link_id = $digest_suppurl;
+ $title = &mt('Supplemental Content').': '.$marker.'_'.$exttool;
+ } else {
+ my $digest_url = &Encode::decode('UTF-8',$uri);
+ $digest_url = &Digest::SHA::sha1_hex($digest_url);
+ $resource_link_id = $digest_url;
+ $title = &mt('External Tool').': '.$marker.'_'.$exttool;
}
my $domdesc = &Apache::lonnet::domain($cdom);
my $primary_id = &Apache::lonnet::domain($cdom,'primary');
More information about the LON-CAPA-cvs
mailing list