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

www lon-capa-cvs@mail.lon-capa.org
Wed, 11 Sep 2002 13:36:50 -0000


www		Wed Sep 11 09:36:50 2002 EDT

  Modified files:              
    /loncom/interface	lonbulletin.pm lonfeedback.pm 
    /loncom/xml	lonxml.pm 
  Log:
  Ad hoc bulletin boards sort of work now.
  
  
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.2 loncom/interface/lonbulletin.pm:1.3
--- loncom/interface/lonbulletin.pm:1.2	Tue Sep 10 16:53:36 2002
+++ loncom/interface/lonbulletin.pm	Wed Sep 11 09:36:50 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonbulletin.pm,v 1.2 2002/09/10 20:53:36 www Exp $
+# $Id: lonbulletin.pm,v 1.3 2002/09/11 13:36:50 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -33,6 +33,7 @@
 use Apache::loncommon;
 use Apache::lonnet;
 use Apache::lontexconvert;
+use Apache::lonxml;
 
 sub handler {
     my $r = shift;
@@ -141,7 +142,7 @@
                  $r->print('<blockquote>'.
                         $message.'</blockquote>');
                  if ($allowed) {
-                $r->print('<br /><textarea cols="80" rows="20" name="'.$_.'">'.
+                $r->print('<br /><textarea cols="80" rows="10" name="'.$_.'">'.
 			   $syllabus{$_}.
            '</textarea><input type="submit" name="storesyl" value="Store" />');
 	        }
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.30 loncom/interface/lonfeedback.pm:1.31
--- loncom/interface/lonfeedback.pm:1.30	Tue Sep 10 17:06:22 2002
+++ loncom/interface/lonfeedback.pm	Wed Sep 11 09:36:50 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.30 2002/09/10 21:06:22 www Exp $
+# $Id: lonfeedback.pm,v 1.31 2002/09/11 13:36:50 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -409,6 +409,13 @@
   $feedurl=~s/^$ENV{'HTTP_HOST'}//;
 
   my $symb=&Apache::lonnet::symbread($feedurl);
+  unless ($symb) {
+      $symb=$ENV{'form.symb'};
+      if ($symb) {
+	  my ($map,$id,$url)=split(/\_\_\_/,$symb);
+          $feedurl=&Apache::lonnet::clutter($url);
+      }
+  }
   my $goahead=1;
   if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) {
       unless ($symb) { $goahead=0; }
@@ -425,6 +432,8 @@
       ) 
       || 
       ($ENV{'request.course.id'} && ($feedurl!~m:^/adm:))
+      ||
+      ($ENV{'request.course.id'} && ($symb=~/^bulletin\_\_\_/))
      ) {
 # --------------------------------------------------- Print login screen header
     unless ($ENV{'form.sendit'}) {
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.194 loncom/xml/lonxml.pm:1.195
--- loncom/xml/lonxml.pm:1.194	Tue Sep 10 16:53:36 2002
+++ loncom/xml/lonxml.pm	Wed Sep 11 09:36:50 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.194 2002/09/10 20:53:36 www Exp $
+# $Id: lonxml.pm,v 1.195 2002/09/11 13:36:50 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -224,7 +224,18 @@
 	      }
           }
           if ($discussiononly) {
-	      $discussion.='<h1>'.$symb.'</h1>';
+	      $discussion.=(<<ENDDISCUSS);
+<form action="/adm/feedback" method="post">
+<input type="submit" name="discuss" value="Post Discussion" />
+<input type="submit" name="anondiscuss" value="Post Anonymous Discussion" />
+<input type="hidden" name="symb" value="$symb" />
+<input type="hidden" name="sendit" value="true" />
+<br />
+<font size="1">Note: in anonymous discussion, your name is visible only to
+course faculty</font><br />
+<textarea name=comment cols=60 rows=10 wrap=hard></textarea>
+</form>
+ENDDISCUSS
           }
        }
     }