Diff for /loncom/auth/lonroles.pm between versions 1.297 and 1.310

version 1.297, 2014/02/23 20:50:37 version 1.310, 2015/03/01 22:21:00
Line 128  package Apache::lonroles; Line 128  package Apache::lonroles;
 use strict;  use strict;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::lonuserstate();  use Apache::lonuserstate();
 use Apache::Constants qw(:common);  use Apache::Constants qw(:common REDIRECT);
 use Apache::File();  use Apache::File();
 use Apache::lonmenu;  use Apache::lonmenu;
 use Apache::loncommon;  use Apache::loncommon;
Line 202  sub handler { Line 202  sub handler {
   
     my $r = shift;      my $r = shift;
   
       # Check for critical messages and redirect if present.
       my ($redirect,$url) = &Apache::loncommon::critical_redirect(300);
       if ($redirect) {
           &Apache::loncommon::content_type($r,'text/html');
           $r->header_out(Location => $url);
           return REDIRECT;
       }
   
     my $now=time;      my $now=time;
     my $then=$env{'user.login.time'};      my $then=$env{'user.login.time'};
     my $refresh=$env{'user.refresh.time'};      my $refresh=$env{'user.refresh.time'};
Line 247  sub handler { Line 255  sub handler {
     my $envkey;      my $envkey;
     my %dcroles = ();      my %dcroles = ();
     my $numdc = &check_fordc(\%dcroles,$update,$then);      my $numdc = &check_fordc(\%dcroles,$update,$then);
     my $loncaparev = $Apache::lonnet::perlvar{'lonVersion'};      my $loncaparev = $r->dir_config('lonVersion');
   
 # ================================================================== Roles Init  # ================================================================== Roles Init
     if ($env{'form.selectrole'}) {      if ($env{'form.selectrole'}) {
Line 278  sub handler { Line 286  sub handler {
     &Apache::lonnet::put('email_status',\%temp);      &Apache::lonnet::put('email_status',\%temp);
     &Apache::lonnet::delenv('user.state.'.$env{'request.course.id'});      &Apache::lonnet::delenv('user.state.'.$env{'request.course.id'});
  }   }
  &Apache::lonnet::appenv({"request.course.id"   => '',   &Apache::lonnet::appenv({"request.course.id"           => '',
  "request.course.fn"   => '',   "request.course.fn"           => '',
  "request.course.uri"  => '',   "request.course.uri"          => '',
  "request.course.sec"  => '',   "request.course.sec"          => '',
                                  "request.course.tied" => '',                                   "request.course.tied"         => '',
  "request.role"        => 'cm',                                   "request.course.timechecked"  => '',
                                  "request.role.adv"    => $env{'user.adv'},   "request.role"                => 'cm',
  "request.role.domain" => $env{'user.domain'}});                                   "request.role.adv"            => $env{'user.adv'},
    "request.role.domain"         => $env{'user.domain'}});
 # Check if user is a DC trying to enter a course or author space and needs privs to be created  # Check if user is a DC trying to enter a course or author space and needs privs to be created
         if ($numdc > 0) {          if ($numdc > 0) {
             foreach my $envkey (keys(%env)) {              foreach my $envkey (keys(%env)) {
Line 374  sub handler { Line 383  sub handler {
                             my %curr_reqd_hash = &Apache::lonnet::userenvironment($cdom,$cnum,'internal.releaserequired');                              my %curr_reqd_hash = &Apache::lonnet::userenvironment($cdom,$cnum,'internal.releaserequired');
                             if ($curr_reqd_hash{'internal.releaserequired'} ne '') {                              if ($curr_reqd_hash{'internal.releaserequired'} ne '') {
                                 my ($switchserver,$switchwarning) =                                  my ($switchserver,$switchwarning) =
                                     &check_release_required($loncaparev,$cdom.'_'.$cnum,$trolecode,$curr_reqd_hash{'internal.releaserequired'});                                      &Apache::loncommon::check_release_required($loncaparev,$cdom.'_'.$cnum,$trolecode,
                                                                                  $curr_reqd_hash{'internal.releaserequired'});
                                 if ($switchwarning ne '' || $switchserver ne '') {                                  if ($switchwarning ne '' || $switchserver ne '') {
                                     &Apache::loncommon::content_type($r,'text/html');                                      &Apache::loncommon::content_type($r,'text/html');
                                     &Apache::loncommon::no_cache($r);                                      &Apache::loncommon::no_cache($r);
                                     $r->send_http_header;                                      $r->send_http_header;
                                     my $end_page=&Apache::loncommon::end_page();                                      $r->print(&Apache::loncommon::check_release_result($switchwarning,$switchserver));
                                     $r->print(&Apache::loncommon::start_page('Selected course unavailable on this server').  
                                               '<p class="LC_warning">');  
                                     if ($switchwarning) {  
                                         $r->print($switchwarning.'<br /><a href="/adm/roles">');  
                                         if (&Apache::loncommon::show_course()) {  
                                             $r->print(&mt('Display courses'));  
                                         } else {  
                                             $r->print(&mt('Display roles'));  
                                         }  
                                         $r->print('</a>');  
                                     } elsif ($switchserver) {  
         $r->print(&mt('This course requires a newer version of LON-CAPA than is installed on this server.').  
                                                   '<br />'.  
                                                   '<a href="/adm/switchserver?'.$switchserver.'">'.  
                                                   &mt('Switch Server').  
                                                   '</a>');  
                                     }  
                                     $r->print('</p>'.&Apache::loncommon::end_page());  
                                     return OK;                                      return OK;
                                 }                                  }
                             }                              }
Line 664  ENDENTERKEY Line 656  ENDENTERKEY
  }   }
     }      }
  }   }
 # Are we allowed to look at the first resource?                                  # Are we allowed to look at the first resource?
  if ($furl !~ m|^/adm/|) {                                  if ($furl =~ m{^(/adm/wrapper|)/ext/}) {
 # Guess not ...                                      # If it's an external resource,
     $furl=&Apache::lonpageflip::first_accessible_resource();                                      # strip off the symb argument and possible query
  }                                      my ($exturl,$symb) = ($furl =~ m{^(.+)(?:\?|\&)symb=(.+)$});
                                       # Unencode $symb
                                       $symb = &unescape($symb);
                                       # Then check for permission
                                       if (!&Apache::lonnet::allowed('bre',$exturl,$symb)) {
                                           $furl = &Apache::lonpageflip::first_accessible_resource();
                                       }
                                   # For other resources just check for permission
                                   } elsif (!&Apache::lonnet::allowed('bre',$furl)) {
                                       $furl = &Apache::lonpageflip::first_accessible_resource();
                                   }
    
                                 $msg = &mt('Entering [_1] ...',                                  $msg = &mt('Entering [_1] ...',
    $env{'course.'.$cdom.'_'.$cnum.'.description'});     $env{'course.'.$cdom.'_'.$cnum.'.description'});
  &redirect_user($r, &mt('Entering [_1]',   &redirect_user($r, &mt('Entering [_1]',
Line 735  ENDENTERKEY Line 738  ENDENTERKEY
   
     my $swinfo=&Apache::lonmenu::rawconfig();      my $swinfo=&Apache::lonmenu::rawconfig();
     my $start_page=&Apache::loncommon::start_page($pagetitle,undef,{bread_crumbs=>$brcrum});      my $start_page=&Apache::loncommon::start_page($pagetitle,undef,{bread_crumbs=>$brcrum});
     my $funcs = &get_roles_functions($showcount);      my %domdefs=&Apache::lonnet::get_domain_defaults($env{'user.domain'}); 
       my $cattype = 'std';
       if ($domdefs{'catauth'}) {
           $cattype = $domdefs{'catauth'};
       }
       my $funcs = &get_roles_functions($showcount,$cattype);
     $standby=~s/\n/\\n/g;      $standby=~s/\n/\\n/g;
     my $noscript='<br /><span class="LC_error">'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'<br />'.&mt('As this is not the case, most functionality in the system will be unavailable.').'</span><br />';      my $noscript='<br /><span class="LC_error">'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'<br />'.&mt('As this is not the case, most functionality in the system will be unavailable.').'</span><br />';
   
Line 878  ENDHEADER Line 886  ENDHEADER
                       \%sortrole,\%roleclass,\%futureroles,\%timezones,$loncaparev);                        \%sortrole,\%roleclass,\%futureroles,\%timezones,$loncaparev);
     $refresh = $now;      $refresh = $now;
     &Apache::lonnet::appenv({'user.refresh.time'  => $refresh});      &Apache::lonnet::appenv({'user.refresh.time'  => $refresh});
     unless ($env{'user.adv'}) {       if ((($cattype eq 'std') || ($cattype eq 'domonly')) && (!$env{'user.adv'})) {
         if ($countactive > 0) {          if ($countactive > 0) {
             my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');              my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');
             my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');               my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&'); 
Line 902  ENDHEADER Line 910  ENDHEADER
   
 # No active roles  # No active roles
     if ($countactive==0) {      if ($countactive==0) {
  if ($inrole) {          &requestcourse_advice($r,$cattype,$inrole); 
     $r->print('<h2>'.&mt('Currently no additional roles, courses or communities').'</h2>');  
  } else {  
     $r->print('<h2>'.&mt('Currently no active roles, courses or communities').'</h2>');  
  }  
         &findcourse_advice($r);  
         &requestcourse_advice($r);   
  $r->print('</form>');   $r->print('</form>');
         if ($countfuture) {          if ($countfuture) {
             $r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture));              $r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture));
Line 1049  ENDHEADER Line 1051  ENDHEADER
         my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');          my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');
         $r->print('<p><small><i>'          $r->print('<p><small><i>'
                  .&mt('This LON-CAPA server is version [_1]',$r->dir_config('lonVersion'))                   .&mt('This LON-CAPA server is version [_1]',$r->dir_config('lonVersion'))
                  .'</i><br />'                   .'</i></small></p>');
                  .'<a href="/adm/logout">'.&mt('Logout').'</a>&nbsp;&nbsp;'  
                  .'<a href="/adm/coursecatalog?showdom='.$esc_dom.'">'  
                  .&mt('Course/Community Catalog')  
                  .'</a></small></p>');  
     }      }
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
     return OK;      return OK;
Line 1137  sub gather_roles { Line 1135  sub gather_roles {
                 if ($role =~ /^cr\//) {                  if ($role =~ /^cr\//) {
                     my ($rdummy,$rdomain,$rauthor,$rrole)=split(/\//,$role);                      my ($rdummy,$rdomain,$rauthor,$rrole)=split(/\//,$role);
                     if ($tremark) { $tremark.='<br />'; }                      if ($tremark) { $tremark.='<br />'; }
                     $tremark.=&mt('Customrole defined by [_1].',$rauthor.':'.$rdomain);                      $tremark.=&mt('Custom role defined by [_1].',$rauthor.':'.$rdomain);
                 }                  }
                 $trole=Apache::lonnet::plaintext($role);                  $trole=Apache::lonnet::plaintext($role);
                 my $ttype;                  my $ttype;
Line 1197  sub gather_roles { Line 1195  sub gather_roles {
                                 my $required = $env{'course.'.$tcourseid.'.internal.releaserequired'};                                  my $required = $env{'course.'.$tcourseid.'.internal.releaserequired'};
                                 if ($required ne '') {                                  if ($required ne '') {
                                     ($switchserver,$switchwarning) =                                       ($switchserver,$switchwarning) = 
                                         &check_release_required($loncaparev,$tcourseid,$trolecode,$required);                                          &Apache::loncommon::check_release_required($loncaparev,$tcourseid,$trolecode,$required);
                                     if ($switchserver || $switchwarning) {                                      if ($switchserver || $switchwarning) {
                                         $button = 0;                                          $button = 0;
                                     }                                      }
Line 1220  sub gather_roles { Line 1218  sub gather_roles {
                                 my $required = $newhash{'internal.releaserequired'};                                  my $required = $newhash{'internal.releaserequired'};
                                 if ($required ne '') {                                  if ($required ne '') {
                                     ($switchserver,$switchwarning) =                                      ($switchserver,$switchwarning) =
                                         &check_release_required($loncaparev,$tcourseid,$trolecode,$required);                                          &Apache::loncommon::check_release_required($loncaparev,$tcourseid,$trolecode,$required);
                                     if ($switchserver || $switchwarning) {                                      if ($switchserver || $switchwarning) {
                                         $button = 0;                                          $button = 0;
                                     }                                      }
Line 1396  sub print_rolerows { Line 1394  sub print_rolerows {
 }  }
   
 sub findcourse_advice {  sub findcourse_advice {
     my ($r) = @_;      my ($r,$cattype) = @_;
     my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');      my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');
     my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');      my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');
     if (&Apache::lonnet::auto_run(undef,$env{'user.domain'})) {      if (&Apache::lonnet::auto_run(undef,$env{'user.domain'})) {
Line 1411  sub findcourse_advice { Line 1409  sub findcourse_advice {
     } else {      } else {
         $r->print(&mt('If you were expecting to see an active role listed for a particular course, that course may not have been created yet.').'<br />');          $r->print(&mt('If you were expecting to see an active role listed for a particular course, that course may not have been created yet.').'<br />');
     }      }
     $r->print('<h3>'.&mt('Self-Enrollment').'</h3>'.      if (($cattype eq 'std') || ($cattype eq 'domonly')) {
               '<p>'.&mt('The [_1]Course/Community Catalog[_2] provides information about all [_3] classes for which LON-CAPA courses have been created, as well as any communities in the domain.','<a href="/adm/coursecatalog?showdom='.$esc_dom.'">','</a>',$domdesc).'<br />');          $r->print('<h3>'.&mt('Self-Enrollment').'</h3>'.
     $r->print(&mt('You can search for courses and communities which permit self-enrollment, if you would like to enroll in one.').'</p>'.                    '<p>'.&mt('The [_1]Course/Community Catalog[_2] provides information about all [_3] classes for which LON-CAPA courses have been created, as well as any communities in the domain.','<a href="/adm/coursecatalog?showdom='.$esc_dom.'">','</a>',$domdesc).'<br />');
               &Apache::loncoursequeueadmin::queued_selfenrollment());          $r->print(&mt('You can search for courses and communities which permit self-enrollment, if you would like to enroll in one.').'</p>'.
           &Apache::loncoursequeueadmin::queued_selfenrollment());
       }
     return;      return;
 }  }
   
 sub requestcourse_advice {  sub requestcourse_advice {
     my ($r) = @_;      my ($r,$cattype,$inrole) = @_;
     my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');      my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');
     my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');      my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');
     my (%can_request,%request_doms);      my (%can_request,%request_doms,$output);
     &Apache::lonnet::check_can_request($env{'user.domain'},\%can_request,\%request_doms);      &Apache::lonnet::check_can_request($env{'user.domain'},\%can_request,\%request_doms);
     if (keys(%request_doms) > 0) {      if (keys(%request_doms) > 0) {
         my ($types,$typename) = &Apache::loncommon::course_types();          my ($types,$typename) = &Apache::loncommon::course_types();
         if ((ref($types) eq 'ARRAY') && (ref($typename) eq 'HASH')) {           if ((ref($types) eq 'ARRAY') && (ref($typename) eq 'HASH')) { 
             $r->print('<h3>'.&mt('Request creation of a course or community').'</h3>'.  
                       '<p>'.&mt('You have rights to request the creation of courses and/or communities in the following domain(s):').'<ul>');  
             my (@reqdoms,@reqtypes);              my (@reqdoms,@reqtypes);
             foreach my $type (sort(keys(%request_doms))) {              foreach my $type (sort(keys(%request_doms))) {
                 push(@reqtypes,$type);                   push(@reqtypes,$type); 
                 if (ref($request_doms{$type}) eq 'ARRAY') {                  if (ref($request_doms{$type}) eq 'ARRAY') {
                     my $domstr = join(', ',map { &Apache::lonnet::domain($_) } sort(@{$request_doms{$type}}));                      my $domstr = join(', ',map { &Apache::lonnet::domain($_) } sort(@{$request_doms{$type}}));
                     $r->print(                      $output .=
                         '<li>'                          '<li>'
                        .&mt('[_1]'.$typename->{$type}.'[_2] in domain: [_3]',                         .&mt('[_1]'.$typename->{$type}.'[_2] in domain: [_3]',
                             '<i>',                              '<i>',
                             '</i>',                              '</i>',
                             '<b>'.$domstr.'</b>')                              '<b>'.$domstr.'</b>')
                        .'</li>'                         .'</li>';
                     );  
                     foreach my $dom (@{$request_doms{$type}}) {                      foreach my $dom (@{$request_doms{$type}}) {
                         unless (grep(/^\Q$dom\E/,@reqdoms)) {                          unless (grep(/^\Q$dom\E/,@reqdoms)) {
                             push(@reqdoms,$dom);                              push(@reqdoms,$dom);
Line 1464  sub requestcourse_advice { Line 1461  sub requestcourse_advice {
             }              }
             if (@reqdoms == 1 || @showtypes > 0) {              if (@reqdoms == 1 || @showtypes > 0) {
                 $requrl .= '&state=crstype&action=new';                  $requrl .= '&state=crstype&action=new';
             }               }
             $r->print('</ul>'.&mt('Use the [_1]request form[_2] to submit a request for creation of a new course or community.','<a href="'.$requrl.'">','</a>').'</p>');              if ($output) {
                   $r->print('<h3>'.&mt('Request creation of a course or community').'</h3>'.
                             '<p>'.
                             &mt('You have rights to request the creation of courses and/or communities in the following domain(s):').
                             '<ul>'.
                             $output.
                             '</ul>'.
                             &mt('Use the [_1]request form[_2] to submit a request for creation of a new course or community.',
                                 '<a href="'.$requrl.'">','</a>').
                             '</p>');
               }
         }          }
       } elsif (!$env{'user.adv'}) {
          if ($inrole) {
               $r->print('<h3>'.&mt('Currently no additional roles, courses or communities').'</h3>');
           } else {
               $r->print('<h3>'.&mt('Currently no active roles, courses or communities').'</h3>');
           }
           &findcourse_advice($r,$cattype);
     }      }
     return;      return;
 }  }
Line 1620  sub check_fordc { Line 1634  sub check_fordc {
     my ($dcroles,$update,$then) = @_;      my ($dcroles,$update,$then) = @_;
     my $numdc = 0;      my $numdc = 0;
     if ($env{'user.adv'}) {      if ($env{'user.adv'}) {
         foreach my $envkey (sort keys %env) {          foreach my $envkey (sort(keys(%env))) {
             if ($envkey=~/^user\.role\.dc\.\/($match_domain)\/$/) {              if ($envkey=~/^user\.role\.dc\.\/($match_domain)\/$/) {
                 my $dcdom = $1;                  my $dcdom = $1;
                 my $livedc = 1;                  my $livedc = 1;
Line 1729  sub check_forcc { Line 1743  sub check_forcc {
     return $is_cc;      return $is_cc;
 }  }
   
 sub check_release_required {  
     my ($loncaparev,$tcourseid,$trolecode,$required) = @_;  
     my ($switchserver,$warning);  
     if ($required ne '') {  
         my ($reqdmajor,$reqdminor) = ($required =~ /^(\d+)\.(\d+)$/);  
         my ($major,$minor) = ($loncaparev =~ /^\'?(\d+)\.(\d+)\.[\w.\-]+\'?$/);  
         if ($reqdmajor ne '' && $reqdminor ne '') {  
             my $otherserver;  
             if (($major eq '' && $minor eq '') ||   
                 (($reqdmajor > $major) || (($reqdmajor == $major) && ($reqdminor > $minor)))) {  
                 my ($userdomserver) = &Apache::lonnet::choose_server($env{'user.domain'});  
                 my $switchlcrev =   
                     &Apache::lonnet::get_server_loncaparev($env{'user.domain'},  
                                                            $userdomserver);  
                 my ($swmajor,$swminor) = ($switchlcrev =~ /^\'?(\d+)\.(\d+)\.[\w.\-]+\'?$/);  
                 if (($swmajor eq '' && $swminor eq '') || ($reqdmajor > $swmajor) ||   
                     (($reqdmajor == $swmajor) && ($reqdminor > $swminor))) {  
                     my $cdom = $env{'course.'.$tcourseid.'.domain'};  
                     if ($cdom ne $env{'user.domain'}) {  
                         my ($coursedomserver,$coursehostname) = &Apache::lonnet::choose_server($cdom);   
                         my $serverhomeID = &Apache::lonnet::get_server_homeID($coursehostname);  
                         my $serverhomedom = &Apache::lonnet::host_domain($serverhomeID);  
                         my %defdomdefaults = &Apache::lonnet::get_domain_defaults($serverhomedom);  
                         my %udomdefaults = &Apache::lonnet::get_domain_defaults($env{'user.domain'});  
                         my $remoterev = &Apache::lonnet::get_server_loncaparev($serverhomedom,$coursedomserver);  
                         my $canhost =  
                             &Apache::lonnet::can_host_session($env{'user.domain'},  
                                                               $coursedomserver,  
                                                               $remoterev,  
                                                               $udomdefaults{'remotesessions'},  
                                                               $defdomdefaults{'hostedsessions'});  
   
                         if ($canhost) {  
                             $otherserver = $coursedomserver;  
                         } else {  
                             $warning = &mt('Requires LON-CAPA version [_1].',$env{'course.'.$tcourseid.'.internal.releaserequired'}).'<br />'. &mt("No suitable server could be found amongst servers in either your own domain or in the course's domain.");  
                         }  
                     } else {  
                         $warning = &mt('Requires LON-CAPA version [_1].',$env{'course.'.$tcourseid.'.internal.releaserequired'}).'<br />'.&mt("No suitable server could be found amongst servers in your own domain (which is also the course's domain).");  
                     }  
                 } else {  
                     $otherserver = $userdomserver;  
                 }  
             }  
             if ($otherserver ne '') {  
                 $switchserver = 'otherserver='.$otherserver.'&amp;role='.$trolecode;  
             }  
         }  
     }  
     return ($switchserver,$warning);  
 }  
   
 sub courselink {  sub courselink {
     my ($dcdom,$rowtype) = @_;      my ($dcdom,$rowtype) = @_;
     my $courseform=&Apache::loncommon::selectcourse_link      my $courseform=&Apache::loncommon::selectcourse_link
Line 2581  sub role_desc { Line 2543  sub role_desc {
     return unless ($role);      return unless ($role);
     if ($role =~ /^cr\//) {      if ($role =~ /^cr\//) {
         my ($rdummy,$rdomain,$rauthor,$rrole)=split(/\//,$role);          my ($rdummy,$rdomain,$rauthor,$rrole)=split(/\//,$role);
         $tremark = &mt('Customrole defined by [_1].',$rauthor.':'.$rdomain);          $tremark = &mt('Custom role defined by [_1].',$rauthor.':'.$rdomain);
     }      }
     $trole=Apache::lonnet::plaintext($role);      $trole=Apache::lonnet::plaintext($role);
     my ($tdom,$trest,$tsection)=      my ($tdom,$trest,$tsection)=
Line 2693  sub is_active_course { Line 2655  sub is_active_course {
 }  }
   
 sub get_roles_functions {  sub get_roles_functions {
     my ($rolescount) = @_;      my ($rolescount,$cattype) = @_;
     my @links;      my @links;
     push(@links,["javascript:rolesView('doupdate');",'start-here-22x22',&mt('Check for changes')]);      push(@links,["javascript:rolesView('doupdate');",'start-here-22x22',&mt('Check for changes')]);
     if ($env{'environment.canrequest.author'}) {      if ($env{'environment.canrequest.author'}) {
Line 2719  sub get_roles_functions { Line 2681  sub get_roles_functions {
             push(@links,["javascript:rolesView('showall');",'edit-undo-22x22',&mt('Include expired')]);              push(@links,["javascript:rolesView('showall');",'edit-undo-22x22',&mt('Include expired')]);
         }          }
     }      }
     if (&Apache::loncommon::designparm('login.coursecatalog',$env{'user.domain'})) {      unless ($cattype eq 'none') {
         push(@links,['/adm/coursecatalog','ccat-22x22',&mt('Course catalog')]);          push(@links,['/adm/coursecatalog','ccat-22x22',&mt('Course catalog')]);
     }      }
     my $funcs = &Apache::lonhtmlcommon::start_funclist();      my $funcs = &Apache::lonhtmlcommon::start_funclist();

Removed from v.1.297  
changed lines
  Added in v.1.310


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