Diff for /loncom/interface/loncreateuser.pm between versions 1.249.2.5 and 1.257

version 1.249.2.5, 2008/07/18 02:15:32 version 1.257, 2008/07/17 20:05:14
Line 1407  sub personal_data_display { Line 1407  sub personal_data_display {
         %userenv = &Apache::lonnet::get('environment',          %userenv = &Apache::lonnet::get('environment',
                    ['firstname','middlename','lastname','generation',                     ['firstname','middlename','lastname','generation',
                     'permanentemail','id'],$ccdomain,$ccuname);                      'permanentemail','id'],$ccdomain,$ccuname);
       }
       if (!$newuser) {
         %canmodify =          %canmodify =
             &Apache::lonuserutils::can_modify_userinfo($context,$ccdomain,              &Apache::lonuserutils::can_modify_userinfo($context,$ccdomain,
                                                        \@userinfo,$rolesarray);                                                         \@userinfo,$rolesarray);
Line 1448  sub personal_data_display { Line 1450  sub personal_data_display {
                     $row .= '<input type="hidden" name="c'.$item.'" value="'.$inst_results->{$item}.'" />'.$inst_results->{$item};                      $row .= '<input type="hidden" name="c'.$item.'" value="'.$inst_results->{$item}.'" />'.$inst_results->{$item};
                 } else {                  } else {
                     if ($context eq 'selfcreate') {                      if ($context eq 'selfcreate') {
                         if ($canmodify{$item}) {                          if ($canmodify{$item}) { 
                             $row .= '<input type="text" name="c'.$item.'" size="'.$textboxsize{$item}.'" value="" />';                              $row .= '<input type="text" name="c'.$item.'" size="'.$textboxsize{$item}.'" value="" />';
                             $editable ++;                              $editable ++;
                         } else {                          } else {
Line 3617  sub visible_in_cat { Line 3619  sub visible_in_cat {
         $cathash = $domconf{'coursecategories'}{'cats'};          $cathash = $domconf{'coursecategories'}{'cats'};
     }      }
     if ($settable{'togglecats'} && $settable{'categories'}) {      if ($settable{'togglecats'} && $settable{'categories'}) {
         $cansetvis = &mt('You are able to both assign a course category and choose to exclude this course from the catalog.');          $cansetvis = &mt('You are able to both assign a course category and choose to exclude this course from the catalog.');   
     } elsif ($settable{'togglecats'}) {      } elsif ($settable{'togglecats'}) {
         $cansetvis = &mt('You are able to choose to exclude this course from the catalog, but only a Domain Coordinator may assign a course category.');          $cansetvis = &mt('You are able to choose to exclude this course from the catalog, but only a Domain Coordinator may assign a course category.'); 
     } elsif ($settable{'categories'}) {      } elsif ($settable{'categories'}) {
         $cansetvis = &mt('You may assign a course category, but only a Domain Coordinator may choose to exclude this course from the catalog.');          $cansetvis = &mt('You may assign a course category, but only a Domain Coordinator may choose to exclude this course from the catalog.');  
     } else {      } else {
         $cansetvis = &mt('Only a Domain Coordinator may assign a course category or choose to exclude this course from the catalog.');          $cansetvis = &mt('Only a Domain Coordinator may assign a course category or choose to exclude this course from the catalog.'); 
     }      }
        
     my %currsettings =      my %currsettings =
         &Apache::lonnet::get('environment',['hidefromcat','categories','internal.coursecode'],          &Apache::lonnet::get('environment',['hidefromcat','categories','internal.coursecode'],
                              $cdom,$cnum);                               $cdom,$cnum);
Line 3635  sub visible_in_cat { Line 3637  sub visible_in_cat {
             $cathash = $domconf{'coursecategories'}{'cats'};              $cathash = $domconf{'coursecategories'}{'cats'};
             if (ref($cathash) eq 'HASH') {              if (ref($cathash) eq 'HASH') {
                 if ($cathash->{'instcode::0'} eq '') {                  if ($cathash->{'instcode::0'} eq '') {
                     push(@vismsgs,'dc_addinst');                      push(@vismsgs,'dc_addinst'); 
                 } else {                  } else {
                     $visible = 1;                      $visible = 1;
                 }                  }
Line 3674  sub visible_in_cat { Line 3676  sub visible_in_cat {
                         }                          }
                     }                      }
                     if (!$matched) {                      if (!$matched) {
                         if ($settable{'categories'}) {                          if ($settable{'categories'}) { 
                             push(@vismsgs,'chgcat');                              push(@vismsgs,'chgcat');
                         } else {                          } else {
                             push(@vismsgs,'dc_chgcat');                              push(@vismsgs,'dc_chgcat');
Line 3685  sub visible_in_cat { Line 3687  sub visible_in_cat {
         }          }
     } else {      } else {
         if (ref($cathash) eq 'HASH') {          if (ref($cathash) eq 'HASH') {
             if ((keys(%{$cathash}) > 1) ||              if ((keys(%{$cathash}) > 1) || 
                 (keys(%{$cathash}) == 1) && ($cathash->{'instcode::0'} eq '')) {                  (keys(%{$cathash}) == 1) && ($cathash->{'instcode::0'} eq '')) {
                 if ($settable{'categories'}) {                  if ($settable{'categories'}) {
                     push(@vismsgs,'addcat');                      push(@vismsgs,'addcat');
Line 4744  sub update_selfenroll_config { Line 4746  sub update_selfenroll_config {
                                 if (@{$types} > 0) {                                  if (@{$types} > 0) {
                                     my @esc_types = map { &escape($_); } @{$types};                                      my @esc_types = map { &escape($_); } @{$types};
                                     $othervalue = 'other';                                      $othervalue = 'other';
                                     $typestr = join(',',(@esc_types,$othervalue));                                      $typestr = join(',',($othervalue,@esc_types));
                                 }                                  }
                                 $typestr = $othervalue;                                  $typestr = $othervalue;
                             } else {                              } else {
Line 4880  sub update_selfenroll_config { Line 4882  sub update_selfenroll_config {
             }              }
             $r->print($cansetvis);              $r->print($cansetvis);
         }          }
     }      } 
     return;      return;
 }  }
   

Removed from v.1.249.2.5  
changed lines
  Added in v.1.257


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