--- loncom/interface/lonhelpmenu.pm 2004/09/29 19:13:20 1.12 +++ loncom/interface/lonhelpmenu.pm 2004/12/20 21:11:41 1.18 @@ -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,11 +77,66 @@ 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=&lonhttpdurl("/adm"); + 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 + } $r->print(< @@ -93,6 +149,7 @@ sub display_help_banner { a:hover {text-decoration: underline; color: $vlinkcolor; } --> +$scripttag $bodytag END @@ -121,36 +178,36 @@ END if (($component_url) || ($ENV{'user.adv'})) { if ($component_url) { $r->print(" -  "); + "); } elsif ($ENV{'user.adv'}) { - $r->print(' '); + $r->print(' '); } $r->print(' - (Topic help) Topic help '); + (Topic help) Topic help '); } if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { $r->print(' -  (Ask helpdesk) Ask helpdesk '); +  (Ask helpdesk) Ask helpdesk '); } if ($faq && $ENV{'user.adv'}) { - $r->print(<print(< -  (FAQ) FAQ  +  (FAQ) FAQ  END } if ($ENV{'user.adv'}) { - $r->print(< (Report a bug) Report a bug  + $r->print(< (Report a bug) Report a bug  END } if ($stayOnPage) { $r->print(< (Return to last location) Return to last location  +  (Return to last location) Return to last location  END } else { $r->print(< (Close window) Close  +  (Close window) 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', @@ -236,8 +294,11 @@ END -

$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 '') {