[LON-CAPA-cvs] cvs: loncom /auth roles.tab rolesplain.tab /interface loncommunicate.pm lonmsgdisplay.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 07 Dec 2006 21:21:13 -0000


albertel		Thu Dec  7 16:21:13 2006 EDT

  Modified files:              
    /loncom/interface	loncommunicate.pm lonmsgdisplay.pm 
    /loncom/auth	roles.tab rolesplain.tab 
  Log:
  - BUG#5070, split 'Display Face to face' abilities away from broadcast message send priviledge.
  
  
  
Index: loncom/interface/loncommunicate.pm
diff -u loncom/interface/loncommunicate.pm:1.37 loncom/interface/loncommunicate.pm:1.38
--- loncom/interface/loncommunicate.pm:1.37	Thu Dec  7 16:06:57 2006
+++ loncom/interface/loncommunicate.pm	Thu Dec  7 16:21:04 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Communicate
 #
-# $Id: loncommunicate.pm,v 1.37 2006/12/07 21:06:57 albertel Exp $
+# $Id: loncommunicate.pm,v 1.38 2006/12/07 21:21:04 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -64,7 +64,7 @@
 	$help{$_}=&Apache::loncommon::help_open_topic($_);
     }
 # ------------------------------------------------------------------------ Menu
-    my ($can_srm,$can_dcm);
+    my ($can_srm,$can_dcm,$can_dff);
     if ($env{'request.course.id'}) {
         if ((&Apache::lonnet::allowed('srm',$env{'request.course.id'})) ||
             (&Apache::lonnet::allowed('srm',$env{'request.course.id'}.'/'.
@@ -76,6 +76,11 @@
                                            $env{'request.course.sec'}))) {
             $can_dcm = 1;
         }
+        if ((&Apache::lonnet::allowed('dff',$env{'request.course.id'})) ||
+            (&Apache::lonnet::allowed('dff',$env{'request.course.id'}.'/'.
+                                           $env{'request.course.sec'}))) {
+            $can_dff = 1;
+        }
     }   
     $r->print(<<END);
 <table cellspacing="10" cellpadding="2">
@@ -88,18 +93,23 @@
 </td>
 </tr>
 END
-    if ($can_srm || !$can_dcm) {
-        $r->print('<tr>');
-    }
     if ($can_srm) {
         $r->print(<<END);
+<tr>
 <td bgcolor="#FFFFAA">
     <b><a href="/adm/email?compose=group">$lt{'bmc'}</a></b>$help{'Course_Broadcast_Message'}
 </td>
 <td bgcolor="#FFFFAA">
   <b><a href="/adm/email?compose=upload">$lt{'dmu'}</a></b>
 </td></tr>
-<tr><td bgcolor="#FFFFAA">
+END
+    }
+    if ($can_dcm || $can_dff) {
+        $r->print('<tr>');
+    }
+    if ($can_dff) {
+        $r->print(<<END);
+<td bgcolor="#FFFFAA">
 <b><a href="/adm/email?recordftf=query">$lt{'unr'}</a></b>$help{'Course_Face_To_Face_Records,Course_Critical_Message'}
 </td>
 END
@@ -110,7 +120,7 @@
   <b><a href="/adm/email?block=display">'.$lt{'cbs'}.'</a></b>
 </td>');
     }
-    if ($can_srm || $can_dcm) {
+    if ($can_dff || $can_dcm) {
         $r->print('</tr>');
     }
     $r->print('</table>');
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.48 loncom/interface/lonmsgdisplay.pm:1.49
--- loncom/interface/lonmsgdisplay.pm:1.48	Thu Dec  7 16:06:57 2006
+++ loncom/interface/lonmsgdisplay.pm	Thu Dec  7 16:21:04 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.48 2006/12/07 21:06:57 albertel Exp $
+# $Id: lonmsgdisplay.pm,v 1.49 2006/12/07 21:21:04 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1338,8 +1338,8 @@
     my ($user,$domain)=@_;
     my $target=$env{'form.grade_target'};
     if (! $env{'request.course.id'}) { return; }
-    if (! &Apache::lonnet::allowed('srm',$env{'request.course.id'})
-	&& ! &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
+    if (! &Apache::lonnet::allowed('dff',$env{'request.course.id'})
+	&& ! &Apache::lonnet::allowed('dff',$env{'request.course.id'}.
 				      '/'.$env{'request.course.sec'})) {
 	return;
     }
@@ -1365,8 +1365,8 @@
     my ($r,$user,$domain)=@_;
     my $target=$env{'form.grade_target'};
     unless ($env{'request.course.id'}) { return; }
-    if  (!&Apache::lonnet::allowed('srm',$env{'request.course.id'})
-	 && ! &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
+    if  (!&Apache::lonnet::allowed('dff',$env{'request.course.id'})
+	 && ! &Apache::lonnet::allowed('dff',$env{'request.course.id'}.
 				       '/'.$env{'request.course.sec'})) {
 	$r->print('Not allowed');
 	return;
@@ -1447,8 +1447,8 @@
 
 sub facetoface {
     my ($r,$stage)=@_;
-    if (!&Apache::lonnet::allowed('srm',$env{'request.course.id'})
-	&& ! &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
+    if (!&Apache::lonnet::allowed('dff',$env{'request.course.id'})
+	&& ! &Apache::lonnet::allowed('dff',$env{'request.course.id'}.
 				      '/'.$env{'request.course.sec'})) {
 	$r->print('Not allowed');
 	return;
Index: loncom/auth/roles.tab
diff -u loncom/auth/roles.tab:1.51 loncom/auth/roles.tab:1.52
--- loncom/auth/roles.tab:1.51	Wed Nov 29 02:46:41 2006
+++ loncom/auth/roles.tab	Thu Dec  7 16:21:11 2006
@@ -2,7 +2,7 @@
 dc:s bre:sma:adv:mcr:srm
 dc:d cli&UIK:cau&UIK:cca&UIK:caa&UIK:cdg&UIK:mau:ccc&U:cin&UIK:cta&UIK:cep&UIK:ccr&UIK:cst&UIK:cad&UIK:csc&UIK:dro:mky:psa:usc:mpq
 cc:s bre:sma:mcr:vsa:adv:vcl
-cc:c cin&IK:cta&IK:cep&IK:ccr&IK:cst&IK:are:cre:ere:vgr:gan:dcm:evb:srm:opa:mgr:mqg:mgq:rin:pch:plc:mdc:usc:vsa:vcl:mdg:vcg:pav:pfo:whn
+cc:c cin&IK:cta&IK:cep&IK:ccr&IK:cst&IK:are:cre:ere:vgr:gan:dcm:evb:srm:dff:opa:mgr:mqg:mgq:rin:pch:plc:mdc:usc:vsa:vcl:mdg:vcg:pav:pfo:whn
 in:s sma:vgr:adv:vcl
 in:c vgr:mgr:mqg:mgq:gan:dcm:evb:srm:pch&C:plc&C:dch:pac:rin:las:opa:bre:vcl:vcg:pav:pfo:whn
 ta:d sma
@@ -12,7 +12,7 @@
 ep:c bre&R:mgr&R:mqg&R:dcm:evb:las:pav:pfo
 cr:s adv&SR:bre&S
 cr:d sma
-cr:c bre&R:vgr&SCR:mgr&SCR:mqg&SCR:mgq&SCR:gan&SCR:dcm&SC:evb&SC:srm&SC:pch:plc:dch&S:pac:rin&S:las&SR:opa&SR:mdc&SR:cst&IK:pav&C:pfo&C:whn&C
+cr:c bre&R:vgr&SCR:mgr&SCR:mqg&SCR:mgq&SCR:gan&SCR:dcm&SC:evb&SC:srm&SC:dff&SC:pch:plc:dch&S:pac:rin&S:las&SR:opa&SR:mdc&SR:cst&IK:pav&C:pfo&C:whn&C
 st:d sma&L
 st:c bre&RXL:pch&CL:plc&CL:pac&CL
 ad:s adv
Index: loncom/auth/rolesplain.tab
diff -u loncom/auth/rolesplain.tab:1.29 loncom/auth/rolesplain.tab:1.30
--- loncom/auth/rolesplain.tab:1.29	Wed Nov 29 02:46:41 2006
+++ loncom/auth/rolesplain.tab	Thu Dec  7 16:21:11 2006
@@ -62,6 +62,7 @@
 evb:Evade communication blocking
 sma:Send internal email
 srm:Send broadcast and receipt-required email
+dff:Create User Notes, Display all User's Notes, Face-to-Face, Critical Messages, Broadcast Messages
 mdc:Edit/Modify DOCS
 pch:Post discussion on course resources
 plc:Post to live chatrooms