--- loncom/interface/domainprefs.pm 2010/03/22 17:23:34 1.133
+++ loncom/interface/domainprefs.pm 2010/04/14 04:27:20 1.134
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.133 2010/03/22 17:23:34 raeburn Exp $
+# $Id: domainprefs.pm,v 1.134 2010/04/14 04:27:20 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -988,7 +988,7 @@ sub display_color_options {
my ($dom,$confname,$phase,$role,$itemcount,$choices,$is_custom,$defaults,$designs,
$images,$bgs,$links,$alt_text,$rowtotal,$logintext,$loginheader) = @_;
my $css_class = $itemcount%2?' class="LC_odd_row"':'';
- my $datatable = '
'.
+ my $datatable = '
'.
''.$choices->{'font'}.' | ';
if (!$is_custom->{'font'}) {
$datatable .= ''.&mt('Default in use:').' '.$defaults->{'font'}.' | ';
@@ -2014,12 +2014,13 @@ sub print_contacts {
my ($dom,$settings,$rowtotal) = @_;
my $datatable;
my @contacts = ('adminemail','supportemail');
- my (%checked,%to,%otheremails);
+ my (%checked,%to,%otheremails,%bccemails);
my @mailings = ('errormail','packagesmail','lonstatusmail','helpdeskmail',
'requestsmail');
foreach my $type (@mailings) {
$otheremails{$type} = '';
}
+ $bccemails{'helpdeskmail'} = '';
if (ref($settings) eq 'HASH') {
foreach my $item (@contacts) {
if (exists($settings->{$item})) {
@@ -2035,6 +2036,9 @@ sub print_contacts {
}
}
$otheremails{$type} = $settings->{$type}{'others'};
+ if ($type eq 'helpdeskmail') {
+ $bccemails{$type} = $settings->{$type}{'bcc'};
+ }
}
} elsif ($type eq 'lonstatusmail') {
$checked{'lonstatusmail'}{'adminemail'} = ' checked="checked" ';
@@ -2078,8 +2082,13 @@ sub print_contacts {
}
$datatable .= '
'.&mt('Others').': '.
''.
- '
'."\n";
+ 'value="'.$otheremails{$type}.'" />';
+ if ($type eq 'helpdeskmail') {
+ $datatable .= '
'.&mt('Bcc').':'.(' 'x6).
+ '';
+ }
+ $datatable .= ''."\n";
}
$$rowtotal += $rownum;
return $datatable;
@@ -5186,7 +5195,7 @@ sub modify_contacts {
$currsetting{$key} = $domconfig{'contacts'}{$key};
}
}
- my (%others,%to);
+ my (%others,%to,%bcc);
my @contacts = ('supportemail','adminemail');
my @mailings = ('errormail','packagesmail','helpdeskmail','lonstatusmail',
'requestsmail');
@@ -5202,6 +5211,10 @@ sub modify_contacts {
}
$others{$type} = $env{'form.'.$type.'_others'};
$contacts_hash{contacts}{$type}{'others'} = $others{$type};
+ if ($type eq 'helpdeskmail') {
+ $bcc{$type} = $env{'form.'.$type.'_bcc'};
+ $contacts_hash{contacts}{$type}{'bcc'} = $bcc{$type};
+ }
}
foreach my $item (@contacts) {
$to{$item} = $env{'form.'.$item};
@@ -5226,6 +5239,11 @@ sub modify_contacts {
if ($others{$type} ne $currsetting{$type}{'others'}) {
push(@{$changes{$type}},'others');
}
+ if ($type eq 'helpdeskmail') {
+ if ($bcc{$type} ne $currsetting{$type}{'bcc'}) {
+ push(@{$changes{$type}},'bcc');
+ }
+ }
}
} else {
my %default;
@@ -5248,7 +5266,12 @@ sub modify_contacts {
}
if ($others{$type} ne '') {
push(@{$changes{$type}},'others');
- }
+ }
+ if ($type eq 'helpdeskmail') {
+ if ($bcc{$type} ne '') {
+ push(@{$changes{$type}},'bcc');
+ }
+ }
}
}
my $putresult = &Apache::lonnet::put_dom('configuration',\%contacts_hash,
@@ -5276,7 +5299,13 @@ sub modify_contacts {
push(@text,$others{$type});
}
$resulttext .= ''.
- join(', ',@text).'';
+ join(', ',@text).'';
+ if ($type eq 'helpdeskmail') {
+ if ($bcc{$type} ne '') {
+ $resulttext .= ' '.&mt('with Bcc to').': '.$bcc{$type}.'';
+ }
+ }
+ $resulttext .= '';
}
}
$resulttext .= '';