--- loncom/interface/lonhelpmenu.pm 2004/08/14 01:14:58 1.10 +++ 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=&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 @@ -105,7 +162,7 @@ END   -
  LON-CAPA help/support +
  LON-CAPA help/support '); + (Topic help) Topic help '); } - if ($requestmail) { + if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { $r->print(' - '); + '); } if ($faq && $ENV{'user.adv'}) { - $r->print(<print(< -   FAQ  +  (FAQ) FAQ  END } if ($ENV{'user.adv'}) { - $r->print(<  Report a bug  + $r->print(< (Report a bug) Report a bug  END } if ($stayOnPage) { $r->print(<  Return to last location  + END } else { $r->print(<  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', @@ -209,7 +267,7 @@ sub display_help_mainpage { $bodytag END $r->print($lt{'chen'}); - if ($requestmail) { + if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { $r->print(', '.$lt{'orto'}); } else { $r->print("."); @@ -231,20 +289,23 @@ END } } } - if ($requestmail) { + if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { $r->print(" -

$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{'tfaq'}

@@ -121,36 +178,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  (Ask helpdesk) Ask helpdesk  (Ask helpdesk) Ask helpdesk  (Return to last location) Return to last location  (Close window) Close