Diff for /loncom/interface/lonuserutils.pm between versions 1.97.2.6 and 1.97.2.7

version 1.97.2.6, 2010/01/20 20:28:40 version 1.97.2.7, 2010/01/20 20:31:19
Line 1177  sub default_role_selector { Line 1177  sub default_role_selector {
     my %customroles;      my %customroles;
     my ($options,$coursepick,$cb_jscript);      my ($options,$coursepick,$cb_jscript);
     if ($context ne 'author') {      if ($context ne 'author') {
         %customroles = &my_custom_roles();          %customroles = &my_custom_roles($crstype);
     }      }
   
     my %lt=&Apache::lonlocal::texthash(      my %lt=&Apache::lonlocal::texthash(
Line 1351  sub curr_role_permissions { Line 1351  sub curr_role_permissions {
 # ======================================================= Existing Custom Roles  # ======================================================= Existing Custom Roles
   
 sub my_custom_roles {  sub my_custom_roles {
       my ($crstype) = @_;
     my %returnhash=();      my %returnhash=();
     my %rolehash=&Apache::lonnet::dump('roles');      my %rolehash=&Apache::lonnet::dump('roles');
     foreach my $key (keys %rolehash) {      foreach my $key (keys(%rolehash)) {
         if ($key=~/^rolesdef\_(\w+)$/) {          if ($key=~/^rolesdef\_(\w+)$/) {
               if ($crstype eq 'Community') {
                   next if ($rolehash{$key} =~ /bre\&S/); 
               }
             $returnhash{$1}=$1;              $returnhash{$1}=$1;
         }          }
     }      }
Line 3903  sub upfile_drop_add { Line 3907  sub upfile_drop_add {
             }              }
         }          }
         my (%curr_rules,%got_rules,%alerts);          my (%curr_rules,%got_rules,%alerts);
         my %customroles = &my_custom_roles();          my %customroles = &my_custom_roles($crstype);
         my @permitted_roles =           my @permitted_roles = 
             &roles_on_upload($context,$setting,$crstype,%customroles);               &roles_on_upload($context,$setting,$crstype,%customroles); 
         # Get new users list          # Get new users list

Removed from v.1.97.2.6  
changed lines
  Added in v.1.97.2.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>