--- loncom/interface/lonfeedback.pm 2002/03/26 16:15:34 1.25
+++ loncom/interface/lonfeedback.pm 2010/03/08 17:47:45 1.290
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.25 2002/03/26 16:15:34 www Exp $
+# $Id: lonfeedback.pm,v 1.290 2010/03/08 17:47:45 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -25,24 +25,7 @@
#
# http://www.lon-capa.org/
#
-# (Internal Server Error Handler
-#
-# (Login Screen
-# 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14,
-# 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer)
-#
-# 3/1/1 Gerd Kortemeyer)
-#
-# 3/1,2/3,2/5,2/6,2/8 Gerd Kortemeyer
-# 2/9 Guy Albertelli
-# 2/10 Gerd Kortemeyer
-# 2/13 Guy Albertelli
-# 7/25 Gerd Kortemeyer
-# 7/26 Guy Albertelli
-# 7/26,8/10,10/1,11/5,11/6,12/27,12/29 Gerd Kortemeyer
-# YEAR=2002
-# 1/1,1/16 Gerd Kortemeyer
-#
+###
package Apache::lonfeedback;
@@ -50,171 +33,2636 @@ use strict;
use Apache::Constants qw(:common);
use Apache::lonmsg();
use Apache::loncommon();
+use Apache::lontexconvert();
+use Apache::lonlocal; # must not have ()
+use Apache::lonnet;
+use Apache::lonhtmlcommon();
+use Apache::lonnavmaps;
+use Apache::lonenc();
+use Apache::lonrss();
+use HTML::LCParser();
+#use HTML::Tidy::libXML;
+use Apache::lonspeller();
+use Apache::longroup;
+use Cwd;
+use LONCAPA;
+
+sub discussion_open {
+ my ($status,$symb)=@_;
+ if ($env{'request.role.adv'}) { return 1; }
+ if (defined($status) &&
+ !($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
+ || $status eq 'OPEN')) {
+ return 0;
+ }
+ my $close=&Apache::lonnet::EXT('resource.0.discussend',$symb);
+ if (defined($close) && $close ne '' && $close < time) {
+ return 0;
+ }
+ return 1;
+}
-sub mail_screen {
- my ($r,$feedurl,$options) = @_;
- $r->print(<Feedback
-$feedurl
-