Diff for /loncom/interface/loncommon.pm between versions 1.171 and 1.172

version 1.171, 2004/01/13 15:48:25 version 1.172, 2004/01/15 01:43:43
Line 620  sub helpLatexCheatsheet { Line 620  sub helpLatexCheatsheet {
  .'</td></tr></table>';   .'</td></tr></table>';
 }  }
   
   sub help_open_bug {
       my ($topic, $text, $stayOnPage, $width, $height) = @_;
       unless ($ENV{'user.adv'}) { return ''; }
       unless ($Apache::lonnet::perlvar{'BugzillaHost'}) { return ''; }
       $text = "" if (not defined $text);
       $stayOnPage = 0 if (not defined $stayOnPage);
       if ($ENV{'browser.interface'} eq 'textual' ||
    $ENV{'environment.remote'} eq 'off' ) {
    $stayOnPage=1;
       }
       $width = 350 if (not defined $width);
       $height = 400 if (not defined $height);
   
       $topic=~s/\W+/\+/g;
       my $link='';
       my $template='';
       my $url=$Apache::lonnet::perlvar{'BugzillaHost'}.'enter_bug.cgi?product=LON-CAPA&bug_file_loc='.
    &Apache::lonnet::escape($ENV{'REQUEST_URI'}).'&component='.$topic;
       if (!$stayOnPage)
       {
    $link = "javascript:void(open('$url', 'Bugzilla', 'menubar=0,toolbar=1,scrollbars=1,width=$width,height=$height,resizable=yes'))";
       }
       else
       {
    $link = $url;
       }
   
       # Add the text
       if ($text ne "")
       {
    $template .= 
     "<table bgcolor='#AA3333' cellspacing='1' cellpadding='1' border='0'><tr>".
     "<td bgcolor='#FF5555'><a href=\"$link\"><font color='#FFFFFF' size='2'>$text</font></a>";
       }
   
       # Add the graphic
       $template .= <<"ENDTEMPLATE";
    <a href="$link"><image src="/adm/lonMisc/smallBug.gif" border="0" alt="(Bug: $topic)" /></a>
   ENDTEMPLATE
       if ($text ne '') { $template.='</td></tr></table>' };
       return $template;
   
   }
   
   sub help_open_faq {
       my ($topic, $text, $stayOnPage, $width, $height) = @_;
       unless ($ENV{'user.adv'}) { return ''; }
       unless ($Apache::lonnet::perlvar{'FAQHost'}) { return ''; }
       $text = "" if (not defined $text);
       $stayOnPage = 0 if (not defined $stayOnPage);
       if ($ENV{'browser.interface'} eq 'textual' ||
    $ENV{'environment.remote'} eq 'off' ) {
    $stayOnPage=1;
       }
       $width = 350 if (not defined $width);
       $height = 400 if (not defined $height);
   
       $topic=~s/\W+/\+/g;
       my $link='';
       my $template='';
       my $url=$Apache::lonnet::perlvar{'FAQHost'}.'/fom/cache/'.$topic.'.html';
       if (!$stayOnPage)
       {
    $link = "javascript:void(open('$url', 'FAQ-O-Matic', 'menubar=0,toolbar=1,scrollbars=1,width=$width,height=$height,resizable=yes'))";
       }
       else
       {
    $link = $url;
       }
   
       # Add the text
       if ($text ne "")
       {
    $template .= 
     "<table bgcolor='#AA3333' cellspacing='1' cellpadding='1' border='0'><tr>".
     "<td bgcolor='#FF5555'><a href=\"$link\"><font color='#FFFFFF' size='2'>$text</font></a>";
       }
   
       # Add the graphic
       $template .= <<"ENDTEMPLATE";
    <a href="$link"><image src="/adm/lonMisc/smallFAQ.gif" border="0" alt="(FAQ: $topic)" /></a>
   ENDTEMPLATE
       if ($text ne '') { $template.='</td></tr></table>' };
       return $template;
   
   }
   
 =pod  =pod
   
 =item * csv_translate($text)   =item * csv_translate($text) 

Removed from v.1.171  
changed lines
  Added in v.1.172


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>