Diff for /loncom/interface/lonuserutils.pm between versions 1.103 and 1.104

version 1.103, 2009/11/04 15:35:56 version 1.104, 2009/11/12 15:58:22
Line 1176  sub default_role_selector { Line 1176  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 1350  sub curr_role_permissions { Line 1350  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 3900  sub upfile_drop_add { Line 3904  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.103  
changed lines
  Added in v.1.104


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