Diff for /loncom/auth/lonroles.pm between versions 1.270 and 1.271

version 1.270, 2012/08/14 15:45:25 version 1.271, 2012/08/14 17:35:04
Line 262  sub handler { Line 262  sub handler {
                                                                             $env{'user.domain'},undef,                                                                              $env{'user.domain'},undef,
                                                                             \@inststatuses,\%domconfig);                                                                              \@inststatuses,\%domconfig);
                     if ($val eq 'automatic') {                      if ($val eq 'automatic') {
                           my $start = $now-1;
                         if (&Apache::lonnet::assignrole($env{'user.domain'},$env{'user.name'},'/'.$env{'user.domain'}.'/',                          if (&Apache::lonnet::assignrole($env{'user.domain'},$env{'user.name'},'/'.$env{'user.domain'}.'/',
                                                         'au',undef,$now,undef,undef,'requestauthor') eq 'ok') {                                                          'au',undef,$start,undef,undef,'requestauthor') eq 'ok') {
                             $reqauthor = '<span class="LC_info">'.                              $reqauthor = '<span class="LC_info">'.
                                          &mt('Access to authoring space has been activated').'</span><br />';                                           &mt('Access to authoring space has been activated').'</span><br />';
                                          &update_session_roles();                                           &update_session_roles();
Line 2071  sub update_session_roles { Line 2072  sub update_session_roles {
         }          }
         if ($env{$envkey} eq '') {          if ($env{$envkey} eq '') {
             my $status_in_db =              my $status_in_db =
                 &curr_role_status($tstart,$tend,$refresh,$now);                  &curr_role_status($tstart,$tend,$now,$now);
                 &gather_roleprivs(\%allroles,\%allgroups,\%userroles,$where,$role,$tstart,$tend,$status_in_db);                  &gather_roleprivs(\%allroles,\%allgroups,\%userroles,$where,$role,$tstart,$tend,$status_in_db);
             if (($role eq 'st') && ($env{'request.role'} =~ m{^\Q$role\E\.\Q/$udom/$uname\E})) {              if (($role eq 'st') && ($env{'request.role'} =~ m{^\Q$role\E\.\Q/$udom/$uname\E})) {
                 if ($status_in_db eq 'active') {                  if ($status_in_db eq 'active') {
Line 2115  sub update_session_roles { Line 2116  sub update_session_roles {
                 my $status_in_env =                  my $status_in_env =
                     &curr_role_status($currstart,$currend,$refresh,$update);                      &curr_role_status($currstart,$currend,$refresh,$update);
                 my $status_in_db =                  my $status_in_db =
                     &curr_role_status($tstart,$tend,$refresh,$now);                      &curr_role_status($tstart,$tend,$now,$now);
                 if ($status_in_env ne $status_in_db) {                  if ($status_in_env ne $status_in_db) {
                     if ($status_in_env eq 'active') {                      if ($status_in_env eq 'active') {
                         if ($role eq 'st') {                          if ($role eq 'st') {

Removed from v.1.270  
changed lines
  Added in v.1.271


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