version 1.16, 2007/05/27 21:21:26
|
version 1.17, 2007/05/29 15:58:41
|
Line 746 sub print_quotas {
|
Line 746 sub print_quotas {
|
|
|
sub print_autoenroll { |
sub print_autoenroll { |
my ($dom,$settings) = @_; |
my ($dom,$settings) = @_; |
my $defdom = $dom; |
|
my $autorun = &Apache::lonnet::auto_run(undef,$dom), |
my $autorun = &Apache::lonnet::auto_run(undef,$dom), |
my ($runon,$runoff); |
my ($defdom,$runon,$runoff); |
if (ref($settings) eq 'HASH') { |
if (ref($settings) eq 'HASH') { |
if (exists($settings->{'run'})) { |
if (exists($settings->{'run'})) { |
if ($settings->{'run'} eq '0') { |
if ($settings->{'run'} eq '0') { |
Line 1577 sub modify_autoenroll {
|
Line 1576 sub modify_autoenroll {
|
my %title = ( run => 'Auto-enrollment active', |
my %title = ( run => 'Auto-enrollment active', |
sender => 'Sender for notification messages'); |
sender => 'Sender for notification messages'); |
my @offon = ('off','on'); |
my @offon = ('off','on'); |
|
my $sender_uname = $env{'form.sender_uname'}; |
|
my $sender_domain = $env{'form.sender_domain'}; |
|
if ($sender_domain eq '') { |
|
$sender_uname = ''; |
|
} elsif ($sender_uname eq '') { |
|
$sender_domain = ''; |
|
} |
my %autoenrollhash = ( |
my %autoenrollhash = ( |
autoenroll => { run => $env{'form.autoenroll_run'}, |
autoenroll => { run => $env{'form.autoenroll_run'}, |
sender_uname => $env{'form.sender_uname'}, |
sender_uname => $sender_uname, |
sender_domain => $env{'form.sender_domain'}, |
sender_domain => $sender_domain, |
|
|
} |
} |
); |
); |
Line 1596 sub modify_autoenroll {
|
Line 1602 sub modify_autoenroll {
|
$changes{'run'} = 1; |
$changes{'run'} = 1; |
} |
} |
} |
} |
if (exists($currautoenroll{sender_uname})) { |
if ($currautoenroll{'sender_uname'} ne $sender_uname) { |
if ($currautoenroll{'sender_uname'} ne $env{'form.sender_uname'}) { |
|
$changes{'sender'} = 1; |
|
} |
|
} else { |
|
$changes{'sender'} = 1; |
$changes{'sender'} = 1; |
} |
} |
if (exists($currautoenroll{sender_domain})) { |
if ($currautoenroll{'sender_domain'} ne $sender_domain) { |
if ($currautoenroll{'sender_domain'} ne $env{'form.sender_domain'}) { |
|
$changes{'sender'} = 1; |
|
} |
|
} else { |
|
$changes{'sender'} = 1; |
$changes{'sender'} = 1; |
} |
} |
if (keys(%changes) > 0) { |
if (keys(%changes) > 0) { |
Line 1616 sub modify_autoenroll {
|
Line 1614 sub modify_autoenroll {
|
$resulttext .= '<li>'.&mt("$title{'run'} set to $offon[$env{'form.autoenroll_run'}]").'</li>'; |
$resulttext .= '<li>'.&mt("$title{'run'} set to $offon[$env{'form.autoenroll_run'}]").'</li>'; |
} |
} |
if ($changes{'sender'}) { |
if ($changes{'sender'}) { |
$resulttext .= '<li>'.&mt("$title{'sender'} set to [_1]",$env{'form.sender_uname'}.':'.$env{'form.sender_domain'}).'</li>'; |
if ($sender_uname eq '' || $sender_domain eq '') { |
|
$resulttext .= '<li>'.&mt("$title{'sender'} set to default (course owner).").'</li>'; |
|
} else { |
|
$resulttext .= '<li>'.&mt("$title{'sender'} set to [_1]",$sender_uname.':'.$sender_domain).'</li>'; |
|
} |
} |
} |
$resulttext .= '</ul>'; |
$resulttext .= '</ul>'; |
} else { |
} else { |