[LON-CAPA-cvs] cvs: loncom /interface lonuserutils.pm
raeburn
raeburn at source.lon-capa.org
Fri Aug 11 16:14:45 EDT 2017
raeburn Fri Aug 11 20:14:45 2017 EDT
Modified files:
/loncom/interface lonuserutils.pm
Log:
- Trust settings
Modify some changes in rev. 1.185
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.189 loncom/interface/lonuserutils.pm:1.190
--- loncom/interface/lonuserutils.pm:1.189 Fri Aug 11 18:58:16 2017
+++ loncom/interface/lonuserutils.pm Fri Aug 11 20:14:44 2017
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.189 2017/08/11 18:58:16 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.190 2017/08/11 20:14:44 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4174,7 +4174,9 @@
my $domain;
if ($env{'form.defaultdomain'} ne '') {
if (($context eq 'course') || ($setting eq 'course')) {
- unless ($env{'form.defaultdomain'} eq $crsdom) {
+ if ($env{'form.defaultdomain'} eq $crsdom) {
+ $domain = $env{'form.defaultdomain'};
+ } else {
if (&Apache::lonnet::will_trust('enroll',$crsdom,$env{'form.defaultdomain'})) {
$domain = $env{'form.defaultdomain'};
} else {
@@ -4182,11 +4184,13 @@
&mt('Enrollment of users not permitted for specified default domain: [_1].',
&Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>');
$r->print(&Apache::loncommon::end_page());
+ return;
}
- return;
}
} elsif ($context eq 'author') {
- unless ($env{'form.defaultdomain'} eq $defdom) {
+ if ($env{'form.defaultdomain'} eq $defdom) {
+ $domain = $env{'form.defaultdomain'};
+ } else {
if ((&Apache::lonnet::will_trust('othcoau',$defdom,$env{'form.defaultdomain'})) &&
(&Apache::lonnet::will_trust('coaurem',$env{'form.defaultdomain'},$defdom))) {
$domain = $env{'form.defaultdomain'};
@@ -4195,11 +4199,13 @@
&mt('Addition of users not permitted for specified default domain: [_1].',
&Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>');
$r->print(&Apache::loncommon::end_page());
+ return;
}
- return;
}
} elsif (($context eq 'domain') && ($setting eq 'domain')) {
- unless ($env{'form.defaultdomain'} eq $defdom) {
+ if ($env{'form.defaultdomain'} eq $defdom) {
+ $domain = $env{'form.defaultdomain'};
+ } else {
if (&Apache::lonnet::will_trust('domroles',$defdom,$env{'form.defaultdomain'})) {
$domain = $env{'form.defaultdomain'};
} else {
@@ -4207,6 +4213,7 @@
&mt('Addition of users not permitted for specified default domain: [_1].',
&Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>');
$r->print(&Apache::loncommon::end_page());
+ return;
}
}
}
More information about the LON-CAPA-cvs
mailing list