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

raeburn lon-capa-cvs@mail.lon-capa.org
Fri, 19 Nov 2004 19:11:34 -0000


raeburn		Fri Nov 19 14:11:34 2004 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  Need to pass $symb for discussion_open() to determine if discussion is closed.
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.140 loncom/interface/lonfeedback.pm:1.141
--- loncom/interface/lonfeedback.pm:1.140	Fri Nov 19 13:58:49 2004
+++ loncom/interface/lonfeedback.pm	Fri Nov 19 14:11:33 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.140 2004/11/19 18:58:49 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.141 2004/11/19 19:11:33 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2088,7 +2088,7 @@
 }
 
 sub screen_header {
-    my ($feedurl) = @_;
+    my ($feedurl,$symb) = @_;
     my $msgoptions='';
     my $discussoptions='';
     unless (($ENV{'form.replydisc'}) || ($ENV{'form.editdisc'})) {
@@ -2114,7 +2114,7 @@
 	}
     }
     if ($ENV{'request.course.id'}) {
-	if (&discussion_open() &&
+	if (&discussion_open(undef,$symb) &&
 	    &Apache::lonnet::allowed('pch',
 				     $ENV{'request.course.id'}.
 				     ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
@@ -2124,7 +2124,7 @@
 	    $discussoptions.='<br /><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '.
 		&mt('Anonymous contribution to course discussion of resource').
 		' <i>('.&mt('name only visible to course faculty').')</i>';
-      }
+        }
     }
     if ($msgoptions) { $msgoptions='<h2><img src="/adm/lonMisc/feedback.gif" />'.&mt('Sending Messages').'</h2>'.$msgoptions; }
     if ($discussoptions) { 
@@ -3101,7 +3101,7 @@
       unless ($ENV{'form.sendit'}) {
 	  &Apache::loncommon::content_type($r,'text/html');
 	  $r->send_http_header;
-	  my $options=&screen_header($feedurl);
+	  my $options=&screen_header($feedurl,$symb);
 	  if ($options) {
 	      &mail_screen($r,$feedurl,$options);
 	  } else {