[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm
raeburn
raeburn at source.lon-capa.org
Sat Jun 3 15:26:31 EDT 2023
raeburn Sat Jun 3 19:26:31 2023 EDT
Modified files:
/loncom/interface domainprefs.pm
Log:
- Remove duplicate check_switchserver() subroutine added in rev. 1.405.
- Remove declaration of unused hash -- %current -- added in rev 1.325.
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.425 loncom/interface/domainprefs.pm:1.426
--- loncom/interface/domainprefs.pm:1.425 Sat Jun 3 19:18:11 2023
+++ loncom/interface/domainprefs.pm Sat Jun 3 19:26:31 2023
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.425 2023/06/03 19:18:11 raeburn Exp $
+# $Id: domainprefs.pm,v 1.426 2023/06/03 19:26:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -6782,22 +6782,6 @@
);
}
-sub check_switchserver {
- my ($home) = @_;
- my $switchserver;
- if ($home ne '') {
- my $allowed;
- my @ids=&Apache::lonnet::current_machine_ids();
- foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } }
- if (!$allowed) {
- $switchserver='<a href="/adm/switchserver?otherserver='.$home.'&role='.
- &HTML::Entities::encode($env{'request.role'},'\'<>"&').
- '&destinationurl=/adm/domainprefs">'.&mt('Switch Server').'</a>';
- }
- }
- return $switchserver;
-}
-
sub print_coursedefaults {
my ($position,$dom,$settings,$rowtotal) = @_;
my ($css_class,$datatable,%checkedon,%checkedoff,%defaultchecked, at toggles);
@@ -11715,7 +11699,6 @@
'<td class="LC_left_item" colspan="2"><table>';
my $rem;
my %checks;
- my %current;
if (ref($settings) eq 'HASH') {
my $hashref;
if ($context eq 'lti') {
@@ -13492,7 +13475,9 @@
my @ids=&Apache::lonnet::current_machine_ids();
foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } }
if (!$allowed) {
- $switchserver='<a href="/adm/switchserver?otherserver='.$home.'&role=dc./'.$dom.'/&destinationurl=/adm/domainprefs">'.&mt('Switch Server').'</a>';
+ $switchserver='<a href="/adm/switchserver?otherserver='.$home.'&role='.
+ &HTML::Entities::encode($env{'request.role'},'\'<>"&').
+ '&destinationurl=/adm/domainprefs">'.&mt('Switch Server').'</a>';
}
return $switchserver;
}
More information about the LON-CAPA-cvs
mailing list