Diff for /loncom/interface/loncreateuser.pm between versions 1.365 and 1.371

version 1.365, 2012/08/21 15:43:27 version 1.371, 2012/12/31 15:28:36
Line 111  sub initialize_authen_forms { Line 111  sub initialize_authen_forms {
   
 sub auth_abbrev {  sub auth_abbrev {
     my %abv_auth = (      my %abv_auth = (
                      krb5     => 'krb',                       krb5      => 'krb',
                      krb4     => 'krb',                       krb4      => 'krb',
                      internal => 'int',                       internal  => 'int',
                      localuth => 'loc',                       localauth => 'loc',
                      unix     => 'fsys',                       unix      => 'fsys',
                    );                     );
     return %abv_auth;      return %abv_auth;
 }  }
Line 2432  sub update_user_data { Line 2432  sub update_user_data {
         # If they are creating a new user but have not specified login          # If they are creating a new user but have not specified login
         # information this will be caught below.          # information this will be caught below.
     } else {      } else {
     $r->print($error.&mt('Invalid login mode or password').$end.$rtnlink);                  $r->print($error.&mt('Invalid login mode or password').$end.$rtnlink);
     return;              return;
     }      }
   
     $r->print('<h3>'.&mt('User [_1] in domain [_2]',      $r->print('<h3>'.&mt('User [_1] in domain [_2]',
  $env{'form.ccuname'}, $env{'form.ccdomain'}).'</h3>');                          $env{'form.ccuname'}.' ('.&Apache::loncommon::plainname($env{'form.ccuname'},
     $r->print('<p class="LC_info">'.&mt('Please be patient').'</p>');                          $env{'form.ccdomain'}).')', $env{'form.ccdomain'}).'</h3>');
       my %prog_state = &Apache::lonhtmlcommon::Create_PrgWin($r,2);
   
     my (%alerts,%rulematch,%inst_results,%curr_rules);      my (%alerts,%rulematch,%inst_results,%curr_rules);
     my @userinfo = ('firstname','middlename','lastname','generation','permanentemail','id');      my @userinfo = ('firstname','middlename','lastname','generation','permanentemail','id');
Line 2499  sub update_user_data { Line 2500  sub update_user_data {
                 }                  }
             }              }
         }          }
           &Apache::lonhtmlcommon::Increment_PrgWin($r, \%prog_state);
  # Call modifyuser   # Call modifyuser
  my $result = &Apache::lonnet::modifyuser   my $result = &Apache::lonnet::modifyuser
     ($env{'form.ccdomain'},$env{'form.ccuname'},$env{'form.cid'},      ($env{'form.ccdomain'},$env{'form.ccuname'},$env{'form.cid'},
Line 2588  sub update_user_data { Line 2590  sub update_user_data {
     $r->print($error.&mt('You do not have the authority to modify this users authentification information').'.'.$end);          $r->print($error.&mt('You do not have the authority to modify this users authentification information').'.'.$end);    
  }   }
     }      }
   
     $r->rflush(); # Finish display of header before time consuming actions start      $r->rflush(); # Finish display of header before time consuming actions start
       &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state);
     ##      ##
     my (@userroles,%userupdate,$cnum,$cdom,%namechanged);      my (@userroles,%userupdate,$cnum,$cdom,%namechanged);
     if ($context eq 'course') {      if ($context eq 'course') {
Line 2902  sub update_user_data { Line 2903  sub update_user_data {
                                         $changeHash{'tools.'.$key};                                          $changeHash{'tools.'.$key};
                                 } else {                                  } else {
                                     $newenvhash{'environment.availabletools.'.$key} =                                      $newenvhash{'environment.availabletools.'.$key} =
           &Apache::lonnet::usertools_access($env{'user.name'},$env{'user.domain'},                                            $key,'reload','tools');            &Apache::lonnet::usertools_access($env{'user.name'},$env{'user.domain'},
             $key,'reload','tools');
                                 }                                  }
                             }                              }
                         }                          }
Line 3005  sub update_user_data { Line 3007  sub update_user_data {
                   .&Apache::lonuserutils::print_namespacing_alerts($env{'form.ccdomain'},\%alerts,\%curr_rules)                    .&Apache::lonuserutils::print_namespacing_alerts($env{'form.ccdomain'},\%alerts,\%curr_rules)
                   .'</span>');                    .'</span>');
     }      }
       &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
     if ($env{'form.action'} eq 'singlestudent') {      if ($env{'form.action'} eq 'singlestudent') {
         &enroll_single_student($r,$uhome,$amode,$genpwd,$now,$newuser,$context,$crstype);          &enroll_single_student($r,$uhome,$amode,$genpwd,$now,$newuser,$context,$crstype);
         $r->print('<p><a href="javascript:backPage(document.userupdate)">');          $r->print('<p><a href="javascript:backPage(document.userupdate)">');
Line 3036  sub update_user_data { Line 3039  sub update_user_data {
         if ($env{'form.popup'}) {          if ($env{'form.popup'}) {
             $r->print('<p><a href="javascript:window.close()">'.&mt('Close window').'</a></p>');              $r->print('<p><a href="javascript:window.close()">'.&mt('Close window').'</a></p>');
         } else {          } else {
             $r->print('<p><a href="javascript:backPage(document.userupdate,'."'$env{'form.prevphase'}','modify'".')">'              $r->print('<br />'.&Apache::lonhtmlcommon::actionbox(['<a href="javascript:backPage(document.userupdate,'."'$env{'form.prevphase'}','modify'".')">'
                      .&mt('Modify this user: [_1]','<span class="LC_cusr_emph">'.$env{'form.ccuname'}.':'.$env{'form.ccdomain'}.' ('.$userinfo.')</span>').'</a>'                       .&mt('Modify this user: [_1]','<span class="LC_cusr_emph">'.$env{'form.ccuname'}.':'.$env{'form.ccdomain'}.' ('.$userinfo.')</span>').'</a>',
                      .('&nbsp;'x5).'<a href="javascript:backPage(document.userupdate)">'                       '<a href="javascript:backPage(document.userupdate)">'.&mt('Create/Modify Another User').'</a>']));
                      .&mt('Create/Modify Another User').'</a></p>');  
         }          }
     }      }
 }  }
Line 3084  sub display_userinfo { Line 3086  sub display_userinfo {
     my $title = $lt{'ui'};       my $title = $lt{'ui'}; 
     if ($changed) {      if ($changed) {
         $title = $lt{'uic'};          $title = $lt{'uic'};
     }          $r->print('<h4>'.$title.'</h4>'.
     $r->print('<h4>'.$title.'</h4>'.                  &Apache::loncommon::start_data_table().
               &Apache::loncommon::start_data_table().                  &Apache::loncommon::start_data_table_header_row());
               &Apache::loncommon::start_data_table_header_row());  
     if ($changed) {  
         $r->print("<th>&nbsp;</th>\n");          $r->print("<th>&nbsp;</th>\n");
     }          $r->print('<th><b>'.$lt{'prvs'}.'</b></th>');
     my @userinfo = ('firstname','middlename','lastname','generation','permanentemail','id');          $r->print('<th><span class="LC_nobreak"><b>'.$lt{'chto'}.'</b></span></th>');
     foreach my $item (@userinfo) {          $r->print(&Apache::loncommon::end_data_table_header_row());
         $r->print("<th>$lt{$item}</th>\n");          my @userinfo = ('firstname','middlename','lastname','generation','permanentemail','id');
     }          
     foreach my $entry (@{$order}) {  
         if ($canshow->{$entry}) {  
             if (($entry eq 'requestcourses') || ($entry eq 'reqcrsotherdom')) {  
                 foreach my $item (@{$requestcourses}) {  
                     $r->print("<th>$lt{$item}</th>\n");  
                 }  
             } elsif ($entry eq 'tools') {  
                 foreach my $item (@{$usertools}) {  
                     $r->print("<th>$lt{$item}</th>\n");  
                 }  
             } else {  
                 $r->print("<th>$lt{$entry}</th>\n");  
             }  
         }  
     }  
     $r->print(&Apache::loncommon::end_data_table_header_row().  
              &Apache::loncommon::start_data_table_row());  
     if ($changed) {  
         $r->print('<td><b>'.$lt{'prvs'}.'</b></td>'."\n");  
     }  
     foreach my $item (@userinfo) {  
         $r->print('<td>'.$userenv->{$item}.' </td>'."\n");  
     }  
     foreach my $entry (@{$order}) {  
         if ($canshow->{$entry}) {  
             if (($entry eq 'requestcourses') || ($entry eq 'reqcrsotherdom')) {  
                 foreach my $item (@{$requestcourses}) {  
                     $r->print("<td>$oldsetting->{$item} $oldsettingtext->{$item}</td>\n");  
                 }  
             } elsif ($entry eq 'tools') {  
                 foreach my $item (@{$usertools}) {  
                     $r->print("<td>$oldsetting->{$item} $oldsettingtext->{$item}</td>\n");  
                 }  
             } else {  
                 $r->print("<td>$oldsetting->{$entry} $oldsettingtext->{$entry} </td>\n");  
             }  
         }  
     }  
     $r->print(&Apache::loncommon::end_data_table_row());  
     if ($changed) {  
         $r->print(&Apache::loncommon::start_data_table_row().  
                   '<td><span class="LC_nobreak"><b>'.$lt{'chto'}.'</b></span></td>'."\n");  
         foreach my $item (@userinfo) {          foreach my $item (@userinfo) {
             my $value = $env{'form.c'.$item};              my $value = $env{'form.c'.$item};
             if ($namechangedhash->{$item}) {              #show changes only:
                 $value = '<span class="LC_cusr_emph">'.$value.'</span>';              unless($value eq $userenv->{$item}){
                   $r->print(&Apache::loncommon::start_data_table_row());
   
                   $r->print("<td>$lt{$item}</td>\n");
                   $r->print('<td>'.$userenv->{$item}.' </td>');
                   $r->print("<td>$value </td>\n");
   
                   $r->print(&Apache::loncommon::end_data_table_row());
             }              }
             $r->print("<td>$value </td>\n");  
         }          }
         foreach my $entry (@{$order}) {          foreach my $entry (@{$order}) {
             if ($canshow->{$entry}) {              if ($canshow->{$entry} && ($newsetting->{$entry} ne $newsetting->{$entry})) {
                   $r->print(&Apache::loncommon::start_data_table_row());
                 if (($entry eq 'requestcourses') || ($entry eq 'reqcrsotherdom')) {                  if (($entry eq 'requestcourses') || ($entry eq 'reqcrsotherdom')) {
                     foreach my $item (@{$requestcourses}) {                      foreach my $item (@{$requestcourses}) {
                           $r->print("<td>$lt{$item}</td>\n");
                           $r->print("<td>$oldsetting->{$item} $oldsettingtext->{$item}</td>\n");
                         my $value = $newsetting->{$item}.' '.$newsettingtext->{$item};                          my $value = $newsetting->{$item}.' '.$newsettingtext->{$item};
                         if ($changedhash->{$item}) {                          if ($changedhash->{$item}) {
                             $value = '<span class="LC_cusr_emph">'.$value.'</span>';                              $value = '<span class="LC_cusr_emph">'.$value.'</span>';
Line 3156  sub display_userinfo { Line 3124  sub display_userinfo {
                     }                      }
                 } elsif ($entry eq 'tools') {                  } elsif ($entry eq 'tools') {
                     foreach my $item (@{$usertools}) {                      foreach my $item (@{$usertools}) {
                           $r->print("<td>$lt{$item}</td>\n");
                           $r->print("<td>$oldsetting->{$item} $oldsettingtext->{$item}</td>\n");
                         my $value = $newsetting->{$item}.' '.$newsettingtext->{$item};                          my $value = $newsetting->{$item}.' '.$newsettingtext->{$item};
                         if ($changedhash->{$item}) {                          if ($changedhash->{$item}) {
                             $value = '<span class="LC_cusr_emph">'.$value.'</span>';                              $value = '<span class="LC_cusr_emph">'.$value.'</span>';
Line 3163  sub display_userinfo { Line 3133  sub display_userinfo {
                         $r->print("<td>$value </td>\n");                          $r->print("<td>$value </td>\n");
                     }                      }
                 } else {                  } else {
                       $r->print("<td>$lt{$entry}</td>\n");
                       $r->print("<td>$oldsetting->{$entry} $oldsettingtext->{$entry} </td>\n");
                     my $value = $newsetting->{$entry}.' '.$newsettingtext->{$entry};                      my $value = $newsetting->{$entry}.' '.$newsettingtext->{$entry};
                     if ($changedhash->{$entry}) {                      if ($changedhash->{$entry}) {
                         $value = '<span class="LC_cusr_emph">'.$value.'</span>';                          $value = '<span class="LC_cusr_emph">'.$value.'</span>';
                     }                      }
                     $r->print("<td>$value </td>\n");                      $r->print("<td>$value </td>\n");
                 }                  }
                   $r->print(&Apache::loncommon::end_data_table_row());
             }              }
         }          }
         $r->print(&Apache::loncommon::end_data_table_row());          $r->print(&Apache::loncommon::end_data_table().'<br />');
     }      }
     $r->print(&Apache::loncommon::end_data_table().'<br />');  
     return;      return;
 }  }
   
Line 3370  sub update_roles { Line 3342  sub update_roles {
     &Apache::lonnet::revokerole($env{'form.ccdomain'},      &Apache::lonnet::revokerole($env{'form.ccdomain'},
  $env{'form.ccuname'},   $env{'form.ccuname'},
  $scope,$role,'','',$context);   $scope,$role,'','',$context);
         $r->print(&mt('Revoking [_1] in [_2]: [_3]',                  $r->print(&Apache::lonhtmlcommon::confirm_success(
       $role,$scope,'<b>'.$result.'</b>').'<br />');                              &mt('Revoking [_1] in [_2]',
                                   &Apache::lonnet::plaintext($role),
                                   '"'.&cid_to_cname($scope).'"'),
                                   $result ne "ok").'<br />');
                   if ($result ne "ok") {
                       $r->print(&mt('Error: [_1]',$result).'<br />');
                   }
  if ($role eq 'st') {   if ($role eq 'st') {
     my $result =       my $result = 
                         &Apache::lonuserutils::classlist_drop($scope,                          &Apache::lonuserutils::classlist_drop($scope,
                             $env{'form.ccuname'},$env{'form.ccdomain'},                              $env{'form.ccuname'},$env{'form.ccdomain'},
     $now);      $now);
     $r->print($result);                      $r->print(&Apache::lonhtmlcommon::confirm_success($result));
  }   }
                 if (!grep(/^\Q$role\E$/,@rolechanges)) {                  if (!grep(/^\Q$role\E$/,@rolechanges)) {
                     push(@rolechanges,$role);                      push(@rolechanges,$role);
Line 3385  sub update_roles { Line 3363  sub update_roles {
     }      }
     if ($key=~m{^form\.rev\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}s) {      if ($key=~m{^form\.rev\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}s) {
 # Revoke custom role  # Revoke custom role
  $r->print(&mt('Revoking custom role:').                  my $result = &Apache::lonnet::revokecustomrole(
                       ' '.$4.' by '.$3.':'.$2.' in '.$1.': <b>'.                      $env{'form.ccdomain'},$env{'form.ccuname'},$1,$2,$3,$4,'','',$context);
                       &Apache::lonnet::revokecustomrole($env{'form.ccdomain'},                  $r->print(&Apache::lonhtmlcommon::confirm_success(
   $env{'form.ccuname'},$1,$2,$3,$4,'','',$context).                              &mt('Revoking custom role [_1] by [_2] in [_3]',
  '</b><br />');                                  $4,$3.':'.$2,'"'.&cid_to_cname($1).'"'),
                               $result ne 'ok').'<br />');
                   if ($result ne "ok") {
                       $r->print(&mt('Error: [_1]',$result).'<br />');
                   }
                 if (!grep(/^cr$/,@rolechanges)) {                  if (!grep(/^cr$/,@rolechanges)) {
                     push(@rolechanges,'cr');                      push(@rolechanges,'cr');
                 }                  }
Line 3403  sub update_roles { Line 3385  sub update_roles {
  $env{'form.ccuname'},   $env{'form.ccuname'},
  $scope,$role,$now,0,1,'',   $scope,$role,$now,0,1,'',
                                                 $context);                                                  $context);
         $r->print(&mt('Deleting [_1] in [_2]: [_3]',$role,$scope,                  $r->print(&Apache::lonhtmlcommon::confirm_success(
       '<b>'.$result.'</b>').'<br />');                              &mt('Deleting [_1] in [_2]',
                                   &Apache::lonnet::plaintext($role),
                                   '"'.&cid_to_cname($scope).'"'),
                               $result ne 'ok').'<br />');
                   if ($result ne "ok") {
                       $r->print(&mt('Error: [_1]',$result).'<br />');
                   }
   
  if ($role eq 'st') {   if ($role eq 'st') {
     my $result =       my $result = 
                         &Apache::lonuserutils::classlist_drop($scope,                          &Apache::lonuserutils::classlist_drop($scope,
                             $env{'form.ccuname'},$env{'form.ccdomain'},                              $env{'form.ccuname'},$env{'form.ccdomain'},
     $now);      $now);
     $r->print($result);      $r->print(&Apache::lonhtmlcommon::confirm_success($result));
  }   }
                 if (!grep(/^\Q$role\E$/,@rolechanges)) {                  if (!grep(/^\Q$role\E$/,@rolechanges)) {
                     push(@rolechanges,$role);                      push(@rolechanges,$role);
Line 3419  sub update_roles { Line 3408  sub update_roles {
     if ($key=~m{^form\.del\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) {      if ($key=~m{^form\.del\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) {
                 my ($url,$rdom,$rnam,$rolename) = ($1,$2,$3,$4);                  my ($url,$rdom,$rnam,$rolename) = ($1,$2,$3,$4);
 # Delete custom role  # Delete custom role
                 $r->print(&mt('Deleting custom role [_1] by [_2] in [_3]',                  my $result =
                       $rolename,$rnam.':'.$rdom,$url).': <b>'.                      &Apache::lonnet::assigncustomrole($env{'form.ccdomain'},
                       &Apache::lonnet::assigncustomrole($env{'form.ccdomain'},                          $env{'form.ccuname'},$url,$rdom,$rnam,$rolename,$now,
                          $env{'form.ccuname'},$url,$rdom,$rnam,$rolename,$now,                          0,1,$context);
                          0,1,$context).'</b><br />');                  $r->print(&Apache::lonhtmlcommon::confirm_success(&mt('Deleting custom role [_1] by [_2] in [_3]',
                         $rolename,$rnam.':'.$rdom,'"'.&cid_to_cname($1).'"'),
                         $result ne "ok").'<br />');
                   if ($result ne "ok") {
                       $r->print(&mt('Error: [_1]',$result).'<br />');
                   }
   
                 if (!grep(/^cr$/,@rolechanges)) {                  if (!grep(/^cr$/,@rolechanges)) {
                     push(@rolechanges,'cr');                      push(@rolechanges,'cr');
                 }                  }
Line 3444  sub update_roles { Line 3439  sub update_roles {
                             if ($result eq 'refused' && $logmsg) {                              if ($result eq 'refused' && $logmsg) {
                                 $output = $logmsg;                                  $output = $logmsg;
                             } else {                               } else { 
                                 $output = "Error: $result\n";                                  $output = &mt('Error: [_1]',$result)."\n";
                             }                              }
                         } else {                          } else {
                             $output = &mt('Assigning').' '.$role.' in '.$url.                              $output = &Apache::lonhtmlcommon::confirm_success(&mt('Assigning [_1] in [_2] starting [_3]',&Apache::lonnet::plaintext($role),
                                       &mt('starting').' '.localtime($now).                                          '"'.&cid_to_cname($url).'"',&Apache::lonlocal::locallocaltime($now))).'<br />'.$logmsg.'<br />';
                                       ': <br />'.$logmsg.'<br />'.  
                                       &mt('Add to classlist').': <b>ok</b><br />';  
                         }                          }
                     }                      }
                 } else {                  } else {
     my $result=&Apache::lonnet::assignrole($env{'form.ccdomain'},      my $result=&Apache::lonnet::assignrole($env{'form.ccdomain'},
                                $env{'form.ccuname'},$url,$role,0,$now,'','',                                 $env{'form.ccuname'},$url,$role,0,$now,'','',
                                $context);                                 $context);
     $output = &mt('Re-enabling [_1] in [_2]: [_3]',                          $output = &Apache::lonhtmlcommon::confirm_success(&mt('Re-enabling [_1] in [_2]',
       $role,$url,'<b>'.$result.'</b>').'<br />';                                          &Apache::lonnet::plaintext($role),'"'.&cid_to_cname($url).'"'),$result ne "ok").'<br />';
  }                      if ($result ne "ok") {
                           $output .= &mt('Error: [_1]',$result).'<br />';
                       }
                   }
                 $r->print($output);                  $r->print($output);
                 if (!grep(/^\Q$role\E$/,@rolechanges)) {                  if (!grep(/^\Q$role\E$/,@rolechanges)) {
                     push(@rolechanges,$role);                      push(@rolechanges,$role);
Line 3471  sub update_roles { Line 3467  sub update_roles {
                 my $result = &Apache::lonnet::assigncustomrole(                  my $result = &Apache::lonnet::assigncustomrole(
                                $env{'form.ccdomain'}, $env{'form.ccuname'},                                 $env{'form.ccdomain'}, $env{'form.ccuname'},
                                $url,$rdom,$rnam,$rolename,0,$now,undef,$context);                                 $url,$rdom,$rnam,$rolename,0,$now,undef,$context);
                 $r->print(&mt('Re-enabling custom role [_1] by [_2] in [_3]: [_4]',                  $r->print(&Apache::lonhtmlcommon::confirm_success(
                           $rolename,$rnam.':'.$rdom,$url,'<b>'.$result.'</b>').'<br />');                      &mt('Re-enabling custom role [_1] by [_2] in [_3]',
                           $rolename,$rnam.':'.$rdom,'"'.&cid_to_cname($1).'"'),
                       $result ne "ok").'<br />');
                   if ($result ne "ok") {
                       $r->print(&mt('Error: [_1]',$result).'<br />');
                   }
                 if (!grep(/^cr$/,@rolechanges)) {                  if (!grep(/^cr$/,@rolechanges)) {
                     push(@rolechanges,'cr');                      push(@rolechanges,'cr');
                 }                  }
Line 3692  sub get_defaultquota_text { Line 3693  sub get_defaultquota_text {
 sub update_result_form {  sub update_result_form {
     my ($uhome) = @_;      my ($uhome) = @_;
     my $outcome =       my $outcome = 
     '<form name="userupdate" method="post" />'."\n";      '<form name="userupdate" method="post" action="">'."\n";
     foreach my $item ('srchby','srchin','srchtype','srchterm','srchdomain','ccuname','ccdomain') {      foreach my $item ('srchby','srchin','srchtype','srchterm','srchdomain','ccuname','ccdomain') {
         $outcome .= '<input type="hidden" name="'.$item.'" value="'.$env{'form.'.$item}.'" />'."\n";          $outcome .= '<input type="hidden" name="'.$item.'" value="'.$env{'form.'.$item}.'" />'."\n";
     }      }
Line 4259  sub handler { Line 4260  sub handler {
             if ($env{'form.phase'} eq 'createnewuser') {              if ($env{'form.phase'} eq 'createnewuser') {
                 my $response;                  my $response;
                 if ($env{'form.srchterm'} !~ /^$match_username$/) {                  if ($env{'form.srchterm'} !~ /^$match_username$/) {
                     my $response = &mt('You must specify a valid username. Only the following are allowed: letters numbers - . @');                      my $response =
                           '<span class="LC_warning">'
                          .&mt('You must specify a valid username. Only the following are allowed:'
                              .' letters numbers - . @')
                          .'</span>';
                     $env{'form.phase'} = '';                      $env{'form.phase'} = '';
                     &print_username_entry_form($r,$context,$response,$srch,undef,$crstype,$brcrum);                      &print_username_entry_form($r,$context,$response,$srch,undef,$crstype,$brcrum);
                 } else {                  } else {
Line 4599  function updateCols(caller) { Line 4604  function updateCols(caller) {
         }          }
     }      }
     if (caller == 'showrole') {      if (caller == 'showrole') {
         if (document.studentform.showrole.options[document.studentform.showrole.selectedIndex].value == 'Any') {          if ((document.studentform.showrole.options[document.studentform.showrole.selectedIndex].value == 'Any') ||
               (document.studentform.showrole.options[document.studentform.showrole.selectedIndex].value == 'cr')) {
             document.getElementById('showcolrole').checked = true;              document.getElementById('showcolrole').checked = true;
             document.getElementById('showcolrole').disabled = '';              document.getElementById('showcolrole').disabled = '';
         } else {          } else {
Line 4849  sub print_main_menu { Line 4855  sub print_main_menu {
             );              );
         }          }
     } elsif ($context eq 'author') {      } elsif ($context eq 'author') {
           push(@{ $menu[2]->{items} }, #Category: Administration
             {              {
              linktext => 'Change Log',               linktext => 'Change Log',
              icon => 'document-properties.png',               icon => 'document-properties.png',
Line 4857  sub print_main_menu { Line 4864  sub print_main_menu {
              permission => $permission->{'cusr'},               permission => $permission->{'cusr'},
              linktitle => 'View change log.',               linktitle => 'View change log.',
             },              },
           );
     }      }
     return Apache::lonhtmlcommon::generate_menu(@menu);      return Apache::lonhtmlcommon::generate_menu(@menu);
 #               { text => 'View Log-in History',  #               { text => 'View Log-in History',
Line 6933  sub update_selfenroll_config { Line 6941  sub update_selfenroll_config {
     my ($visible,$cansetvis,$vismsgs,$visactions) = &visible_in_cat($cdom,$cnum);      my ($visible,$cansetvis,$vismsgs,$visactions) = &visible_in_cat($cdom,$cnum);
     if (ref($visactions) eq 'HASH') {      if (ref($visactions) eq 'HASH') {
         if (!$visible) {          if (!$visible) {
             $r->print('<br />'.$visactions->{'miss'}.'<br />'.$visactions->{'yous'}.              $r->print('<br /><span class="LC_warning">'.$visactions->{'miss'}.'</span><br />'.$visactions->{'yous'}.
                       '<br />');                        '<br />');
             if (ref($vismsgs) eq 'ARRAY') {              if (ref($vismsgs) eq 'ARRAY') {
                 $r->print('<br />'.$visactions->{'take'}.'<ul>');                  $r->print('<br />'.$visactions->{'take'}.'<ul>');
Line 6968  sub get_selfenroll_titles { Line 6976  sub get_selfenroll_titles {
 #--------------------------------- functions for &phase_two and &phase_three  #--------------------------------- functions for &phase_two and &phase_three
   
 #--------------------------end of functions for &phase_two and &phase_three  #--------------------------end of functions for &phase_two and &phase_three
   sub cid_to_cname(){
       my $courseid = shift;
       $courseid =~ s/^\///;
       $courseid =~ s/\//_/;
       return $env{'course.'.$courseid.'.description'};
   }
 1;  1;
 __END__  __END__
   

Removed from v.1.365  
changed lines
  Added in v.1.371


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