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

www lon-capa-cvs@mail.lon-capa.org
Wed, 13 Aug 2003 15:57:51 -0000


www		Wed Aug 13 11:57:51 2003 EDT

  Modified files:              
    /loncom/interface	lonmsg.pm 
  Log:
  Bug #1766: be able to broadcast messages to roles other than student
  
  
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.60 loncom/interface/lonmsg.pm:1.61
--- loncom/interface/lonmsg.pm:1.60	Tue Aug 12 16:12:05 2003
+++ loncom/interface/lonmsg.pm	Wed Aug 13 11:57:51 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.60 2003/08/12 20:12:05 www Exp $
+# $Id: lonmsg.pm,v 1.61 2003/08/13 15:57:51 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -503,6 +503,19 @@
 <input type=button onClick="uncheckall()" value="Check for None">
 <p>
 ENDDISHEADER
+    my %coursepersonnel=
+       &Apache::lonnet::get_course_adv_roles();
+    foreach my $role (sort keys %coursepersonnel) {
+       foreach (split(/\,/,$coursepersonnel{$role})) {
+	   my ($puname,$pudom)=split(/\:/,$_);
+	   $r->print(
+             '<br /><input type="checkbox" name="send_to_&&&&&&_'.
+             $puname.':'.$pudom.'" /> '.
+		     &Apache::loncommon::plainname($puname,
+                          $pudom).' ('.$_.'), <i>'.$role.'</i>');
+	}
+    }
+
     foreach (sort keys %courselist) {
         my ($end,$start)=split(/\:/,$courselist{$_});
         my $active=1;