[prev in list] [next in list] [prev in thread] [next in thread]
List: lon-capa-cvs
Subject: [LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm /lonnet/perl lonnet.pm
From: raeburn via LON-CAPA-cvs <lon-capa-cvs () mail ! lon-capa ! org>
Date: 2022-06-08 1:42:20
Message-ID: cvsraeburn1654652540 () cvsserver
[Download RAW message or body]
raeburn Wed Jun 8 01:42:20 2022 EDT
Modified files:
/loncom/interface lonmenu.pm
/loncom/lonnet/perl lonnet.pm
Log:
- Domain's trust settings are checked when determining if course requests
are permitted in a domain belonging to another institution, in case they
changed since reqcrsotherdom.* was last updated in user's environment.db
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.521 loncom/interface/lonmenu.pm:1.522
--- loncom/interface/lonmenu.pm:1.521 Sun May 29 03:19:00 2022
+++ loncom/interface/lonmenu.pm Wed Jun 8 01:42:20 2022
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.521 2022/05/29 03:19:00 raeburn Exp $
+# $Id: lonmenu.pm,v 1.522 2022/06/08 01:42:20 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1949,8 +1949,17 @@
if (!$showreqcrs) {
foreach my $type (@reqtypes) {
if ($env{'environment.reqcrsotherdom.'.$type} ne '') {
- $showreqcrs = 1;
- last;
+ my @domains = split(',',$env{'environment.reqcrsotherdom.'.$type});
+ foreach my $entry (@domains) {
+ my ($extdom,$extopt) = split(':',$entry);
+ if \
(&Apache::lonnet::will_trust('reqcrs',$env{'user.domain'},$extdom)) { + \
$showreqcrs = 1; + last;
+ }
+ }
+ if ($showreqcrs) {
+ last;
+ }
}
}
}
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1485 loncom/lonnet/perl/lonnet.pm:1.1486
--- loncom/lonnet/perl/lonnet.pm:1.1485 Thu May 26 02:07:36 2022
+++ loncom/lonnet/perl/lonnet.pm Wed Jun 8 01:42:20 2022
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1485 2022/05/26 02:07:36 raeburn Exp $
+# $Id: lonnet.pm,v 1.1486 2022/06/08 01:42:20 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -8128,6 +8128,7 @@
my @options = ('approval','validate','autolimit');
my $optregex = join('|',@options);
if ((ref($can_request) eq 'HASH') && (ref($types) eq 'ARRAY')) {
+ my %willtrust;
foreach my $type (@{$types}) {
if (&usertools_access($uname,$udom,$type,undef,
'requestcourses')) {
@@ -8147,12 +8148,17 @@
if (ref($request_domains) eq 'HASH') {
my ($otherdom) = ($item =~ \
/^($match_domain):($optregex)(=?\d*)$/); if ($otherdom ne '') {
- if (ref($request_domains->{$type}) eq 'ARRAY') {
- unless \
(grep(/^\Q$otherdom\E$/,@{$request_domains->{$type}})) { + \
unless (exists($willtrust{$otherdom})) { + \
$willtrust{$otherdom} = &will_trust('reqcrs',$env{'user.domain'},$otherdom); + \
} + if ($willtrust{$otherdom}) {
+ if (ref($request_domains->{$type}) eq 'ARRAY') {
+ unless \
(grep(/^\Q$otherdom\E$/,@{$request_domains->{$type}})) { + \
push(@{$request_domains->{$type}},$otherdom); + \
} + } else {
\
push(@{$request_domains->{$type}},$otherdom); }
- } else {
- push(@{$request_domains->{$type}},$otherdom);
}
}
}
_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic