[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Uploaded_Templates_TextBoxes.tex /interface lonaboutme.pm lonbulletin.pm lonsimplepage.pm lonsyllabus.pm /lonnet/perl lonnet.pm

www lon-capa-cvs@mail.lon-capa.org
Mon, 10 Feb 2003 20:03:13 -0000


www		Mon Feb 10 15:03:13 2003 EDT

  Added files:                 
    /loncom/html/adm/help/tex	Uploaded_Templates_TextBoxes.tex 

  Modified files:              
    /loncom/interface	lonaboutme.pm lonbulletin.pm lonsimplepage.pm 
                     	lonsyllabus.pm 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Bug #1019 fixed.
  Additional documentation.
  
  
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.11 loncom/interface/lonaboutme.pm:1.12
--- loncom/interface/lonaboutme.pm:1.11	Mon Feb 10 11:22:28 2003
+++ loncom/interface/lonaboutme.pm	Mon Feb 10 15:03:13 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # "About Me" Personal Information
 #
-# $Id: lonaboutme.pm,v 1.11 2003/02/10 16:22:28 www Exp $
+# $Id: lonaboutme.pm,v 1.12 2003/02/10 20:03:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -33,6 +33,7 @@
 use Apache::loncommon;
 use Apache::lonnet;
 use Apache::lontexconvert;
+use Apache::lonfeedback;
 
 sub handler {
     my $r = shift;
@@ -89,7 +90,7 @@
  
        if ($allowed) {
           $r->print('<p><b>Privacy Note:</b> The information you submit can be viewed by anybody who is logged into LON-CAPA. Do not provide information that you are not ready to share publically.</p>'.
-	  '<p><a href="'.$r->uri.'?forcestudent=1">Show Public View</a>'.
+&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'</p><p><a href="'.$r->uri.'?forcestudent=1">Show Public View</a>'.
  &Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>');
       }
       if (($ENV{'form.uploaddoc.filename'}) &&
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.5 loncom/interface/lonbulletin.pm:1.6
--- loncom/interface/lonbulletin.pm:1.5	Mon Feb 10 11:22:28 2003
+++ loncom/interface/lonbulletin.pm	Mon Feb 10 15:03:13 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Bulletin Board Handler
 #
-# $Id: lonbulletin.pm,v 1.5 2003/02/10 16:22:28 www Exp $
+# $Id: lonbulletin.pm,v 1.6 2003/02/10 20:03:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -34,6 +34,7 @@
 use Apache::lonnet;
 use Apache::lontexconvert;
 use Apache::lonxml;
+use Apache::lonfeedback;
 
 sub handler {
     my $r = shift;
@@ -90,7 +91,8 @@
  
        if ($allowed) {
           $r->print(
-	  '<p><a href="'.$r->uri.'?forcestudent=1">Show Public View</a>'.
+	  '<p>'.
+&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'<br /><a href="'.$r->uri.'?forcestudent=1">Show Public View</a>'.
  &Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>');
       }
       if (($ENV{'form.uploaddoc.filename'}) &&
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.4 loncom/interface/lonsimplepage.pm:1.5
--- loncom/interface/lonsimplepage.pm:1.4	Mon Feb 10 11:22:28 2003
+++ loncom/interface/lonsimplepage.pm	Mon Feb 10 15:03:13 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.4 2003/02/10 16:22:28 www Exp $
+# $Id: lonsimplepage.pm,v 1.5 2003/02/10 20:03:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -33,6 +33,7 @@
 use Apache::loncommon;
 use Apache::lonnet;
 use Apache::lontexconvert;
+usr Apache::lonfeedback;
 
 sub handler {
     my $r = shift;
@@ -88,8 +89,8 @@
        if ($forcestudent) { $allowed=0; }
  
        if ($allowed) {
-          $r->print(
-	  '<p><a href="'.$r->uri.'?forcestudent=1">Show Public View</a>'.
+          $r->print('<p>'.
+&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'<br /><a href="'.$r->uri.'?forcestudent=1">Show Public View</a>'.
  &Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>');
       }
       if (($ENV{'form.uploaddoc.filename'}) &&
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.11 loncom/interface/lonsyllabus.pm:1.12
--- loncom/interface/lonsyllabus.pm:1.11	Mon Feb 10 11:22:28 2003
+++ loncom/interface/lonsyllabus.pm	Mon Feb 10 15:03:13 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.11 2003/02/10 16:22:28 www Exp $
+# $Id: lonsyllabus.pm,v 1.12 2003/02/10 20:03:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -97,7 +97,8 @@
           if ($forcestudent) { $allowed=0; }
        }
        if ($allowed) {
-          $r->print('<p>This syllabus can be publically viewed at <tt>http://'.
+          $r->print('<p>'.
+&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'</p><p>This syllabus can be publically viewed at <tt>http://'.
 		    $Apache::lonnet::hostname{$homeserver}.$r->uri.'</tt>'.
                &Apache::loncommon::help_open_topic('Syllabus_ExtLink').'</p>'.
 	  '<p><a href="'.$r->uri.'?forcestudent=1">Show Student View</a>'.
@@ -171,9 +172,11 @@
 # embed style?
 		      my ($curfext)=($filelink=~/\.([^\.]+)$/);
                       my $embstyle=&Apache::loncommon::fileembstyle($curfext);
-	              if ($embstyle eq 'ssi') {
+	              if (($embstyle eq 'ssi') || ($curfext=~/\/$/)) {
 # make ssi call and remove everything but the body contents
-	                 $output=&Apache::lonnet::ssi($filelink);
+	                 $output=
+                 ($filelink=~/^http\:/?&Apache::lonnet::externalssi($filelink):
+                                       &Apache::lonnet::ssi($filelink));
                          $output=~s/^.*\<body[^\>]*\>//si;
                          $output=~s/\<\/body\s*\>.*$//si;
 	              } elsif ($embstyle eq 'img') {
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.323 loncom/lonnet/perl/lonnet.pm:1.324
--- loncom/lonnet/perl/lonnet.pm:1.323	Mon Feb  3 13:03:53 2003
+++ loncom/lonnet/perl/lonnet.pm	Mon Feb 10 15:03:13 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.323 2003/02/03 18:03:53 harris41 Exp $
+# $Id: lonnet.pm,v 1.324 2003/02/10 20:03:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -824,6 +824,14 @@
     $request->header(Cookie => $ENV{'HTTP_COOKIE'});
     my $response=$ua->request($request);
 
+    return $response->content;
+}
+
+sub externalssi {
+    my ($url)=@_;
+    my $ua=new LWP::UserAgent;
+    my $request=new HTTP::Request('GET',$url);
+    my $response=$ua->request($request);
     return $response->content;
 }
 

Index: loncom/html/adm/help/tex/Uploaded_Templates_TextBoxes.tex
+++ loncom/html/adm/help/tex/Uploaded_Templates_TextBoxes.tex
This template provides a number of editable boxes into which text can be 
entered under different headings. If a box is left blank, the heading will not
be displayed - you can check the Uploaded_Templates_PublicView.tex:\ref{public view} of your documents to verify which headings are and which headings are not displayed.

When displayed, linebreaks in the textbox are automatically translated to linebreaks on the wbe page. Also, URLs starting with {\tt http://...} are translated into links.

In addition, depending on settings, several very simple HTML tags are allowed, i.e,\begin{verbatim}
<B> <I> <P> <A> <LI> <OL> <UL> <EM> <BR> <TT> 
<STRONG> <BLOCKQUOTE> <DIV> <IMG>
\end{verbatim}