';
} elsif ($scantronurl) {
- my $link = &Apache::loncommon::modal_link($scantronurl,&mt('Custom bubblesheet format file'),600,500,
+ my $link = &Apache::loncommon::modal_link($scantronurl,&mt('Custom bubblesheet format file'),600,500,
undef,undef,undef,undef,'background-color:#ffffff');
$datatable .= '
'.
$link.
@@ -4422,7 +4422,7 @@ sub build_category_rows {
if (ref($cats->[$depth]{$parent}) eq 'ARRAY') {
my $numchildren = @{$cats->[$depth]{$parent}};
my $css_class = $itemcount%2?' class="LC_odd_row"':'';
- $text .= '
';
+ $text .= '
';
my ($idxnum,$parent_name,$parent_item);
my $higher = $depth - 1;
if ($higher == 0) {
@@ -4714,7 +4714,7 @@ sub usertype_update_row {
}
sub modify_login {
- my ($r,$dom,$confname,$lastactref,%domconfig) = @_;
+ my ($r,$dom,$confname,%domconfig) = @_;
my ($resulttext,$errors,$colchgtext,%changes,%colchanges,%newfile,%newurl,
%curr_loginvia,%loginhash,@currlangs,@newlangs,$addedfile,%title,@offon);
%title = ( coursecatalog => 'Display course catalog',
@@ -4894,7 +4894,7 @@ sub modify_login {
} else {
my $puberror = &mt("Upload of [_1] failed because an error occurred publishing the file in RES space. Error was: [_2].",$newfile{$lang},$result);
$errors .= '
'.$puberror.'
';
- if ((grep(/^\Q$lang\E$/,@currlangs)) &&
+ if ((grep(/^\Q$lang\E$/,@currlangs)) &&
(!grep(/^\Q$lang\E$/,@delurls))) {
$loginhash{'login'}{'helpurl'}{$lang} = $domconfig{'login'}{'helpurl'}{$lang};
@@ -4952,7 +4952,6 @@ sub modify_login {
}
if (keys(%changes) > 0 || $colchgtext) {
&Apache::loncommon::devalidate_domconfig_cache($dom);
- $$lastactref = 'update';
$resulttext = &mt('Changes made:').'
';
foreach my $item (sort(keys(%changes))) {
if ($item eq 'loginvia') {
@@ -5012,7 +5011,7 @@ sub modify_login {
}
} elsif ($item eq 'captcha') {
if (ref($loginhash{'login'}) eq 'HASH') {
- my $chgtxt;
+ my $chgtxt;
if ($loginhash{'login'}{$item} eq 'notused') {
$chgtxt .= &mt('No CAPTCHA validation in use for helpdesk form.');
} else {
@@ -5085,7 +5084,7 @@ sub color_font_choices {
}
sub modify_rolecolors {
- my ($r,$dom,$confname,$roles,$lastactref,%domconfig) = @_;
+ my ($r,$dom,$confname,$roles,%domconfig) = @_;
my ($resulttext,%rolehash);
$rolehash{'rolecolors'} = {};
if (ref($domconfig{'rolecolors'}) ne 'HASH') {
@@ -5100,7 +5099,6 @@ sub modify_rolecolors {
if ($putresult eq 'ok') {
if (keys(%changes) > 0) {
&Apache::loncommon::devalidate_domconfig_cache($dom);
- $$lastactref = 'update';
$resulttext = &display_colorchgs($dom,\%changes,$roles,
$rolehash{'rolecolors'});
} else {
@@ -5512,7 +5510,7 @@ sub publishlogo {
# See if there is anything left
unless ($fname) { return ('error: no uploaded file'); }
$fname="$subdir/$fname";
- my $docroot=$r->dir_config('lonDocRoot');
+ my $docroot=$r->dir_config('lonDocRoot');
my $filepath="$docroot/priv";
my $relpath = "$dom/$confname";
my ($fnamepath,$file,$fetchthumb);
@@ -5520,7 +5518,7 @@ sub publishlogo {
if ($fname=~m|/|) {
($fnamepath,$file) = ($fname =~ m|^(.*)/([^/]+)$|);
}
- my @parts=split(/\//,"$filepath/$relpath/$fnamepath");
+ my @parts=split(/\//,"$filepath/$relpath/$fnamepath");
my $count;
for ($count=5;$count<=$#parts;$count++) {
$filepath.="/$parts[$count]";
@@ -5786,7 +5784,7 @@ sub modify_quotas {
%limithash,$toolregexp,%conditions,$resulttext,%changes);
if ($action eq 'quotas') {
$context = 'tools';
- } else {
+ } else {
$context = $action;
}
if ($context eq 'requestcourses') {
@@ -6004,7 +6002,7 @@ sub modify_quotas {
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime);
$resulttext = &mt('Changes made:').'
'.
- &mt('E-mail record of completed LON-CAPA updates to [_1] set to "'.
- $offon[$env{'form.reportupdates'}].'".',
- &Apache::loncommon::modal_link('http://loncapa.org/core.html',
- &mt('LON-CAPA core group - MSU'),600,500)).
- '
';
- }
$resulttext .= '
';
} else {
$resulttext = &mt('No changes made to contact information');
@@ -7119,7 +7083,7 @@ sub modify_usercreation {
if ($captchas{$cancreate{$type}}) {
$chgtext .= &mt("Validation for self-creation screen set to $captchas{$cancreate{$type}}.");
} else {
- $chgtext .= &mt('Validation for self-creation screen set to unknown type.');
+ $chgtext .= &mt('Validation for self-creation screen set to unknown type.');
}
}
} elsif ($type eq 'recaptchakeys') {
@@ -7247,7 +7211,7 @@ sub process_captcha {
$newsettings->{'captcha'} = 'original';
}
if ($current->{'captcha'} ne $newsettings->{'captcha'}) {
- if ($container eq 'cancreate') {
+ if ($container eq 'cancreate') {
if (ref($changes->{'cancreate'}) eq 'ARRAY') {
push(@{$changes->{'cancreate'}},'captcha');
} elsif (!defined($changes->{'cancreate'})) {
@@ -7286,7 +7250,7 @@ sub process_captcha {
$changes->{'cancreate'} = ['recaptchakeys'];
}
} else {
- $changes->{'recaptchakeys'} = 1;
+ $changes->{'recaptchakeys'} = 1;
}
}
return;
@@ -7413,7 +7377,7 @@ sub modify_usermodification {
}
sub modify_defaults {
- my ($dom,$r,%domconfig) = @_;
+ my ($dom,$r) = @_;
my ($resulttext,$mailmsgtxt,%newvalues,%changes,@errors);
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom);
my @items = ('auth_def','auth_arg_def','lang_def','timezone_def','datelocale_def','portal_def');
@@ -7499,17 +7463,8 @@ sub modify_defaults {
my $cachetime = 24*60*60;
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime);
if ($changes{'auth_def'} || $changes{'auth_arg_def'} || $changes{'lang_def'} || $changes{'datelocale_def'}) {
- my $notify = 1;
- if (ref($domconfig{'contacts'}) eq 'HASH') {
- if ($domconfig{'contacts'}{'reportupdates'} == 0) {
- $notify = 0;
- }
- }
- if ($notify) {
- &Apache::lonmsg::sendemail('installrecord@loncapa.org',
- "LON-CAPA Domain Settings Change - $dom",
- $mailmsgtext);
- }
+ my $sysmail = $r->dir_config('lonSysEMail');
+ &Apache::lonmsg::sendemail($sysmail,"LON-CAPA Domain Settings Change - $dom",$mailmsgtext);
}
} else {
$resulttext = &mt('No changes made to default authentication/language/timezone settings');
@@ -7529,7 +7484,7 @@ sub modify_defaults {
}
sub modify_scantron {
- my ($r,$dom,$confname,$lastactref,%domconfig) = @_;
+ my ($r,$dom,$confname,%domconfig) = @_;
my ($resulttext,%confhash,%changes,$errors);
my $custom = 'custom.tab';
my $default = 'default.tab';
@@ -7590,7 +7545,6 @@ sub modify_scantron {
}
$resulttext .= '
';
&Apache::loncommon::devalidate_domconfig_cache($dom);
- $$lastactref = 'update';
} else {
$resulttext = &mt('No changes made to bubblesheet format file');
}
@@ -7980,8 +7934,8 @@ sub modify_helpsettings {
} elsif ($domconfig{'helpsettings'}{$item} ne $env{'form.'.$item}) {
$changes{$item} = 1;
}
- }
- if (($env{'form.'.$item} eq '0') || ($env{'form.'.$item} eq '1')) {
+ }
+ if (($env{'form.'.$item} eq '0') || ($env{'form.'.$item} eq '1')) {
$helphash{'helpsettings'}{$item} = $env{'form.'.$item};
}
}
@@ -8139,7 +8093,7 @@ sub modify_coursedefaults {
$resulttext .= '
'.&mt('Course/Community users can create/upload PDF forms set to "off"').'