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

www lon-capa-cvs@mail.lon-capa.org
Fri, 25 Oct 2002 13:57:28 -0000


www		Fri Oct 25 09:57:28 2002 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  Toward Bug #728 - has function to evaluate recipient string
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.34 loncom/interface/lonfeedback.pm:1.35
--- loncom/interface/lonfeedback.pm:1.34	Fri Oct 11 16:52:13 2002
+++ loncom/interface/lonfeedback.pm	Fri Oct 25 09:57:28 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.34 2002/10/11 20:52:13 www Exp $
+# $Id: lonfeedback.pm,v 1.35 2002/10/25 13:57:28 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -179,7 +179,7 @@
 sub screen_header {
   my ($feedurl) = @_;
   my $options='';
-  if (($feedurl=~/^\/res/) && ($feedurl!~/^\/res\/adm/)) {
+  if (($feedurl=~/^\/res\//) && ($feedurl!~/^\/res\/adm/)) {
     $options= 
       '<p><input type=checkbox name=author> Feedback to resource author';
   }
@@ -250,6 +250,11 @@
   return ($email,$citations);
 }
 
+sub secapply {
+    my $rec=shift;
+    return $rec;
+}
+
 sub decide_receiver {
   my ($feedurl) = @_;
   my $typestyle='';
@@ -264,7 +269,7 @@
     foreach (split(/\,/,
 		   $ENV{'course.'.$ENV{'request.course.id'}.'.question.email'})
 	     ) {
-      $to{$_}=1;
+	if (my $rec=&secapply($_)) { $to{$rec}=1; }
     } 
   }
   if ($ENV{'form.course'}) {
@@ -272,7 +277,7 @@
     foreach (split(/\,/,
 		   $ENV{'course.'.$ENV{'request.course.id'}.'.comment.email'})
 	     ) {
-      $to{$_}=1;
+	if (my $rec=&secapply($_)) { $to{$rec}=1; }
     } 
   }
   if ($ENV{'form.policy'}) {
@@ -280,7 +285,7 @@
     foreach (split(/\,/,
 		   $ENV{'course.'.$ENV{'request.course.id'}.'.policy.email'})
 	     ) {
-      $to{$_}=1;
+	if (my $rec=&secapply($_)) { $to{$rec}=1; }
     } 
   }
   return ($typestyle,%to);