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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 03 Jun 2004 20:06:16 -0000


albertel		Thu Jun  3 16:06:16 2004 EDT

  Modified files:              
    /loncom/publisher	packages.tab 
    /loncom/interface	lonfeedback.pm 
  Log:
  - discussend parameter now added, closes and hides discussion
      -BUGS#86,2862,and some of 2636
  
  
  
Index: loncom/publisher/packages.tab
diff -u loncom/publisher/packages.tab:1.33 loncom/publisher/packages.tab:1.34
--- loncom/publisher/packages.tab:1.33	Thu Jun  3 15:43:05 2004
+++ loncom/publisher/packages.tab	Thu Jun  3 16:06:15 2004
@@ -34,6 +34,8 @@
 part_0&mapalias&display:Resource alias name for conditions
 part_0&interval&display:Time-Limit
 part_0&interval&type:date_interval
+part_0&discussend&display:Discussion End Time
+part_0&discussend&type:date_end
 numericalhint&tol&display:Numerical Tolerance
 numericalhint&tol&type:tolerance
 numericalhint&tol&default:5%
@@ -77,6 +79,8 @@
 extension_page&contentopen&display:Opening Date
 extension_page&contentopen&type:date_start
 extension_page&contentclose&display:Due Date
+extension_page&discussend&display:Discussion End Time
+extension_page&discussend&type:date_end
 extension_page&contentclose&type:date_end
 extension_page&encrypturl&type:string_yesno
 extension_page&encrypturl&display:Do not show plain URL
@@ -93,5 +97,7 @@
 default&mapalias&display:Resource alias name for conditions
 default&encrypturl&type:string_yesno
 default&encrypturl&display:Do not show plain URL
+default&discussend&display:Discussion End Time
+default&discussend&type:date_end
 part_0&hiddenresource&display:Resource Hidden from Students
 part_0&hiddenresource&type:string_yesno
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.88 loncom/interface/lonfeedback.pm:1.89
--- loncom/interface/lonfeedback.pm:1.88	Thu Jun  3 10:28:39 2004
+++ loncom/interface/lonfeedback.pm	Thu Jun  3 16:06:15 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.88 2004/06/03 14:28:39 www Exp $
+# $Id: lonfeedback.pm,v 1.89 2004/06/03 20:06:15 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -39,11 +39,15 @@
 
 sub list_discussion {
     my ($mode,$status,$symb)=@_;
-#    &Apache::lonnet::logthis("status is $status");
+
     if (!($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
 	  || $status eq 'OPEN')) {
 	return '';
     }
+    my $close=&Apache::lonnet::EXT('resource.0.discussend');
+    if (defined($close) && $close ne '' && $close < time) {
+	return ''
+    }
 
     my @bgcols = ("#cccccc","#eeeeee");
     my $discussiononly=0;