Diff for /loncom/interface/loncommon.pm between versions 1.192 and 1.193

version 1.192, 2004/06/11 02:21:45 version 1.193, 2004/07/03 18:49:42
Line 637  sub helpLatexCheatsheet { Line 637  sub helpLatexCheatsheet {
  .'</td></tr></table>';   .'</td></tr></table>';
 }  }
   
   sub help_open_menu {
       my ($color,$topic,$component_help,$function,$faq,$bug,$stayOnPage,$width,$height,$text) = @_;
       $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 = 620 if (not defined $width);
       $height = 600 if (not defined $height);
       my $link='';
       my $title = &mt('Choose your help');
       my $origurl = $ENV{'REQUEST_URI'};
       my $timestamp = time;
       my %formhash = ();
       if ($ENV{'request.course.fn'}) {
           open(FILE,">$ENV{'request.course.fn'}.formdata");
           &get_unprocessed_cgi($ENV{'QUERY_STRING'},undef);
           foreach (keys %ENV) {
               if ($_ =~ m/^form\.(.+)$/) {
                   if (ref($ENV{$_}) eq 'ARRAY') {
                       my $valstr = join(",",@{$ENV{$_}});
                       print FILE "$1 = $valstr\n";
                   } else {
                       print FILE "$1 = $ENV{$_}\n";
                   }
               }
           }
           close(FILE);
       }
       foreach (\$color,\$function,\$topic,\$component_help,\$faq,\$bug,\$origurl) {
           $$_ = &Apache::lonnet::escape($$_);
       }
   
       if (!$stayOnPage)
       {
            $link = "javascript:helpMenu('open')";
       }
       else
       {
           $link = "javascript:helpMenu('display')";
       }
       my $banner_link = "/adm/helpmenu?page=banner&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";
       my $details_link = "/adm/helpmenu?page=body&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";
       my $template .= <<"ENDTEMPLATE";
    <script>
   function helpMenu(caller) {
       if (caller == 'open') {
           newWindow =  window.open("","helpmenu","HEIGHT=$height,WIDTH=$width,resize=yes,scrollbars=yes" )
           caller = newWindow.document
       } else {
           caller = this.document
       }
       caller.write("<html><head><title>LON-CAPA Help Menu</title><meta http-equiv='pragma' content='no-cache'></head>")
       caller.write("<frameset rows='105,*' border='0'><frame name='bannerframe'  src='$banner_link'><frame name='bodyframe' src='$details_link'></frameset>")
       caller.write("</html>")
       caller.close()
       if (caller == newWindow.document) {
           caller.focus()
       }
   }
    </script>
    <a href="$link" title="$title"><image src="/adm/lonMisc/smallFAQ.gif" border="0" alt="(Help Menu)" /></a>
   ENDTEMPLATE
       return $template;
   }
   
 sub help_open_bug {  sub help_open_bug {
     my ($topic, $text, $stayOnPage, $width, $height) = @_;      my ($topic, $text, $stayOnPage, $width, $height) = @_;
     unless ($ENV{'user.adv'}) { return ''; }      unless ($ENV{'user.adv'}) { return ''; }

Removed from v.1.192  
changed lines
  Added in v.1.193


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