'.
+ &Apache::loncommon::end_page());
return;
}
}
@@ -762,6 +799,8 @@ sub print_request_receipt {
secn => 'Section',
warn => 'Warning: Problem with support e-mail address',
your => 'Your support request contained the following information',
+ belo => 'Below is your support request which could not be sent',
+ ifyk => 'If you know an IT support address for your institution, you could copy this information and send it to that email address.',
sect => 'section',
info => 'Information supplied',
adin => 'Additional information recorded',
@@ -939,18 +978,19 @@ $lt{'date'}: $reporttime
$displaymsg .= ''.
$lt{'date'}.': '.$reporttime.' '."\n";
-
- my $start_page =
- &Apache::loncommon::start_page('Support request recorded',undef,
- {'function' => $function,
- 'add_entries' => {
- topmargin => "0",
- marginheight => "0",
- },
- 'only_body' => 1,});
-
+ my $args = {'function' => $function,
+ 'add_entries' => {
+ topmargin => "0",
+ marginheight => "0",
+ },
+ 'only_body' => 1,};
+ (undef,undef,undef,my $clientmathml,my $clientunicode) =
+ &Apache::loncommon::decode_user_agent();
+ if ($clientunicode && !$clientmathml) {
+ $args->{'browser.unicode'} = 1;
+ }
+ $r->print(&Apache::loncommon::start_page('Support request recorded',undef,$args));
$r->print(<<"END");
-$start_page
@@ -990,17 +1030,19 @@ END
my $message;
if (!$bad_email) {
- $message = &Apache::lonhtmlcommon::confirm_success(
- &mt('A support request has been sent to [_1]',''.$to.''));
+ $message = &mt('A support request has been sent to [_1]',''.$to.'');
} else {
- $message = &Apache::lonhtmlcommon::confirm_success(
- $lt{'warn'}.' '
- .&mt('As the e-mail address provided for this LON-CAPA server ([_1]) does not appear to be a valid e-mail address, your support request has [_2]not[_3] been sent to the LON-CAPA support staff or administrator at your institution.',''.$to.'','','')
- .' '.&mt('Instead a copy has been sent to the LON-CAPA support team at Michigan State University.'),1);
- $to = 'helpdesk@lon-capa.org';
+ $message = $lt{'warn'}.' ';
+ if ($to eq '') {
+ $message .= &mt('For this LON-CAPA server no e-mail address has been configured to receive support requests, so your support request has [_1]not[_2] been sent to the LON-CAPA support staff or administrator at your institution.','','');
+ } else {
+ $message .= &mt('As the e-mail address provided for this LON-CAPA server ([_1]) does not appear to be a valid e-mail address, your support request has [_2]not[_3] been sent to the LON-CAPA support staff or administrator at your institution.',''.$to.'','','');
+ }
+ }
+ $r->print('
');
+ if ($bad_email) {
+ $r->print(&Apache::loncommon::confirmwrapper(&Apache::lonhtmlcommon::confirm_success($message,$bad_email)).' ');
}
- $r->print(&Apache::loncommon::confirmwrapper($message));
-
if ($reqemail ne '') {
$from = $reqemail;
}
@@ -1126,14 +1168,18 @@ END
}
}
- # Compose and send a MIME email
- &Apache::loncommon::mime_email($from,'',$to,$subject,$supportmsg,$cc_string,
- $bcc,$attachmentpath,$fname,$attachment_text);
-
+ if ($bad_email) {
+ $r->print(''.$lt{'belo'}.' '.
+ $lt{'ifyk'}."\n");
+ } else {
+ # Compose and send a MIME email
+ &Apache::loncommon::mime_email($from,'',$to,$subject,$supportmsg,$cc_string,
+ $bcc,$attachmentpath,$fname,$attachment_text);
+ $r->print(''.$lt{'your'}.':'."\n");
+ }
if ($attachmentpath =~ m|$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+|) {
unlink($attachmentpath);
}
- $r->print(''.$lt{'your'}.':
|;
$reviewtext = &mt('Please review the information in "Log-in help" and the "Getting started" guide if you are unable to log-in.');
} else {
$reviewtext = &mt('Please review the information in "Log-in help" if you are unable to log-in.');
@@ -1206,47 +1260,34 @@ sub print_header {
$loginhelp = '/adm/loginproblems.html';
}
$r->print(<<"END");
-