Diff for /loncom/auth/lonroles.pm between versions 1.41 and 1.46.2.1

version 1.41, 2002/08/21 17:18:08 version 1.46.2.1, 2003/03/19 21:54:32
Line 118  sub handler { Line 118  sub handler {
                          &Apache::loncommon::no_cache($r);                           &Apache::loncommon::no_cache($r);
                          $r->send_http_header;                           $r->send_http_header;
                          my $swinfo=&Apache::lonmenu::rawconfig($r);                           my $swinfo=&Apache::lonmenu::rawconfig($r);
                            my $bodytag=&Apache::loncommon::bodytag('Switching Role');
                          print (<<ENDREDIR);                           print (<<ENDREDIR);
 <head><title>Entering Course</title>  <head><title>Entering Course</title>
 <meta HTTP-EQUIV="Refresh" CONTENT="1; url=$furl">  <meta HTTP-EQUIV="Refresh" CONTENT="1; url=$furl">
 </head>  </head>
 <html>  <html>
 <body bgcolor="#FFFFFF">  $bodytag
 <script>  <script>
 $swinfo  $swinfo
 </script>  </script>
 $msg  <h1>$msg</h1>
 </body>  </body>
 </html>  </html>
 ENDREDIR  ENDREDIR
Line 138  ENDREDIR Line 139  ENDREDIR
             }               } 
         }          }
     }      }
           
   
 # =============================================================== No Roles Init  # =============================================================== No Roles Init
   
Line 149  ENDREDIR Line 150  ENDREDIR
   
     my $swinfo=&Apache::lonmenu::rawconfig($r);      my $swinfo=&Apache::lonmenu::rawconfig($r);
     my $bodytag=&Apache::loncommon::bodytag('User Roles');      my $bodytag=&Apache::loncommon::bodytag('User Roles');
       my $helptag=&Apache::loncommon::help_open_topic("General_Intro","HELP");
     $r->print(<<ENDHEADER);      $r->print(<<ENDHEADER);
 <html>  <html>
 <head>  <head>
 <title>LON-CAPA User Roles</title>  <title>LON-CAPA User Roles</title>
 </head>  </head>
 $bodytag  $bodytag
   $helptag<br />
 <script>  <script>
 $swinfo  $swinfo
 window.focus();  window.focus();
Line 239  ENDHEADER Line 242  ENDHEADER
         my $button = 1;          my $button = 1;
         if ($envkey=~/^user\.role\./) {          if ($envkey=~/^user\.role\./) {
     my (undef,undef,$role,@pwhere)=split(/\./,$envkey);      my (undef,undef,$role,@pwhere)=split(/\./,$envkey);
               next if (!defined($role) || $role eq '');
             my $where=join('.',@pwhere);              my $where=join('.',@pwhere);
             my $trolecode=$role.'.'.$where;              my $trolecode=$role.'.'.$where;
             my ($tstart,$tend)=split(/\./,$ENV{$envkey});              my ($tstart,$tend)=split(/\./,$ENV{$envkey});
Line 323  ENDHEADER Line 327  ENDHEADER
                     my $tcourseid=$tdom.'_'.$trest;                      my $tcourseid=$tdom.'_'.$trest;
                     if ($ENV{'course.'.$tcourseid.'.description'}) {                      if ($ENV{'course.'.$tcourseid.'.description'}) {
                         $twhere=$ENV{'course.'.$tcourseid.'.description'};                          $twhere=$ENV{'course.'.$tcourseid.'.description'};
                           unless ($twhere eq 'Currently not available') {
                              $twhere.=' <font size="-2">'.
           &Apache::loncommon::syllabuswrapper('Syllabus',$trest,$tdom,$tfont).
                                       '</font>';
          }
                     } else {                      } else {
                         my %newhash=Apache::lonnet::coursedescription                          my %newhash=Apache::lonnet::coursedescription
                             ($tcourseid);                              ($tcourseid);
                         if (%newhash) {                          if (%newhash) {
                             $twhere=$newhash{'description'};                              $twhere=$newhash{'description'}.
                                 ' <font size="-2">'.
           &Apache::loncommon::syllabuswrapper('Syllabus',$trest,$tdom,$tfont).
                                 '</font>';
                         } else {                          } else {
                             $twhere='Currently not available';                              $twhere='Currently not available';
                             $ENV{'course.'.$tcourseid.'.description'}=$twhere;                              $ENV{'course.'.$tcourseid.'.description'}=$twhere;
Line 387  ENDHEADER Line 399  ENDHEADER
  $r->print("</form>\n");   $r->print("</form>\n");
     }      }
 # ------------------------------------------------------------ Privileges Info  # ------------------------------------------------------------ Privileges Info
   if ($advanced) {    if (($advanced) && (($ENV{'user.error.msg'}) || ($error))) {
     $r->print('<hr><h2>Current Privileges</h2>');      $r->print('<hr><h2>Current Privileges</h2>');
   
     foreach $envkey (sort keys %ENV) {      foreach $envkey (sort keys %ENV) {

Removed from v.1.41  
changed lines
  Added in v.1.46.2.1


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