Diff for /loncom/auth/lonroles.pm between versions 1.78 and 1.81

version 1.78, 2003/12/05 14:18:00 version 1.81, 2003/12/30 22:45:59
Line 77  ENDREDIR Line 77  ENDREDIR
     return;      return;
 }  }
   
   sub authorbombs {
       my ($uname,$udom)=@_;
       my %bombs=&Apache::lonmsg::all_url_author_res_msg($uname,$udom);
       foreach (keys %bombs) {
    if ($_=~/^$udom\/$uname\//) {
       return '<img src="/adm/lonMisc/bomb.gif" />';
    }
       }
       return '';
   }
   
 sub handler {  sub handler {
   
     my $r = shift;      my $r = shift;
Line 238  ENDENTERKEY Line 249  ENDENTERKEY
     my $swinfo=&Apache::lonmenu::rawconfig();      my $swinfo=&Apache::lonmenu::rawconfig();
     my $bodytag=&Apache::loncommon::bodytag('User Roles');      my $bodytag=&Apache::loncommon::bodytag('User Roles');
     my $helptag=&Apache::loncommon::help_open_topic      my $helptag=&Apache::loncommon::help_open_topic
      ("General_Intro","Click here for help");       ("General_Intro",&mt("Click here for help"));
     $r->print(<<ENDHEADER);      $r->print(<<ENDHEADER);
 <html>  <html>
 <head>  <head>
Line 417  ENDHEADER Line 428  ENDHEADER
  ': '.$tdom.'<br />'.   ': '.$tdom.'<br />'.
                         ' '.&mt('Server').':&nbsp;'.$home;                          ' '.&mt('Server').':&nbsp;'.$home;
                     $ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca';                      $ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca';
       $tremark.=&authorbombs($trest,$tdom);
     $sortkey=$role."$trest:$tdom";      $sortkey=$role."$trest:$tdom";
                 } elsif ($role eq 'au') {                  } elsif ($role eq 'au') {
                     # Authors                      # Authors
Line 436  ENDHEADER Line 448  ENDHEADER
                     $twhere=&mt('Domain').': '.$tdom.'<br />'.&mt('Server').                      $twhere=&mt('Domain').': '.$tdom.'<br />'.&mt('Server').
  ':&nbsp;'.$home;   ':&nbsp;'.$home;
                     $ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca';                      $ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca';
       $tremark.=&authorbombs($ENV{'user.name'},$tdom);
     $sortkey=$role;      $sortkey=$role;
                 } elsif ($trest) {                  } elsif ($trest) {
                     $ttype='Course';                      $ttype='Course';
Line 445  ENDHEADER Line 458  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'};
  $sortkey=$tdom."\0".$twhere."\0".$envkey;   $sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey;
                         unless ($twhere eq &mt('Currently not available')) {                          unless ($twhere eq &mt('Currently not available')) {
     $twhere.=' <font size="-2">'.      $twhere.=' <font size="-2">'.
         &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom,$tfont).          &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom,$tfont).
Line 455  ENDHEADER Line 468  ENDHEADER
                         my %newhash=Apache::lonnet::coursedescription                          my %newhash=Apache::lonnet::coursedescription
                             ($tcourseid);                              ($tcourseid);
                         if (%newhash) {                          if (%newhash) {
     $sortkey=$tdom."\0".$newhash{'description'}.      $sortkey=$role."\0".$tdom."\0".$newhash{'description'}.
  "\0".$envkey;   "\0".$envkey;
                             $twhere=$newhash{'description'}.                              $twhere=$newhash{'description'}.
                               ' <font size="-2">'.                                ' <font size="-2">'.
Line 464  ENDHEADER Line 477  ENDHEADER
                         } else {                          } else {
                             $twhere=&mt('Currently not available');                              $twhere=&mt('Currently not available');
                             $ENV{'course.'.$tcourseid.'.description'}=$twhere;                              $ENV{'course.'.$tcourseid.'.description'}=$twhere;
     $sortkey=$tdom."\0".$twhere."\0".$envkey;      $sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey;
                         }                          }
                     }                      }
     if ($role ne 'st') { $twhere.="<br />".&mt('Domain').":".$tdom; }      if ($role ne 'st') { $twhere.="<br />".&mt('Domain').":".$tdom; }
Line 540  ENDHEADER Line 553  ENDHEADER
  if ($output) {   if ($output) {
     if ($doheaders > 0) {      if ($doheaders > 0) {
  $r->print("<tr bgcolor='#BBffBB'>".   $r->print("<tr bgcolor='#BBffBB'>".
   "<td align='center' colspan='7'>$type</td>");    "<td align='center' colspan='7'>".&mt($type)."</td>");
     }      }
     $r->print($output);          $r->print($output);    
  }   }

Removed from v.1.78  
changed lines
  Added in v.1.81


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