[LON-CAPA-cvs] cvs: doc /install/linux install.pl loncom/interface slotrequest.pm
raeburn
raeburn at source.lon-capa.org
Fri Nov 27 12:43:59 EST 2026
raeburn Fri Nov 27 17:43:59 2026 EDT
Modified files:
/loncom/interface slotrequest.pm
/doc/install/linux install.pl
Log:
- Update regexp used to check if memcached was started by LON-CAPA to
accommodate change in args passed to exec in lonmemcached rev. 1.8
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.125.2.10 loncom/interface/slotrequest.pm:1.125.2.10.2.1
--- loncom/interface/slotrequest.pm:1.125.2.10 Mon Jan 18 21:58:57 2021
+++ loncom/interface/slotrequest.pm Sat Jul 8 17:21:33 2023
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for requesting to have slots added to a students record
#
-# $Id: slotrequest.pm,v 1.125.2.10 2021/01/18 21:58:57 raeburn Exp $
+# $Id: slotrequest.pm,v 1.125.2.10.2.1 2023/07/08 17:21:33 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -56,7 +56,7 @@
}
sub start_page {
- my ($r,$title,$brcrum,$bread_crumbs_component,$js)=@_;
+ my ($r,$title,$brcrum,$bread_crumbs_component,$js,$mgr)=@_;
my $args;
if (ref($brcrum) eq 'ARRAY') {
$args = {bread_crumbs => $brcrum};
@@ -74,6 +74,31 @@
$args = { 'add_entries' => \%loaditems };
}
}
+ unless (($env{'form.context'} eq 'usermanage') || (($mgr eq 'F') &&
+ (($env{'form.command'} eq 'release') ||
+ ($env{'form.command'} eq 'remove_registration')))) {
+ if ($env{'form.symb'}) {
+ my $symb=&unescape($env{'form.symb'});
+ my ($mapurl,$id,$resurl) = &Apache::lonnet::decode_symb($symb);
+ if ($resurl =~ /ext\.tool$/) {
+ my $target;
+ my ($marker,$exttool) = (split(m{/},$resurl))[3,4];
+ $marker=~s/\D//g;
+ if (($marker) && ($exttool) && ($env{'request.course.id'})) {
+ my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
+ my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
+ my ($idx,$crstool,$is_tool,%toolhash,%toolsettings);
+ if ($resurl eq "adm/$cdom/$cnum/$marker/$exttool") {
+ my %toolsettings=&Apache::lonnet::dump('exttool_'.$marker,$cdom,$cnum);
+ $target = $toolsettings{'target'};
+ }
+ }
+ if ($target eq 'iframe') {
+ $args->{'only_body'} = 1;
+ }
+ }
+ }
+ }
$r->print(&Apache::loncommon::start_page($title,$js,$args));
}
@@ -371,7 +396,7 @@
return 'error: Unable to determine current status';
}
my @problems = $navmap->retrieveResources(undef,
- sub { $_[0]->is_problem() },1,0);
+ sub { $_[0]->is_problem() || $_[0]->is_tool() },1,0);
my %used_slots;
foreach my $problem (@problems) {
my $symb = $problem->symb();
@@ -869,7 +894,7 @@
if ($passed_resource->is_map()) {
my ($a_resource) =
$navmap->retrieveResources($passed_resource,
- sub {$_[0]->is_problem()},0,1);
+ sub {$_[0]->is_problem() || $_[0]->is_tool() },0,1);
$parm_symb = $a_resource->symb();
}
} else {
@@ -965,7 +990,7 @@
if ($passed_resource->is_map()) {
my ($a_resource) =
$navmap->retrieveResources($passed_resource,
- sub {$_[0]->is_problem()},0,1);
+ sub {$_[0]->is_problem() || $_[0]->is_tool() },0,1);
$symb_for_parm = $a_resource->symb();
}
# get parameter string, check for existence, rebuild string with the slot
@@ -1041,15 +1066,32 @@
sub return_link {
my ($r) = @_;
+ my $target = &return_target();
if (($env{'form.command'} eq 'manageresv') || ($env{'form.context'} eq 'usermanage')) {
- $r->print('<p><a href="/adm/slotrequest?command=manageresv">'.
+ $r->print('<p><a href="/adm/slotrequest?command=manageresv" target="'.$target.'">'.
&mt('Return to reservations'));
} else {
- $r->print('<p><a href="/adm/flip?postdata=return:">'.
+ $r->print('<p><a href="/adm/flip?postdata=return:" target="'.$target.'">'.
&mt('Return to last resource').'</a></p>');
}
}
+sub return_target {
+ my ($target,$ltitarget,$deeplinktarget);
+ if ($env{'request.lti.login'}) {
+ $ltitarget = $env{'request.lti.target'};
+ }
+ if ($env{'request.deeplink.login'}) {
+ $deeplinktarget = $env{'request.deeplink.target'};
+ }
+ if (($ltitarget eq 'iframe') || ($deeplinktarget eq '_self')) {
+ $target = '_self';
+ } else {
+ $target = '_top';
+ }
+ return $target;
+}
+
sub get_slot {
my ($r,$symb,$conflictable_slot,$inhibit_return_link)=@_;
@@ -1287,7 +1329,8 @@
if (!@{$available}) {
$output = '<span class="LC_info">'.&mt('No available times.').'</span>';
if ($env{'form.command'} ne 'manageresv') {
- $output .= ' <a href="/adm/flip?postdata=return:">'.
+ my $target = &return_target();
+ $output .= ' <a href="/adm/flip?postdata=return:" target="'.$target.'">'.
&mt('Return to last resource').'</a>';
}
$r->print($output);
@@ -2028,15 +2071,15 @@
my $symb = $resource->symb();
my $ressymb = $symb;
$contents{$lastcontainer} ++;
- next if (!$resource->is_problem() && !$resource->is_sequence() &&
- !$resource->is_page());
+ next if (!$resource->is_problem() && && !$resource->is_tool() &&
+ !$resource->is_sequence() && !$resource->is_page());
$count ++;
if (($resource->is_sequence()) || ($resource->is_page())) {
$lastcontainer = $count;
$container{$lastcontainer} = $resource;
$container_title{$lastcontainer} = $resource->compTitle();
}
- if ($resource->is_problem()) {
+ if ($resource->is_problem() || $resource->is_tool()) {
my ($useslots) = $resource->slot_control();
next if (($useslots eq '') || ($useslots =~ /^\s*no\s*$/i));
my ($msg,$get_choices,$slotdescription);
@@ -3224,7 +3267,7 @@
if (($env{'form.requestattempt'}) || ($env{'form.command'} eq 'manageresv')) {
$js = &reservation_js(\%slots,$consumed_uniqueperiods,$available,$got_slots,$symb);
}
- &start_page($r,$title,$brcrum,$bread_crumbs_component,$js);
+ &start_page($r,$title,$brcrum,$bread_crumbs_component,$js,$mgr);
if ($env{'form.command'} eq 'manageresv') {
$allavailable = $available;
Index: doc/install/linux/install.pl
diff -u doc/install/linux/install.pl:1.104 doc/install/linux/install.pl:1.105
--- doc/install/linux/install.pl:1.104 Sun Sep 13 20:21:25 2026
+++ doc/install/linux/install.pl Fri Nov 27 17:43:59 2026
@@ -78,7 +78,7 @@
&mt('Stopping execution.')."\n";
exit;
} else {
- print LOG '$Id: install.pl,v 1.104 2026/09/13 20:21:25 raeburn Exp $'."\n";
+ print LOG '$Id: install.pl,v 1.105 2026/11/27 17:43:59 raeburn Exp $'."\n";
}
#
@@ -1592,7 +1592,7 @@
if ($distro =~ /^(suse|sles)/) {
$cmd = '/usr/sbin/memcached';
}
- unless ($daemonrunning =~ m{^www[^/]+\Q$cmd -m 400 -v\E$}) {
+ unless ($daemonrunning =~ m{^www[^/]+\Q$cmd -m 400 -l 127.0.0.1 -p 11211 -U 0 -v\E$}) {
$stopsrvcs{$service} = 1;
}
} else {
More information about the LON-CAPA-cvs
mailing list