Diff for /loncom/interface/lonuserutils.pm between versions 1.97.2.25 and 1.130

version 1.97.2.25, 2010/11/15 18:50:37 version 1.130, 2010/11/09 14:00:28
Line 589  END Line 589  END
 ###############################################################  ###############################################################
 sub upload_manager_javascript_forward_associate {  sub upload_manager_javascript_forward_associate {
     my ($can_assign) = @_;      my ($can_assign) = @_;
     my ($auth_update,$numbuttons,$argreset);      my $auth_update;
     if (ref($can_assign) eq 'HASH') {      if (ref($can_assign) eq 'HASH') {
         if ($can_assign->{'krb4'} || $can_assign->{'krb5'}) {          if (keys(%{$can_assign}) > 1) {
             $argreset .= "      vf.krbarg.value='';\n";  
             $numbuttons ++ ;  
         }  
         if ($can_assign->{'int'}) {  
             $argreset .= "      vf.intarg.value='';\n";  
             $numbuttons ++;  
         }  
         if ($can_assign->{'loc'}) {  
             $argreset .= "      vf.locarg.value='';\n";  
             $numbuttons ++;  
         }  
         if (!$can_assign->{'int'}) {  
             my $warning = &mt('You may not specify an initial password for each user, as this is only available when new users use LON-CAPA internal authentication.\n').  
                           &mt('Your current role does not have rights to create users with that authentication type.');  
             $auth_update = <<"END";  
    // Currently the initial password field is only supported for internal auth  
    // (see bug 6368).  
    if (nw==9) {  
        eval('vf.f'+tf+'.selectedIndex=0;')  
        alert('$warning');  
    }  
 END  
         } elsif ($numbuttons > 1) {  
             $auth_update = <<"END";              $auth_update = <<"END";
    // If we set the password, make the password form below correspond to     // If we set the password, make the password form below correspond to
    // the new value.     // the new value.
    if (nw==9) {     if (nw==9) {
       changed_radio('int',document.studentform);        changed_radio('int',document.studentform);
       set_auth_radio_buttons('int',document.studentform);        set_auth_radio_buttons('int',document.studentform);
 $argreset  
    }  
   
 END  END
         }          }
           if ($can_assign->{'krb4'} || $can_assign->{'krb5'}) {
              $auth_update .= "      vf.krbarg.value='';\n";
           }
           if ($can_assign->{'int'}) {
              $auth_update .= "      vf.intarg.value='';\n";
           }
           if ($can_assign->{'loc'}) {
              $auth_update .= "      vf.locarg.value='';\n";
           }
           $auth_update .= "
      }\n";
     }      }
   
     return(<<ENDPICK);      return(<<ENDPICK);
Line 723  ENDPICK Line 708  ENDPICK
 ###############################################################  ###############################################################
 sub upload_manager_javascript_reverse_associate {  sub upload_manager_javascript_reverse_associate {
     my ($can_assign) = @_;      my ($can_assign) = @_;
     my ($auth_update,$numbuttons,$argreset);      my $auth_update; 
     if (ref($can_assign) eq 'HASH') {      if (ref($can_assign) eq 'HASH') {
         if ($can_assign->{'krb4'} || $can_assign->{'krb5'}) {          if (keys(%{$can_assign}) > 1) {
             $argreset .= "      vf.krbarg.value='';\n";  
             $numbuttons ++ ;  
         }  
         if ($can_assign->{'int'}) {  
             $argreset .= "      vf.intarg.value='';\n";  
             $numbuttons ++;  
         }  
         if ($can_assign->{'loc'}) {  
             $argreset .= "      vf.locarg.value='';\n";  
             $numbuttons ++;  
         }  
         if (!$can_assign->{'int'}) {  
             my $warning = &mt('You may not specify an initial password, as this is only available when new users use LON-CAPA internal authentication.\n').  
                           &mt('Your current role does not have rights to create users with that authentication type.');  
             $auth_update = <<"END";  
    // Currently the initial password field is only supported for internal auth  
    // (see bug 6368).  
    if (tf==8 && nw!=0) {  
        eval('vf.f'+tf+'.selectedIndex=0;')  
        alert('$warning');  
    }  
 END  
         } elsif ($numbuttons > 1) {  
             $auth_update = <<"END";              $auth_update = <<"END";
    // initial password specified, pick internal authentication     // initial password specified, pick internal authentication
    if (tf==8 && nw!=0) {     if (tf==8 && nw!=0) {
       changed_radio('int',document.studentform);        changed_radio('int',document.studentform);
       set_auth_radio_buttons('int',document.studentform);        set_auth_radio_buttons('int',document.studentform);
 $argreset  
    }  
   
 END  END
         }          }
           if ($can_assign->{'krb'}) {      
              $auth_update .= "      vf.krbarg.value='';\n";
           }
           if ($can_assign->{'int'}) {
              $auth_update .= "      vf.intarg.value='';\n";
           }
           if ($can_assign->{'loc'}) {
              $auth_update .= "      vf.locarg.value='';\n";
           }
           $auth_update .= "
      }\n";
     }      }
   
     return(<<ENDPICK);      return(<<ENDPICK);
 function verify(vf,sec_caller) {  function verify(vf,sec_caller) {
     var founduname=0;      var founduname=0;
Line 768  function verify(vf,sec_caller) { Line 737  function verify(vf,sec_caller) {
     var foundname=0;      var foundname=0;
     var foundid=0;      var foundid=0;
     var foundsec=0;      var foundsec=0;
     var foundemail=0;  
     var foundrole=0;      var foundrole=0;
     var founddomain=0;      var founddomain=0;
     var foundinststatus=0;      var foundinststatus=0;
Line 1517  sub print_userlist { Line 1485  sub print_userlist {
         return;          return;
     }      }
     if (!(($context eq 'domain') &&       if (!(($context eq 'domain') && 
         (($env{'form.roletype'} eq 'course') || ($env{'form.roletype'} eq 'community')))) {            (($env{'form.roletype'} eq 'course') || ($env{'form.roletype'} eq 'community')))) {
         $r->print(          $r->print(
             "\n</p>\n"              "\n</p>\n"
            .'<p>'             .'<p>'
Line 1528  sub print_userlist { Line 1496  sub print_userlist {
     my ($indexhash,$keylist) = &make_keylist_array();      my ($indexhash,$keylist) = &make_keylist_array();
     my (%userlist,%userinfo,$clearcoursepick);      my (%userlist,%userinfo,$clearcoursepick);
     if (($context eq 'domain') &&       if (($context eq 'domain') && 
         ($env{'form.roletype'} eq 'course') ||          ($env{'form.roletype'} eq 'course') || 
         ($env{'form.roletype'} eq 'community')) {          ($env{'form.roletype'} eq 'community')) {
         my ($crstype,$numcodes,$title,$warning);          my ($crstype,$numcodes,$title,$warning);
         if ($env{'form.roletype'} eq 'course') {          if ($env{'form.roletype'} eq 'course') {
Line 1542  sub print_userlist { Line 1510  sub print_userlist {
             $title = &mt('Select Communities');              $title = &mt('Select Communities');
             $warning = &mt('Warning: data retrieval for multiple communities can take considerable time, as this operation is not currently optimized.');              $warning = &mt('Warning: data retrieval for multiple communities can take considerable time, as this operation is not currently optimized.');
         }          }
           my @standardnames = &Apache::loncommon::get_standard_codeitems();
         my $courseform =          my $courseform =
             &Apache::lonhtmlcommon::course_selection($formname,$numcodes,              &Apache::lonhtmlcommon::course_selection($formname,$numcodes,
                             $codetitles,$idlist,$idlist_titles,$crstype);                              $codetitles,$idlist,$idlist_titles,$crstype,
                               \@standardnames);
         $r->print('<p>'.&Apache::lonhtmlcommon::start_pick_box()."\n".          $r->print('<p>'.&Apache::lonhtmlcommon::start_pick_box()."\n".
                   &Apache::lonhtmlcommon::start_pick_box()."\n".                    &Apache::lonhtmlcommon::start_pick_box()."\n".
                   &Apache::lonhtmlcommon::row_title($title,'LC_oddrow_value')."\n".                    &Apache::lonhtmlcommon::row_title($title,'LC_oddrow_value')."\n".
Line 1762  sub role_filter { Line 1732  sub role_filter {
         $role_select .= '</select>';          $role_select .= '</select>';
         $output = '<label><span class="LC_nobreak">'          $output = '<label><span class="LC_nobreak">'
                  .&mt('Role: [_1]',$role_select)                   .&mt('Role: [_1]',$role_select)
                  .'</span></label>';                   .'</span></label> ';
     }      }
     return $output;      return $output;
 }  }
Line 1993  function setCourseCat(formname) { Line 1963  function setCourseCat(formname) {
     if (formname.Year.options[formname.Year.selectedIndex].value == -1) {      if (formname.Year.options[formname.Year.selectedIndex].value == -1) {
         return;          return;
     }      }
     courseSet('Year');      courseSet('$codetitles[0]');
     for (var j=0; j<formname.Semester.length; j++) {      for (var j=0; j<formname.Semester.length; j++) {
         if (formname.Semester.options[j].value == "$env{'form.Semester'}") {          if (formname.Semester.options[j].value == "$env{'form.Semester'}") {
             formname.Semester.options[j].selected = true;              formname.Semester.options[j].selected = true;
Line 2002  function setCourseCat(formname) { Line 1972  function setCourseCat(formname) {
     if (formname.Semester.options[formname.Semester.selectedIndex].value == -1) {      if (formname.Semester.options[formname.Semester.selectedIndex].value == -1) {
         return;          return;
     }      }
     courseSet('Semester');      courseSet('$codetitles[1]');
     for (var j=0; j<formname.Department.length; j++) {      for (var j=0; j<formname.Department.length; j++) {
         if (formname.Department.options[j].value == "$env{'form.Department'}") {            formname.Department.options[j].selected = true;          if (formname.Department.options[j].value == "$env{'form.Department'}") {            formname.Department.options[j].selected = true;
         }          }
Line 2010  function setCourseCat(formname) { Line 1980  function setCourseCat(formname) {
     if (formname.Department.options[formname.Department.selectedIndex].value == -1) {      if (formname.Department.options[formname.Department.selectedIndex].value == -1) {
         return;          return;
     }      }
     courseSet('Department');      courseSet('$codetitles[2]');
     for (var j=0; j<formname.Number.length; j++) {      for (var j=0; j<formname.Number.length; j++) {
         if (formname.Number.options[j].value == "$env{'form.Number'}") {          if (formname.Number.options[j].value == "$env{'form.Number'}") {
             formname.Number.options[j].selected = true;              formname.Number.options[j].selected = true;
Line 2347  END Line 2317  END
             push(@cols,'section');              push(@cols,'section');
         }          }
         if (!($context eq 'domain' && ($env{'form.roletype'} eq 'course')          if (!($context eq 'domain' && ($env{'form.roletype'} eq 'course')
                               && ($env{'form.roletype'} eq 'community'))) {                                && ($env{'form.roletype'} eq 'community'))) { 
             push(@cols,('start','end'));              push(@cols,('start','end'));
         }          }
         if ($env{'form.showrole'} eq 'Any' || $env{'form.showrole'} eq 'cr') {          if ($env{'form.showrole'} eq 'Any' || $env{'form.showrole'} eq 'cr') {
Line 2358  END Line 2328  END
                                     $env{'form.roletype'} eq 'community')) {                                      $env{'form.roletype'} eq 'community')) {
             push (@cols,'extent');              push (@cols,'extent');
         }          }
         if (($statusmode eq 'Any') &&          if (($statusmode eq 'Any') && 
             (!($context eq 'domain' && (($env{'form.roletype'} eq 'course')              (!($context eq 'domain' && (($env{'form.roletype'} eq 'course')
              || ($env{'form.roletype'} eq 'community'))))) {               || ($env{'form.roletype'} eq 'community'))))) {
             push(@cols,'status');              push(@cols,'status');
Line 2379  END Line 2349  END
     if ($mode ne 'autoenroll') {      if ($mode ne 'autoenroll') {
         $results_description = &results_header_row($rolefilter,$statusmode,          $results_description = &results_header_row($rolefilter,$statusmode,
                                                    $context,$permission,$mode,$crstype);                                                     $context,$permission,$mode,$crstype);
   
         $r->print('<b>'.$results_description.'</b><br /><br />');          $r->print('<b>'.$results_description.'</b><br /><br />');
     }      }
     my ($output,$actionselect,%canchange,%canchangesec);      my ($output,$actionselect,%canchange,%canchangesec);
Line 2401  END Line 2370  END
 END  END
             if ($actionselect) {              if ($actionselect) {
                 $output .= <<"END";                  $output .= <<"END";
 <div class="LC_left_float"><fieldset><legend><b>$lt{'ac'}</b></legend>  <div class="LC_left_float"><fieldset><legend>$lt{'ac'}</legend>
 $actionselect  $actionselect
 <br/><br /><input type="button" value="$lt{'ca'}" onclick="javascript:checkAll(document.$formname.actionlist)" /> &nbsp;  <br/><br /><input type="button" value="$lt{'ca'}" onclick="javascript:checkAll(document.$formname.actionlist)" /> &nbsp;
 <input type="button" value="$lt{'ua'}" onclick="javascript:uncheckAll(document.$formname.actionlist)" /><br /><input type="button" value="$lt{'pr'}" onclick="javascript:verify_action('actionlist')" /></fieldset></div>  <input type="button" value="$lt{'ua'}" onclick="javascript:uncheckAll(document.$formname.actionlist)" /><br /><input type="button" value="$lt{'pr'}" onclick="javascript:verify_action('actionlist')" /></fieldset></div>
Line 2446  END Line 2415  END
                     }                      }
                 }                  }
             }              }
             $output .= '<div class="LC_left_float"><fieldset><legend><b>'.$lt{'link'}.'</b></legend>'.              $output .= '<div class="LC_left_float"><fieldset><legend>'.$lt{'link'}.'</legend>'.
                        '<table><tr>';                         '<table><tr>';
             my @linkdests = ('aboutme');              my @linkdests = ('aboutme');
             if ($permission->{'cusr'}) {              if ($permission->{'cusr'}) {
Line 2457  END Line 2426  END
                                          $env{'request.course.sec'})) {                                           $env{'request.course.sec'})) {
                 push(@linkdests,'track');                  push(@linkdests,'track');
             }              }
   
             $output .= '<td>';              $output .= '<td>';
             my $usernamelink = $env{'form.usernamelink'};              my $usernamelink = $env{'form.usernamelink'};
             if ($usernamelink eq '') {              if ($usernamelink eq '') {
Line 2473  END Line 2443  END
             if ($env{'form.userwin'}) {              if ($env{'form.userwin'}) {
                 $checkwin = ' checked="checked"';                  $checkwin = ' checked="checked"';
             }              }
             $output .= '</td><td valign="top" style="border-left: 1px solid;><span class="LC_nobreak"><input type="checkbox" name="userwin" value="1"'.$checkwin.' />'.$lt{'owin'}.'</span></td></tr></table></fieldset></div>';              $output .= '</td><td valign="top"  style="border-left: 1px solid;"><span class="LC_nobreak"><input type="checkbox" name="userwin" value="1"'.$checkwin.' />'.$lt{'owin'}.'</span></td></tr></table></fieldset></div>';
         }          }
         $output .= "\n".'<div class="LC_clear_float_footer">&nbsp;</div>'."\n".          $output .= "\n".'<div class="LC_clear_float_footer">&nbsp;</div>'."\n".
                   &Apache::loncommon::start_data_table().                    &Apache::loncommon::start_data_table().
Line 2726  END Line 2696  END
         if ($clickers!~/\w/) { $clickers='-'; }          if ($clickers!~/\w/) { $clickers='-'; }
         $in{'clicker'} = $clickers;           $in{'clicker'} = $clickers; 
  my $role = $in{'role'};   my $role = $in{'role'};
         $in{'role'}=&Apache::lonnet::plaintext($sdata->[$index{'role'}],$crstype);           $in{'role'}=&Apache::lonnet::plaintext($sdata->[$index{'role'}],$crstype);
         if (! defined($in{'start'}) || $in{'start'} == 0) {          if (! defined($in{'start'}) || $in{'start'} == 0) {
             $in{'start'} = &mt('none');              $in{'start'} = &mt('none');
         } else {          } else {
Line 3245  ENDJS Line 3215  ENDJS
                  chse => 'Changes in section affiliation to apply to selected users',                   chse => 'Changes in section affiliation to apply to selected users',
                  fors => 'For student roles, changing the section will result in a section switch as students may only be in one section of a course at a time.',                   fors => 'For student roles, changing the section will result in a section switch as students may only be in one section of a course at a time.',
                  forn => 'For a course role that is not "student", users may have roles in more than one section at a time.',                   forn => 'For a course role that is not "student", users may have roles in more than one section at a time.',
                  reta => "Retain each user's current section affiliations?",                    reta => "Retain each user's current section affiliations?",
                  dnap => '(Does not apply to student roles).',                   dnap => '(Does not apply to student roles).',
             );              );
     my ($date_items,$headertext);      my ($date_items,$headertext);
Line 3478  sub results_header_row { Line 3448  sub results_header_row {
             }              }
         } elsif (($env{'form.roletype'} eq 'course') ||           } elsif (($env{'form.roletype'} eq 'course') || 
                  ($env{'form.roletype'} eq 'community')) {                   ($env{'form.roletype'} eq 'community')) {
   
             my $coursefilter = $env{'form.coursepick'};              my $coursefilter = $env{'form.coursepick'};
             if ($env{'form.roletype'} eq 'course') {              if ($env{'form.roletype'} eq 'course') {
                 if ($coursefilter eq 'category') {                  if ($coursefilter eq 'category') {
Line 3742  sub print_first_users_upload_form { Line 3711  sub print_first_users_upload_form {
                 &mt("How do I create a CSV file from a spreadsheet"))                  &mt("How do I create a CSV file from a spreadsheet"))
            .'</div><br clear="all" />'."\n";             .'</div><br clear="all" />'."\n";
     $str .= &Apache::lonhtmlcommon::start_pick_box()      $str .= &Apache::lonhtmlcommon::start_pick_box()
            .&Apache::lonhtmlcommon::row_title(&mt('File'))             .&Apache::lonhtmlcommon::row_title(&mt('File'));
            .&Apache::loncommon::upfile_select_html()      if (&Apache::lonlocal::current_language() ne 'en') {
           if ($context eq 'course') { 
               $str .= '<p class="LC_info">'."\n"
                      .&mt('Please upload an UTF8 encoded file to ensure a correct character encoding in your classlist.')."\n"
                      .'</p>'."\n";
           }
       }
       $str .= &Apache::loncommon::upfile_select_html()
            .&Apache::lonhtmlcommon::row_closure()             .&Apache::lonhtmlcommon::row_closure()
            .&Apache::lonhtmlcommon::row_title(             .&Apache::lonhtmlcommon::row_title(
                 '<label for="noFirstLine">'                  '<label for="noFirstLine">'
Line 3877  sub upfile_drop_add { Line 3853  sub upfile_drop_add {
         } elsif ($setting eq 'course') {          } elsif ($setting eq 'course') {
             $defaultrole = $env{'form.courserole'};              $defaultrole = $env{'form.courserole'};
             $defaultsec = $env{'form.sections'};              $defaultsec = $env{'form.sections'};
         }          }  
     } elsif ($context eq 'author') {      } elsif ($context eq 'author') {
         $defaultrole = $env{'form.defaultrole'};          $defaultrole = $env{'form.defaultrole'};
     } elsif ($context eq 'course') {      } elsif ($context eq 'course') {
Line 3987  sub upfile_drop_add { Line 3963  sub upfile_drop_add {
         my (%curr_rules,%got_rules,%alerts,%cancreate);          my (%curr_rules,%got_rules,%alerts,%cancreate);
         my %customroles = &my_custom_roles($crstype);          my %customroles = &my_custom_roles($crstype);
         my @permitted_roles =           my @permitted_roles = 
             &roles_on_upload($context,$setting,$crstype,%customroles);               &roles_on_upload($context,$setting,$crstype,%customroles);
         my %longtypes = &Apache::lonlocal::texthash(          my %longtypes = &Apache::lonlocal::texthash(
                             official   => 'Institutional',                              official   => 'Institutional',
                             unofficial => 'Non-institutional',                              unofficial => 'Non-institutional',
Line 4019  sub upfile_drop_add { Line 3995  sub upfile_drop_add {
                         $gen=$entries{$fields{'gen'}};                          $gen=$entries{$fields{'gen'}};
                     }                      }
                 }                  }
   
                 if ($entries{$fields{'username'}}                  if ($entries{$fields{'username'}}
                     ne &LONCAPA::clean_username($entries{$fields{'username'}})) {                      ne &LONCAPA::clean_username($entries{$fields{'username'}})) {
                     my $nowhitespace;                      my $nowhitespace;
Line 4181  sub upfile_drop_add { Line 4158  sub upfile_drop_add {
                         unless ($cancreate{$usertype}) {                          unless ($cancreate{$usertype}) {
                             my $showtype = $longtypes{$usertype};                              my $showtype = $longtypes{$usertype};
                             $r->print('<br />'.                              $r->print('<br />'.
                                       &mt('[_1]: The user does not exist, and you are not permitted to create users of type: [_2].','<b>'.$username.'</b>',$showtype));                                        &mt("[_1]: The user does not exist, and you are not permitted to create users of type: $showtype.",'<b>'.$username.'</b>'));
                             next;                              next;
                         }                          }
                     } else {                      } else {
Line 4271  sub upfile_drop_add { Line 4248  sub upfile_drop_add {
                                         $role = 'cr_'.$env{'user.domain'}.'_'.                                          $role = 'cr_'.$env{'user.domain'}.'_'.
                                                 $env{'user.name'}.'_'.$role;                                                  $env{'user.name'}.'_'.$role;
                                     }                                      }
                                     if (($role ne 'cc') && ($role ne 'co')) {                                      if (($role ne 'cc') && ($role ne 'co')) { 
                                         if (@secs > 1) {                                          if (@secs > 1) {
                                             $multiple = 1;                                              $multiple = 1;
                                             foreach my $sec (@secs) {                                              foreach my $sec (@secs) {
Line 4677  sub update_user_list { Line 4654  sub update_user_list {
                     if ($sec eq '') {                      if ($sec eq '') {
                         $nochg = 1;                          $nochg = 1;
                         $keepnosection = 1;                          $keepnosection = 1;
                     } else {                       } else {
                         push(@retained,$sec);                          push(@retained,$sec);
                     }                      }
                 }                  }
Line 4706  sub update_user_list { Line 4683  sub update_user_list {
                     $result = 'ok';                      $result = 'ok';
                     $nothingtodo = 1;                      $nothingtodo = 1;
                 } else {                  } else {
                     foreach my $newsec (@newsecs) {                       foreach my $newsec (@newsecs) {
                         if (!grep(/^\Q$newsec\E$/,@retained)) {                          if (!grep(/^\Q$newsec\E$/,@retained)) {
                             if ($role eq 'st') {                              if ($role eq 'st') {
                                 $result = &Apache::lonnet::modify_student_enrollment($udom,$uname,undef,undef,undef,undef,undef,$newsec,$end,$start,$type,$locktype,$cid,'',$context);                                  $result = &Apache::lonnet::modify_student_enrollment($udom,$uname,undef,undef,undef,undef,undef,$newsec,$end,$start,$type,$locktype,$cid,'',$context);
                                 if (@newsecs > 1) {                                  if (@newsecs > 1) {
                                     my $showsingle;                                      my $showsingle; 
                                     if ($newsec eq '') {                                      if ($newsec eq '') {
                                         $showsingle = &mt('No section');                                          $showsingle = &mt('No section');
                                     } else {                                      } else {
Line 4719  sub update_user_list { Line 4696  sub update_user_list {
                                     }                                      }
                                     if ($crstype eq 'Community') {                                      if ($crstype eq 'Community') {
                                         $warn_singlesec = &mt('Although more than one section was indicated, a role was only added for the first section - [_1], as each community member may only be in one section at a time.','<i>'.$showsingle.'</i>');                                          $warn_singlesec = &mt('Although more than one section was indicated, a role was only added for the first section - [_1], as each community member may only be in one section at a time.','<i>'.$showsingle.'</i>');
                                     } else {                                      } else { 
                                         $warn_singlesec = &mt('Although more than one section was indicated, a role was only added for the first section - [_1], as each student may only be in one section of a course at a time.','<i>'.$showsingle.'</i>');                                          $warn_singlesec = &mt('Although more than one section was indicated, a role was only added for the first section - [_1], as each student may only be in one section of a course at a time.','<i>'.$showsingle.'</i>');
                                     }                                      }
                                     $showsecs = $showsingle;                                      $showsecs = $showsingle; 
                                     last;                                      last;
                                 } else {                                  } else {
                                     if ($newsec eq '') {                                      if ($newsec eq '') {
Line 4735  sub update_user_list { Line 4712  sub update_user_list {
                                 my $newscope = $scopestem;                                  my $newscope = $scopestem;
                                 if ($newsec ne '') {                                  if ($newsec ne '') {
                                    $newscope .= '/'.$newsec;                                     $newscope .= '/'.$newsec;
                                    push(@shownew,$newsec);                                     push(@shownew,$newsec); 
                                 }                                  }
                                 $result = &Apache::lonnet::assignrole($udom,$uname,                                  $result = &Apache::lonnet::assignrole($udom,$uname,
                                                         $newscope,$role,$end,$start);                                                          $newscope,$role,$end,$start);
                                   
                             }                              }
                         }                          }
                     }                      }
Line 4788  sub update_user_list { Line 4766  sub update_user_list {
                    $r->print('<div class="LC_warning">'.$warn_singlesec.'</div>');                     $r->print('<div class="LC_warning">'.$warn_singlesec.'</div>');
                }                 }
             } elsif ($choice eq 'chgdates') {              } elsif ($choice eq 'chgdates') {
                 $r->print(&mt("$result_text{'ok'}{$choice} role of '[_1]' in [_2] for '[_3]' - [_4]",$plrole,$extent,                  $r->print(&mt("$result_text{'ok'}{$choice} role of '[_1]' in [_2] for '[_3]' - [_4]",$plrole,$extent, 
                       '<i>'.&Apache::loncommon::plainname($uname,$udom).'</i>',                        '<i>'.&Apache::loncommon::plainname($uname,$udom).'</i>',
                       $dates).'<br />');                        $dates).'<br />');
                $count ++;                 $count ++;
Line 5620  sub sectioncheck_alerts { Line 5598  sub sectioncheck_alerts {
     my %alerts = &Apache::lonlocal::texthash(      my %alerts = &Apache::lonlocal::texthash(
                     curd => 'You must select a course or community in the current domain',                      curd => 'You must select a course or community in the current domain',
                     inea => 'In each course, each user may only have one student role at a time',                      inea => 'In each course, each user may only have one student role at a time',
                     inco => 'In each community, each user may only have one member role at a time',                      inco => 'In each community, each user may only have one member role at a time', 
                     youh => 'You had selected',                      youh => 'You had selected',
                     sect => 'sections',                      sect => 'sections',
                     plsm => 'Please modify your selections so they include no more than one section',                      plsm => 'Please modify your selections so they include no more than one section',

Removed from v.1.97.2.25  
changed lines
  Added in v.1.130


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