[LON-CAPA-cvs] cvs: loncom /interface lonhelpmenu.pm lonsupportreq.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Mon, 13 Sep 2004 13:31:52 -0000
raeburn Mon Sep 13 09:31:52 2004 EDT
Modified files:
/loncom/interface lonhelpmenu.pm lonsupportreq.pm
Log:
Bug #3454.
Index: loncom/interface/lonhelpmenu.pm
diff -u loncom/interface/lonhelpmenu.pm:1.10 loncom/interface/lonhelpmenu.pm:1.11
--- loncom/interface/lonhelpmenu.pm:1.10 Fri Aug 13 21:14:58 2004
+++ loncom/interface/lonhelpmenu.pm Mon Sep 13 09:31:52 2004
@@ -128,7 +128,7 @@
$r->print('
<image src="/adm/help/gif/smallHelp.gif" border="0" alt="(Topic help)" valign="middle" /> Topic help</a></b> </td>');
}
- if ($requestmail) {
+ if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {
$r->print('
<td align="center"> <b><a href="/adm/support?origurl='.&Apache::lonnet::escape($origurl).'&function='.$function.'" target="bodyframe"><image src="/adm/lonIcons/helpdesk.gif" border="0" alt="(Ask helpdesk)" valign="middle" /> Ask helpdesk</a></b> </td>');
}
@@ -209,7 +209,7 @@
$bodytag
END
$r->print($lt{'chen'});
- if ($requestmail) {
+ if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {
$r->print(', '.$lt{'orto'});
} else {
$r->print(".");
@@ -231,13 +231,12 @@
}
}
}
- if ($requestmail) {
+ if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {
$r->print("
<ul>
<li><a href=\"/adm/support?origurl=".&Apache::lonnet::escape($origurl)."&function=$function\">$lt{'cont'}</a></li>
</ul>
<p>$lt{'suhr'}</p>
- <ul>
");
}
if ($faqbaseurl && $ENV{'user.adv'}) {
@@ -245,6 +244,7 @@
$faq = '1';
}
$r->print("
+ <ul>
<li><a href=\"$faqbaseurl/fom/cache/$faq.html\">$lt{'faqo'}</a></li>
</ul>
<p>$lt{'tfaq'}</p>
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.8 loncom/interface/lonsupportreq.pm:1.9
--- loncom/interface/lonsupportreq.pm:1.8 Thu Sep 9 01:58:42 2004
+++ loncom/interface/lonsupportreq.pm Mon Sep 13 09:31:52 2004
@@ -544,17 +544,29 @@
$bodytag
<h3>A support request has been sent to $to</h3>
END
- } else {
- $r->print(<<END);
+ } else {
+ $to = $admin;
+ if ($to =~ m/^[^\@]+\@[^\@]+$/) {
+ $r->print(<<END);
+<html>
+<head>
+ <title>LON-CAPA support request recorded</title>
+</head>
+$bodytag
+ <h3>A support request has been sent to $to</h3>
+END
+ } else {
+ $r->print(<<END);
<html>
<head>
<title>LON-CAPA support request recorded</title>
</head>
$bodytag
<h3>Warning: Problem with support e-mail address</h3>
-As the e-mail address provided for this LON-CAPA server ($to) does not appear to be a valid e-mail address, your support request has <b>not</b> been sent to the LON-CAPA support staff at your institution. Instead a copy has been sent to the LON-CAPA support team at Michigan State University.
+As the e-mail address provided for this LON-CAPA server ($to) does not appear to be a valid e-mail address, your support request has <b>not</b> been sent to the LON-CAPA support staff or administrator at your institution. Instead a copy has been sent to the LON-CAPA support team at Michigan State University.
END
- $to = 'helpdesk@lon-capa.org';
+ $to = 'helpdesk@lon-capa.org';
+ }
}
if (defined($ENV{'form.email'})) {
if ($ENV{'form.email'} =~ m/^[^\@]+\@[^\@]+$/) {