[LON-CAPA-cvs] cvs: loncom /interface lonbulletin.pm lonfeedback.pm /xml lonxml.pm

www lon-capa-cvs@mail.lon-capa.org
Mon, 15 Sep 2003 13:38:19 -0000


www		Mon Sep 15 09:38:19 2003 EDT

  Modified files:              
    /loncom/interface	lonbulletin.pm lonfeedback.pm 
    /loncom/xml	lonxml.pm 
  Log:
  Further cleanup of spaghetti between lonxml::xmlend and 
  lonfeedback::list_discussion in preparation of an overhaul of
  the discussion feature.
  
  
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.12 loncom/interface/lonbulletin.pm:1.13
--- loncom/interface/lonbulletin.pm:1.12	Tue Sep  9 15:39:04 2003
+++ loncom/interface/lonbulletin.pm	Mon Sep 15 09:38:19 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Bulletin Board Handler
 #
-# $Id: lonbulletin.pm,v 1.12 2003/09/09 19:39:04 www Exp $
+# $Id: lonbulletin.pm,v 1.13 2003/09/15 13:38:19 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -33,7 +33,6 @@
 use Apache::loncommon;
 use Apache::lonnet;
 use Apache::lontexconvert;
-use Apache::lonxml;
 use Apache::lonfeedback;
 
 sub handler {
@@ -174,8 +173,9 @@
     } else {
        $r->print('<p>No page information provided.</p>');
     }
-    $r->print(&Apache::lonxml::xmlend(1,'bulletin___'.$marker.'___'.
-             'adm/wrapper'.$r->uri).'</body></html>');
+    $r->print(&Apache::lonfeedback::list_discussion
+	      (1,'bulletin___'.$marker.'___'.
+	       'adm/wrapper'.$r->uri).'</body></html>');
     return OK;
 } 
 
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.54 loncom/interface/lonfeedback.pm:1.55
--- loncom/interface/lonfeedback.pm:1.54	Sun Sep 14 19:57:18 2003
+++ loncom/interface/lonfeedback.pm	Mon Sep 15 09:38:19 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.54 2003/09/14 23:57:18 www Exp $
+# $Id: lonfeedback.pm,v 1.55 2003/09/15 13:38:19 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -53,7 +53,13 @@
 use Apache::lontexconvert();
 
 sub list_discussion {
-    my ($crs,$symb,$discussiononly)=@_;
+    my ($discussiononly,$symb)=@_;
+    unless ($ENV{'request.course.id'}) { return ''; }
+    my $crs='/'.$ENV{'request.course.id'};
+    if ($ENV{'request.course.sec'}) {
+	$crs.='_'.$ENV{'request.course.sec'};
+    }                 
+    $crs=~s/\_/\//g;
     unless ($symb) {
 	$symb=&Apache::lonnet::symbread();
     }
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.276 loncom/xml/lonxml.pm:1.277
--- loncom/xml/lonxml.pm:1.276	Sun Sep 14 19:57:18 2003
+++ loncom/xml/lonxml.pm	Mon Sep 15 09:38:19 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.276 2003/09/14 23:57:18 www Exp $
+# $Id: lonxml.pm,v 1.277 2003/09/15 13:38:19 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -175,18 +175,7 @@
 }
 
 sub xmlend {
-    my ($discussiononly,$symb)=@_;
-    my $discussion='';
-    if ($ENV{'request.course.id'}) {
-       my $crs='/'.$ENV{'request.course.id'};
-       if ($ENV{'request.course.sec'}) {
-          $crs.='_'.$ENV{'request.course.sec'};
-       }                 
-       $crs=~s/\_/\//g;
-       $discussion=&Apache::lonfeedback::list_discussion
-	   ($crs,$symb,$discussiononly);
-    }
-    return $discussion.($discussiononly?'':'</html>');
+    return &Apache::lonfeedback::list_discussion().'</html>';
 }
 
 sub tokeninputfield {