--- loncom/interface/lonhelpmenu.pm 2004/07/13 17:35:58 1.9 +++ loncom/interface/lonhelpmenu.pm 2005/02/17 08:29:42 1.19 @@ -30,6 +30,7 @@ use strict; use lib qw(/home/httpd/lib/perl); use Apache::Constants qw(:common); use Apache::loncommon(); +use Apache::lonlocal; sub handler { my ($r) = @_; @@ -76,13 +77,69 @@ sub display_help_banner { my $vlinkcolor = &Apache::loncommon::designparm($function.'.vlink'); my $pagecolor = &Apache::loncommon::designparm($function.'.pgbg'); my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg'); - + my $location=&Apache::loncommon::lonhttpdurl("/adm"); if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) { - $tablecolor = '#CCCCFF'; + $tablecolor = '#EEEE99'; + } + my $scripttag = ''; + if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { + my $displayurl = &Apache::lonnet::escape($origurl); + $scripttag = (<<"SCRIPT_ONE"); + +SCRIPT_TWO + } + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html Help Banner +$scripttag $bodytag END @@ -105,7 +163,7 @@ END - LON-CAPA help/support + LON-CAPA help/support @@ -121,36 +179,36 @@ END if (($component_url) || ($ENV{'user.adv'})) { if ($component_url) { $r->print(" - "); + "); } elsif ($ENV{'user.adv'}) { $r->print(' '); } $r->print(' - Topic help '); + Topic help '); } - if ($requestmail) { + if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { $r->print(' - Ask helpdesk '); + Ask helpdesk '); } if ($faq && $ENV{'user.adv'}) { - $r->print(<print(< - FAQ + FAQ END } if ($ENV{'user.adv'}) { - $r->print(< Report a bug + $r->print(< Report a bug END } if ($stayOnPage) { $r->print(< Return to last location + Return to last location END } else { $r->print(< Close + Close END } $r->print(< 'Consult the inline help system for this topic.', 'cont' => 'Contact the LON-CAPA support team', 'suhr' => 'Submit a help request to the team responsible for LON-CAPA support at this institution.', + 'stuq' => 'Questions about course content should not be directed to the support team, but instead should be sent to the course instructor', 'faqo' => 'FAQ-O-Matic Help system', 'tfaq' => 'The FAQ-O-Matic is a compendium of answers provided to common questions asked by users of LON-CAPA over the past couple of years.', 'lbug' => 'LON-CAPA Bugzilla bug/feature request tracking system', 'crea' => 'Create an account for yourself in the LON-CAPA Bugzilla tracking system, if you wish to report bugs you have encountered in the LON-CAPA software,or if you have suggestions for improvements in LON-CAPA.', 'suim' => ' Suggested improvements may include additional functionality, improved usability, or changes to wording used in LON-CAPA pages, including the embedded help system.' ); - + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html $lt{'heco'} $bodytag END $r->print($lt{'chen'}); - if ($requestmail) { + if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { $r->print(', '.$lt{'orto'}); } else { $r->print("."); @@ -231,20 +290,23 @@ END } } } - if ($requestmail) { + if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { $r->print(" $lt{'cont'} - $lt{'suhr'} - - "); + $lt{'suhr'}"); + unless ($ENV{'user.adv'}) { + $r->print(''.&mt('Note').': '.$lt{'stuq'}.'. '.&mt('This can be done using the').' '.&mt('COM').' '.&mt('button, or the FDBK button when viewing a content page.')); + } + $r->print(""); } if ($faqbaseurl && $ENV{'user.adv'}) { if (!defined($faq) ||$faq eq '') { $faq = '1'; } $r->print(" + $lt{'faqo'} $lt{'tfaq'}
$lt{'suhr'}
$lt{'suhr'}"); + unless ($ENV{'user.adv'}) { + $r->print(''.&mt('Note').': '.$lt{'stuq'}.'. '.&mt('This can be done using the').' '.&mt('COM').' '.&mt('button, or the FDBK button when viewing a content page.')); + } + $r->print("
$lt{'tfaq'}