version 1.189, 2017/08/11 18:58:16
|
version 1.191, 2017/11/04 16:13:31
|
Line 4174 sub upfile_drop_add {
|
Line 4174 sub upfile_drop_add {
|
my $domain; |
my $domain; |
if ($env{'form.defaultdomain'} ne '') { |
if ($env{'form.defaultdomain'} ne '') { |
if (($context eq 'course') || ($setting eq 'course')) { |
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'})) { |
if (&Apache::lonnet::will_trust('enroll',$crsdom,$env{'form.defaultdomain'})) { |
$domain = $env{'form.defaultdomain'}; |
$domain = $env{'form.defaultdomain'}; |
} else { |
} else { |
$r->print('<span class="LC_error">'.&mt('Error'). |
$r->print('<span class="LC_error">'.&mt('Error'). |
&mt('Enrollment of users not permitted for specified default domain: [_1].', |
&mt('Enrollment of users not permitted for specified default domain: [_1].', |
&Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>'); |
&Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>'); |
$r->print(&Apache::loncommon::end_page()); |
if ($env{'form.fullup'} ne 'yes') { |
|
$r->print('</form>'); |
|
} |
|
return; |
} |
} |
return; |
|
} |
} |
} elsif ($context eq 'author') { |
} 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'})) && |
if ((&Apache::lonnet::will_trust('othcoau',$defdom,$env{'form.defaultdomain'})) && |
(&Apache::lonnet::will_trust('coaurem',$env{'form.defaultdomain'},$defdom))) { |
(&Apache::lonnet::will_trust('coaurem',$env{'form.defaultdomain'},$defdom))) { |
$domain = $env{'form.defaultdomain'}; |
$domain = $env{'form.defaultdomain'}; |
Line 4194 sub upfile_drop_add {
|
Line 4200 sub upfile_drop_add {
|
$r->print('<span class="LC_error">'.&mt('Error'). |
$r->print('<span class="LC_error">'.&mt('Error'). |
&mt('Addition of users not permitted for specified default domain: [_1].', |
&mt('Addition of users not permitted for specified default domain: [_1].', |
&Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>'); |
&Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>'); |
$r->print(&Apache::loncommon::end_page()); |
if ($env{'form.fullup'} ne 'yes') { |
|
$r->print('</form>'); |
|
} |
|
return; |
} |
} |
return; |
|
} |
} |
} elsif (($context eq 'domain') && ($setting eq 'domain')) { |
} 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'})) { |
if (&Apache::lonnet::will_trust('domroles',$defdom,$env{'form.defaultdomain'})) { |
$domain = $env{'form.defaultdomain'}; |
$domain = $env{'form.defaultdomain'}; |
} else { |
} else { |
$r->print('<span class="LC_error">'.&mt('Error'). |
$r->print('<span class="LC_error">'.&mt('Error'). |
&mt('Addition of users not permitted for specified default domain: [_1].', |
&mt('Addition of users not permitted for specified default domain: [_1].', |
&Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>'); |
&Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>'); |
$r->print(&Apache::loncommon::end_page()); |
if ($env{'form.fullup'} ne 'yes') { |
|
$r->print('</form>'); |
|
} |
|
return; |
} |
} |
} |
} |
} |
} |
Line 4221 sub upfile_drop_add {
|
Line 4234 sub upfile_drop_add {
|
if (! exists($home_servers{$desiredhost})) { |
if (! exists($home_servers{$desiredhost})) { |
$r->print('<span class="LC_error">'.&mt('Error'). |
$r->print('<span class="LC_error">'.&mt('Error'). |
&mt('Invalid home server specified').'</span>'); |
&mt('Invalid home server specified').'</span>'); |
$r->print(&Apache::loncommon::end_page()); |
if ($env{'form.fullup'} ne 'yes') { |
|
$r->print('</form>'); |
|
} |
return; |
return; |
} |
} |
} |
} |