--- loncom/interface/lonhelpmenu.pm 2006/06/26 22:13:13 1.29 +++ loncom/interface/lonhelpmenu.pm 2009/10/20 14:29:44 1.38 @@ -1,6 +1,8 @@ # The LearningOnline Network with CAPA # generate frame-based help system # +# $Id: lonhelpmenu.pm,v 1.38 2009/10/20 14:29:44 jms Exp $ +# # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). @@ -72,6 +74,8 @@ sub handler { sub display_help_banner { my ($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_; my $location=&Apache::loncommon::lonhttpdurl("/adm"); + my $dom = $env{'request.role.domain'}; + my %domconfig = &Apache::lonnet::get_dom('configuration',['login'],$dom); my $scripttag = ''; if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { my $displayurl = &escape($origurl); @@ -141,10 +145,10 @@ SCRIPT_TWO 'only_body' => 1,}); $r->print($start_page); - my $width = ($stayOnPage) ? '700' : '600'; - + my $width = ($stayOnPage) ? '95%' : '600'; $r->print(''); + my $general_help = &Apache::loncommon::general_help(); $r->print(< @@ -152,34 +156,38 @@ SCRIPT_TWO
  LON-CAPA help/support
 
+ END if ($component_url) { - $r->print("'); + $r->print("'); } if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { $r->print(' - '); + '); } if ($faq && $env{'user.adv'}) { $r->print(< -  (FAQ) FAQ  + END } if ($env{'user.adv'}) { - $r->print(< (Report a bug) Report a bug  + if ($domconfig{'login'}{'submitbugs'} eq '1' || + $domconfig{'login'}{'submitbugs'} eq '' ) { + $r->print(<(Report a bug) Report a bug  END + } } if ($stayOnPage) { $r->print(< (Return to last location) Return to last location  + END } else { $r->print(< (Close window) Close  + END } $r->print(< - + @@ -208,8 +216,6 @@ sub display_help_mainpage { 'disp' => 'Display the page in the inline help system that covers this topic.', 'crac' => '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.', 'inhs' => 'Topical help system for', - 'noto' => 'There is no specific topical help item for', - 'coth' => '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', @@ -228,12 +234,13 @@ sub display_help_mainpage { {'add_entries' => \%body_layout, 'only_body' => 1,}); $r->print($start_page); - $r->print($lt{'chen'}); + $r->print(''.$lt{'chen'}); if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) { $r->print(', '.$lt{'orto'}); } else { $r->print("."); } + $r->print(''); if ($topic) { if ( ($component_url) || ($env{'user.adv'}) ) { if ($component_url) { @@ -243,11 +250,6 @@ sub display_help_mainpage {

$lt{'disp'}

"); - } elsif ($env{'user.adv'}) { - $r->print(" -