[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm /xml lonxml.pm

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 10 Mar 2005 19:10:31 -0000


matthew		Thu Mar 10 14:10:31 2005 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
    /loncom/xml	lonxml.pm 
  Log:
  Exclude discussion by default from ssi_body calls.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.605 loncom/lonnet/perl/lonnet.pm:1.606
--- loncom/lonnet/perl/lonnet.pm:1.605	Thu Mar  3 18:21:54 2005
+++ loncom/lonnet/perl/lonnet.pm	Thu Mar 10 14:10:30 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.605 2005/03/03 23:21:54 matthew Exp $
+# $Id: lonnet.pm,v 1.606 2005/03/10 19:10:30 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1063,6 +1063,9 @@
 # ------------------------------------------------ Get server side include body
 sub ssi_body {
     my ($filelink,%form)=@_;
+    if (! exists($form{'LONCAPA_INTERNAL_no_discussion'})) {
+        $form{'LONCAPA_INTERNAL_no_discussion'}='true';
+    }
     my $output=($filelink=~/^http\:/?&externalssi($filelink):
                                      &ssi($filelink,%form));
     $output=~s|//(\s*<!--)? BEGIN LON-CAPA Internal.+// END LON-CAPA Internal\s*(-->)?\s||gs;
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.361 loncom/xml/lonxml.pm:1.362
--- loncom/xml/lonxml.pm:1.361	Wed Mar  9 21:34:59 2005
+++ loncom/xml/lonxml.pm	Thu Mar 10 14:10:31 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.361 2005/03/10 02:34:59 www Exp $
+# $Id: lonxml.pm,v 1.362 2005/03/10 19:10:31 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -178,7 +178,13 @@
 	$mode='problem';
 	$status=$Apache::inputtags::status[-1]; 
     }
-    my $discussion=&Apache::lonfeedback::list_discussion($mode,$status);    
+    my $discussion;
+    &Apache::loncommon::get_unprocessed_cgi
+        ($ENV{'query_string'},['LONCAPA_INTERNAL_no_discussion']);
+    if (! exists($ENV{'form.LONCAPA_INTERNAL_no_discussion'}) ||
+        $ENV{'form.LONCAPA_INTERNAL_no_discussion'} ne 'true') {
+        $discussion=&Apache::lonfeedback::list_discussion($mode,$status);
+    }
     if ($target eq 'tex') {
 	$discussion.='<tex>\keephidden{ENDOFPROBLEM}\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}\end{document}</tex>';
 	&Apache::lonxml::newparser($parser,\$discussion,'');