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

raeburn lon-capa-cvs@mail.lon-capa.org
Tue, 23 Jan 2007 01:27:18 -0000


raeburn		Mon Jan 22 20:27:18 2007 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  When discussion postings are not displayed to a user because of a COM block, FDBK button should not provide the user with a way to post to the discussion.
  
  Checkbox for copying posted message to user's course blog not shown if discussion osting are blocked. 
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.240 loncom/interface/lonfeedback.pm:1.241
--- loncom/interface/lonfeedback.pm:1.240	Fri Jan  5 01:47:22 2007
+++ loncom/interface/lonfeedback.pm	Mon Jan 22 20:27:17 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.240 2007/01/05 06:47:22 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.241 2007/01/23 01:27:17 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2578,7 +2578,8 @@
 	}
     }
     if (($env{'request.course.id'}) && (!$env{'form.sendmessageonly'})) {
-	if (&discussion_open(undef,$symb) &&
+        my ($blocked,$blocktext) = &Apache::loncommon::blocking_status('boards');
+        if (!$blocked && &discussion_open(undef,$symb) && 
 	    &Apache::lonnet::allowed('pch',
 				     $env{'request.course.id'}.
 				     ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
@@ -2588,10 +2589,10 @@
 		&mt('Anonymous contribution to course discussion of resource').
 		' <i>('.&mt('name only visible to course faculty').')</i></label> '.
 		'<a href="/adm/preferences?action=changescreenname">'.&mt('Change Screenname').'</a>';
-        }
-        my $blockblog = &Apache::loncommon::blocking_status('blogs');
-        if (!$blockblog) {
-            $discussoptions.= &add_blog_checkbox();
+            my $blockblog = &Apache::loncommon::blocking_status('blogs');
+            if (!$blockblog) {
+                $discussoptions.= &add_blog_checkbox();
+            }
         }
     }
     if ($msgoptions) { $msgoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif').'" />'.&mt('Sending Messages').'</h2>'.$msgoptions; }