Diff for /loncom/interface/lonuserutils.pm between versions 1.146 and 1.147

version 1.146, 2012/12/31 15:28:36 version 1.147, 2013/01/23 17:48:37
Line 335  sub print_upload_manager_header { Line 335  sub print_upload_manager_header {
                                 $env{'request.role.domain'},$context,                                  $env{'request.role.domain'},$context,
                                 $groupslist,$crstype);                                  $groupslist,$crstype);
     my $checked=(($env{'form.noFirstLine'})?' checked="checked"':'');      my $checked=(($env{'form.noFirstLine'})?' checked="checked"':'');
     $r->print('<p>'      $r->print(
              .&mt('Total number of records found in file: [_1]'          '<h3>'.&mt('Identify fields in uploaded list')."</h3>\n".
                  ,'<b>'.$distotal.'</b>')          '<p class="LC_info">'.
              ."</p>\n");          &mt('Total number of records found in file: [_1]'
     $r->print('<div class="LC_left_float"><h3>'.             ,'<b>'.$distotal.'</b>').
               &mt('Identify fields in uploaded list')."</h3>\n");          "</p>\n"
     $r->print(&mt('Enter as many fields as you can.<br /> The system will inform you and bring you back to this page, <br /> if the data selected are insufficient to add users.')."<br />\n");      );
       if ($distotal == 0) {
           $r->print('<p class="LC_warning">'.&mt('None found').'</p>');
       }
       $r->print(
           '<p>'.
           &mt('Enter as many fields as you can.').'<br />'.
           &mt('The system will inform you and bring you back to this page,[_1]if the data selected are insufficient to add users.','<br />').
           "</p>\n"
       );
     $r->print(&hidden_input('action','upload').      $r->print(&hidden_input('action','upload').
               &hidden_input('state','got_file').                &hidden_input('state','got_file').
               &hidden_input('associate','').                &hidden_input('associate','').
Line 349  sub print_upload_manager_header { Line 358  sub print_upload_manager_header {
               &hidden_input('fileupload',$env{'form.fileupload'}).                &hidden_input('fileupload',$env{'form.fileupload'}).
               &hidden_input('upfiletype',$env{'form.upfiletype'}).                &hidden_input('upfiletype',$env{'form.upfiletype'}).
               &hidden_input('upfile_associate',$env{'form.upfile_associate'}));                &hidden_input('upfile_associate',$env{'form.upfile_associate'}));
     $r->print('<br /><label><input type="checkbox" name="noFirstLine"'.$checked.' />'.      $r->print(
               &mt('Ignore First Line').'</label><br />');          '<div class="LC_left_float">'.
     $r->print('<br /><input type="button" value="'.&mt('Reverse Association').'" '.          '<fieldset><legend>'.&mt('Functions').'</legend>'.
           '<label><input type="checkbox" name="noFirstLine"'.$checked.' />'.
                 &mt('Ignore First Line').'</label>'.
           ' <input type="button" value="'.&mt('Reverse Association').'" '.
               'name="Reverse Association" '.                'name="Reverse Association" '.
               'onclick="javascript:this.form.associate.value=\'Reverse Association\';submit(this.form);" />');                'onclick="javascript:this.form.associate.value=\'Reverse Association\';submit(this.form);" />'.
     $r->print("<br /><br />\n".          '</fieldset></div><br clear="all" />'
               '<script type="text/javascript" language="Javascript">'."\n".      );
               '// <![CDATA['."\n".      $r->print(
               $javascript."\n".$javascript_validations."\n".          '<script type="text/javascript" language="Javascript">'."\n".
               '// ]]>'."\n".          '// <![CDATA['."\n".
               '</script>');          $javascript."\n".$javascript_validations."\n".
           '// ]]>'."\n".
           '</script>'
       );
 }  }
   
 ###############################################################  ###############################################################
Line 603  sub upload_manager_javascript_forward_as Line 618  sub upload_manager_javascript_forward_as
             $numbuttons ++;              $numbuttons ++;
         }          }
         if (!$can_assign->{'int'}) {          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').              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.');                            &mt('Your current role does not have rights to create users with that authentication type.');
             $auth_update = <<"END";              $auth_update = <<"END";
    // Currently the initial password field is only supported for internal auth     // Currently the initial password field is only supported for internal auth
Line 1082  sub print_upload_manager_form { Line 1097  sub print_upload_manager_form {
             $keyfields=join(',',sort(keys(%sone)));              $keyfields=join(',',sort(keys(%sone)));
         }          }
     }      }
     $r->print('</div>');  
     &print_upload_manager_footer($r,$i,$keyfields,$defdom,$today,$halfyear,      &print_upload_manager_footer($r,$i,$keyfields,$defdom,$today,$halfyear,
                                  $context,$permission,$crstype);                                   $context,$permission,$crstype);
 }  }
Line 1568  sub print_userlist { Line 1582  sub print_userlist {
             $clearcoursepick = 1;              $clearcoursepick = 1;
         }          }
         if (($env{'form.coursepick'}) && (!$clearcoursepick)) {          if (($env{'form.coursepick'}) && (!$clearcoursepick)) {
             $r->print('<hr />'.&mt('Searching').' ...<br />&nbsp;<br />');              $r->print('<hr />'.&mt('Searching ...').'<br />&nbsp;<br />');
         }          }
     } else {      } else {
         $r->print('<hr /><div id="searching">'.&mt('Searching').' ...</div>');          $r->print('<hr /><div id="searching">'.&mt('Searching ...').'</div>');
     }      }
     $r->rflush();      $r->rflush();
     if ($context eq 'course') {      if ($context eq 'course') {
Line 3822  sub print_first_users_upload_form { Line 3836  sub print_first_users_upload_form {
     $str .= '<input type="hidden" name="action" value="upload" />';      $str .= '<input type="hidden" name="action" value="upload" />';
     $str .= '<input type="hidden" name="state"  value="got_file" />';      $str .= '<input type="hidden" name="state"  value="got_file" />';
   
       $str .= &Apache::grades::checkforfile_js();
   
     $str .= '<h2>'.&mt('Upload a file containing information about users').'</h2>'."\n";      $str .= '<h2>'.&mt('Upload a file containing information about users').'</h2>'."\n";
   
     # Excel and CSV Help      # Excel and CSV Help
     $str .= '<div class="LC_left_float">'      $str .= '<div class="LC_columnSection">'
            .&Apache::loncommon::help_open_topic("Course_Create_Class_List",             .&Apache::loncommon::help_open_topic("Course_Create_Class_List",
                 &mt("How do I create a users list from a spreadsheet"))                  &mt("How do I create a users list from a spreadsheet"))
            .'</div><div class="LC_left_float">'."\n"             .' '.&Apache::loncommon::help_open_topic("Course_Convert_To_CSV",
            .&Apache::loncommon::help_open_topic("Course_Convert_To_CSV",  
                 &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>\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'));
     if (&Apache::lonlocal::current_language() ne 'en') {      if (&Apache::lonlocal::current_language() ne 'en') {
Line 3852  sub print_first_users_upload_form { Line 3867  sub print_first_users_upload_form {
            .&Apache::lonhtmlcommon::end_pick_box();             .&Apache::lonhtmlcommon::end_pick_box();
   
     $str .= '<p>'      $str .= '<p>'
            .'<input type="submit" name="fileupload" value="'.&mt('Next').'" />'             .'<input type="submit" name="fileupload" value="'.&mt('Next').'"'
              .' onclick="javascript:checkUpload(this.form);" />'
            .'</p>';             .'</p>';
   
     $r->print($str);      $r->print($str);
Line 4135  sub upfile_drop_add { Line 4151  sub upfile_drop_add {
                     if ($entries{$fields{'domain'}}                       if ($entries{$fields{'domain'}} 
                         ne &LONCAPA::clean_domain($entries{$fields{'domain'}})) {                          ne &LONCAPA::clean_domain($entries{$fields{'domain'}})) {
                         $r->print('<br />'. '<b>'.$entries{$fields{'domain'}}.                          $r->print('<br />'. '<b>'.$entries{$fields{'domain'}}.
                                   '</b>: '.&mt('Unacceptable domain for user [_2] [_3] [_4] [_5]',$fname,$mname,$lname,$gen));                                    '</b>: '.&mt('Unacceptable domain for user [_1] [_2] [_3] [_4]',$fname,$mname,$lname,$gen));
                         next;                          next;
                     }                      }
                     my $username = $entries{$fields{'username'}};                      my $username = $entries{$fields{'username'}};
Line 4958  sub dates_feedback { Line 4974  sub dates_feedback {
     my $dates;      my $dates;
     if ($start < $now) {      if ($start < $now) {
         if ($end == 0) {          if ($end == 0) {
             $dates .= &mt('role(s) active now; no end date');              $dates = &mt('role(s) active now; no end date');
         } elsif ($end > $now) {          } elsif ($end > $now) {
             $dates = &mt('role(s) active now; ends [_1].',&Apache::lonlocal::locallocaltime($end));              $dates = &mt('role(s) active now; ends [_1].',&Apache::lonlocal::locallocaltime($end));
         } else {          } else {

Removed from v.1.146  
changed lines
  Added in v.1.147


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