[LON-CAPA-cvs] cvs: loncom(version_2_11_4_msu) /interface londocs.pm
raeburn
raeburn at source.lon-capa.org
Fri Mar 14 23:08:02 EDT 2025
raeburn Sat Mar 15 03:08:02 2025 EDT
Modified files: (Branch: version_2_11_4_msu)
/loncom/interface londocs.pm
Log:
- For 2.11.4 (modified)
Include changes in 1.727
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.484.2.93.2.18 loncom/interface/londocs.pm:1.484.2.93.2.19
--- loncom/interface/londocs.pm:1.484.2.93.2.18 Fri Jan 17 14:10:05 2025
+++ loncom/interface/londocs.pm Sat Mar 15 03:08:02 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.484.2.93.2.18 2025/01/17 14:10:05 raeburn Exp $
+# $Id: londocs.pm,v 1.484.2.93.2.19 2025/03/15 03:08:02 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -716,7 +716,7 @@
my $marker = $2;
my $info = $3;
my ($toolid,$toolprefix,$tooltype,%toolhash,%toolsettings);
- my @extras = ('linktext','explanation','crslabel','crstitle','crsappend');
+ my @extras = ('linktext','explanation','crslabel','crstitle','crsappend','returnurl','backtourl');
my @toolinfo = split(/:/,$info);
if ($residx) {
%toolsettings=&Apache::lonnet::dump('exttool_'.$marker,$coursedom,$coursenum);
@@ -733,7 +733,8 @@
$toolid =~ s/\D//g;
($toolhash{'target'},$toolhash{'width'},$toolhash{'height'},
$toolhash{'linktext'},$toolhash{'explanation'},$toolhash{'crslabel'},
- $toolhash{'crstitle'},$toolhash{'crsappend'},$toolhash{'gradable'}) = @toolinfo;
+ $toolhash{'crstitle'},$toolhash{'crsappend'},$toolhash{'gradable'},
+ $toolhash{'returnurl'},$toolhash{'backtourl'}) = @toolinfo;
foreach my $item (@extras) {
$toolhash{$item} = &unescape($toolhash{$item});
}
@@ -820,6 +821,14 @@
}
}
}
+ if ($tools{'crsconf'}{'returnurl'}) {
+ unless ($toolhash{'returnurl'} eq 'custom') {
+ delete($toolhash{'backtourl'});
+ }
+ } else {
+ delete($toolhash{'returnurl'});
+ delete($toolhash{'backtourl'});
+ }
}
if ($toolhash{'passback'}) {
my $gradesecret = UUID::Tiny::create_uuid_as_string(UUID_V4);
@@ -848,6 +857,14 @@
}
}
}
+ if ($residx) {
+ if (($toolsettings{'backtourl'} ne '') && (!exists($toolhash{'backtourl'}))) {
+ push(@deleted,'backtourl');
+ }
+ if (($toolsettings{'returnurl'} ne '') && (!exists($toolhash{'returnurl'}))) {
+ push(@deleted,'returnurl');
+ }
+ }
my $putres = &Apache::lonnet::put('exttool_'.$marker,\%toolhash,$coursedom,$coursenum);
if ($putres eq 'ok') {
if (@deleted) {
More information about the LON-CAPA-cvs
mailing list