Diff for /loncom/auth/lonroles.pm between versions 1.9 and 1.10

version 1.9, 2000/10/02 21:34:58 version 1.10, 2000/10/04 14:09:01
Line 16  use Apache::Constants qw(:common); Line 16  use Apache::Constants qw(:common);
 use Apache::File();  use Apache::File();
   
 sub handler {  sub handler {
     my $r = shift;  
     $r->content_type('text/html');  
     $r->send_http_header;  
     return OK if $r->header_only;  
   
 # ---------------------------------------------------------------- Print Header      my $r = shift;
     $r->print(<<ENDHEADER);  
 <html>  
 <head>  
 <title>LON-CAPA User Roles</title>  
 ENDHEADER  
     if ($ENV{'form.orgurl'}) {  
        $r->print('<meta HTTP-EQUIV="Refresh" CONTENT="1; url='.  
                 $ENV{'form.orgurl'}.'">');  
     }  
     $r->print('</head><body bgcolor="#FFFFFF">');  
   
     my $now=time;      my $now=time;
     my $then=$ENV{'user.login.time'};      my $then=$ENV{'user.login.time'};
     my $envkey;      my $envkey;
   
   
 # ================================================================== Roles Init  # ================================================================== Roles Init
   
     if ($ENV{'form.selectrole'}) {      if ($ENV{'form.selectrole'}) {
Line 62  ENDHEADER Line 49  ENDHEADER
                    my ($cdom,$cnum)=split(/\//,$where);                     my ($cdom,$cnum)=split(/\//,$where);
                    if ($cnum) {                     if ($cnum) {
       &Apache::lonuserstate::readmap($where);        &Apache::lonuserstate::readmap($where);
                       $r->print('<h1>Role initialized</h1></body></html>');                        $r->internal_redirect($ENV{'form.orgurl'});
                       return OK;                        return OK;
                    }                     }
                }                 }
             }               } 
   }    }
         }          }
           
         $r->print('<h1>Role not active</h1></body></html>');  
  return OK;  
     }      }
           
   
 # =============================================================== No Roles Init  # =============================================================== No Roles Init
   
       $r->content_type('text/html');
       $r->send_http_header;
       return OK if $r->header_only;
   
       $r->print(<<ENDHEADER);
   <html>
   <head>
   <title>LON-CAPA User Roles</title>
   </head><body bgcolor="#FFFFFF">
   ENDHEADER
   
 # ------------------------------------------ Get Error Message from Environment  # ------------------------------------------ Get Error Message from Environment
   
     my ($fn,$priv,$nochoose,$error,$msg)=split(/:/,$ENV{'user.error.msg'});      my ($fn,$priv,$nochoose,$error,$msg)=split(/:/,$ENV{'user.error.msg'});

Removed from v.1.9  
changed lines
  Added in v.1.10


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