[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf /interface lonannounce.pm loncommon.pm doc/loncapafiles loncapafiles.lpml

www lon-capa-cvs@mail.lon-capa.org
Thu, 15 Jan 2004 01:43:44 -0000


www		Wed Jan 14 20:43:44 2004 EDT

  Modified files:              
    /doc/loncapafiles	loncapafiles.lpml 
    /loncom	loncapa_apache.conf 
    /loncom/interface	lonannounce.pm loncommon.pm 
  Log:
  Bugzilla and FAQ links
  
  
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.319 doc/loncapafiles/loncapafiles.lpml:1.320
--- doc/loncapafiles/loncapafiles.lpml:1.319	Sun Jan 11 13:24:46 2004
+++ doc/loncapafiles/loncapafiles.lpml	Wed Jan 14 20:43:43 2004
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.319 2004/01/11 18:24:46 www Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.320 2004/01/15 01:43:43 www Exp $ -->
 
 <!--
 
@@ -4228,6 +4228,8 @@
 <filenames>
 authorfeed.gif;
 bomb.gif;
+smallFAQ.gif;
+smallBug.gif;
 cat_button.gif;
 chat.gif;
 eval_button.gif;
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.69 loncom/loncapa_apache.conf:1.70
--- loncom/loncapa_apache.conf:1.69	Wed Jan 14 17:59:18 2004
+++ loncom/loncapa_apache.conf	Wed Jan 14 20:43:43 2004
@@ -1,7 +1,7 @@
 ##
 ## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
 ##
-## $Id: loncapa_apache.conf,v 1.69 2004/01/14 22:59:18 albertel Exp $
+## $Id: loncapa_apache.conf,v 1.70 2004/01/15 01:43:43 www Exp $
 ##
 
 #
@@ -829,6 +829,8 @@
 PerlSetVar       lonTextBrowsers opera:windows\s+ce:lynx
 PerlSetVar       lonScansDir  /home/httpd/scantron
 PerlSetVar       lonScriptTimeout 10
+PerlSetVar	 BugzillaHost	http://bugs.lon-capa.org/
+PerlSetVar	 FAQHost	http://help.lon-capa.org/
 # -----------------------------------------------------------------------------
 # NOTE: lonSqlAccess key is the password for the MySQL user
 # www@localhost.  This value must always be "localhostkey".
Index: loncom/interface/lonannounce.pm
diff -u loncom/interface/lonannounce.pm:1.24 loncom/interface/lonannounce.pm:1.25
--- loncom/interface/lonannounce.pm:1.24	Wed Jan 14 11:07:18 2004
+++ loncom/interface/lonannounce.pm	Wed Jan 14 20:43:43 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Announce
 #
-# $Id: lonannounce.pm,v 1.24 2004/01/14 16:07:18 www Exp $
+# $Id: lonannounce.pm,v 1.25 2004/01/15 01:43:43 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -47,14 +47,17 @@
     my $enddateform = &Apache::lonhtmlcommon::date_setter('anno',
                                                           'enddate',
                                                           $end);
-    my $help=&Apache::loncommon::help_open_topic('Calendar_Add_Announcement');
+    my $help=&Apache::loncommon::help_open_topic('Calendar_Add_Announcement').
+	&Apache::loncommon::help_open_faq(274).
+	&Apache::loncommon::help_open_bug('Communication Tools');
     $r->print(<<ENDFORM);
+$help
 <form name="anno" method="post">
 <input type="hidden" value=''          name="action"      >
 <table><tr><td>Starting date:</td><td>$startdateform</td></tr>
 <tr><td>Ending date:</td><td>$enddateform</td></tr></table>
 <textarea name="msg" rows="4" cols="60">$text</textarea>
-<input type="button" onClick="trysubmit()" value="Post Announcement">$help<hr>
+<input type="button" onClick="trysubmit()" value="Post Announcement"><hr />
 ENDFORM
 }
 
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.171 loncom/interface/loncommon.pm:1.172
--- loncom/interface/loncommon.pm:1.171	Tue Jan 13 10:48:25 2004
+++ loncom/interface/loncommon.pm	Wed Jan 14 20:43:43 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.171 2004/01/13 15:48:25 matthew Exp $
+# $Id: loncommon.pm,v 1.172 2004/01/15 01:43:43 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -618,6 +618,93 @@
 	&Apache::loncommon::help_open_topic("Other_Symbols",'Other Symbols',
 					    undef,undef,600)
 	.'</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