Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.165 and 1.172

version 1.165, 2011/12/21 21:25:51 version 1.172, 2013/04/11 16:23:36
Line 282  sub next_and_previous_buttons { Line 282  sub next_and_previous_buttons {
     # Build the 'all students' button      # Build the 'all students' button
     my $all = '';      my $all = '';
     $all .= '<input type="button" value="'.&mt('All Students').'" '.      $all .= '<input type="button" value="'.&mt('All Students').'" '.
             '" onclick="document.Statistics.SelectedStudent.value='.              ' onclick="document.Statistics.SelectedStudent.value='.
             "''".';'.'document.Statistics.submit();" />';              "''".';'.'document.Statistics.submit();" />';
     $Str .= $previousbutton.('&nbsp;'x5).$all.('&nbsp;'x5).$nextbutton;      $Str .= $previousbutton.('&nbsp;'x5).$all.('&nbsp;'x5).$nextbutton;
     return $Str;      return $Str;
Line 364  sub CreateInterface { Line 364  sub CreateInterface {
     $Str .= &CreateAndParseOutputDataSelector();      $Str .= &CreateAndParseOutputDataSelector();
     $Str .= '</td></tr>'."\n";      $Str .= '</td></tr>'."\n";
     $Str .= '</table>'."\n";      $Str .= '</table>'."\n";
     $Str .= '<p>'  
            .&mt('Status:').' '  
            .'<input type="text" name="stats_status" size="60" value="" readonly="readonly" />'  
            .'</p>';  
     $Str .= '<input type="submit" name="selectstudent" value="'.      $Str .= '<input type="submit" name="selectstudent" value="'.
         &mt('Select One Student').'" />';          &mt('Select One Student').'" />';
     $Str .= '&nbsp;'x5;      $Str .= '&nbsp;'x5;
Line 469  sub CreateAndParseOutputSelector { Line 465  sub CreateAndParseOutputSelector {
     $Str = qq/<select size="5" name="$elementname">/;      $Str = qq/<select size="5" name="$elementname">/;
     foreach my $option (@OutputOptions) {      foreach my $option (@OutputOptions) {
         $Str .= "\n".'    <option value="'.$option->{'value'}.'"';          $Str .= "\n".'    <option value="'.$option->{'value'}.'"';
         $Str .= " selected " if ($option->{'value'} eq $selected);          $Str .= ' selected="selected"' if ($option->{'value'} eq $selected);
         $Str .= ">".&mt($option->{'name'})."<\/option>";          $Str .= ">".&mt($option->{'name'})."<\/option>";
     }      }
     $Str .= "\n</select>";      $Str .= "\n</select>";
Line 586  sub CreateAndParseOutputDataSelector { Line 582  sub CreateAndParseOutputDataSelector {
     $Str = qq/<select size="5" name="$elementname">/;      $Str = qq/<select size="5" name="$elementname">/;
     foreach my $option (@OutputDataOptions) {      foreach my $option (@OutputDataOptions) {
         $Str .= "\n".'    <option value="'.$option->{'value'}.'"';          $Str .= "\n".'    <option value="'.$option->{'value'}.'"';
         $Str .= " selected " if ($option->{'value'} eq $chosen_output->{'value'});          $Str .= ' selected="selected"' if ($option->{'value'} eq $chosen_output->{'value'});
         $Str .= ">".&mt($option->{'name'})."<\/option>";          $Str .= ">".&mt($option->{'name'})."<\/option>";
     }      }
     $Str .= "\n</select>";      $Str .= "\n</select>";
Line 751  NEW_WINDOW_CHECKBOX Line 747  NEW_WINDOW_CHECKBOX
     $total_sum_width = length($total_count)+1;      $total_sum_width = length($total_count)+1;
     $Str .= "    total</pre>\n";      $Str .= "    total</pre>\n";
     $Str .= "<pre>";      $Str .= "<pre>";
     $r->print($Str);  
     $r->rflush();  
   
     $r->print(<<JS);      $r->print(<<JS);
 <script type="text/javascript">  <script type="text/javascript">
Line 813  JS Line 807  JS
     }      }
     #      #
     # Initialize progress window      # Initialize progress window
     %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,$studentcount);  
     #      #
       %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,$studentcount);
     &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,      &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,
                                           'Processing first student');                                            'Processing first student');
       $r->print($Str);
       $r->rflush();
   
     return;      return;
 }  }
   
Line 841  sub html_outputstudent { Line 838  sub html_outputstudent {
         if ($field eq 'comments') {          if ($field eq 'comments') {
             $title = '<a href="/adm/'.$student->{'domain'}.'/'.$student->{'username'}.'/'.'aboutme#coursecomment">'.&mt('Comments').'</a>';              $title = '<a href="/adm/'.$student->{'domain'}.'/'.$student->{'username'}.'/'.'aboutme#coursecomment">'.&mt('Comments').'</a>';
         }          }
           utf8::decode($title);
         my $base = length($title);          my $base = length($title);
         my $width=$Apache::lonstatistics::StudentData{$field}->{'width'};          my $width=$Apache::lonstatistics::StudentData{$field}->{'width'};
         $Str .= $title.' 'x($width-$base).$padding;          $Str .= $title.' 'x($width-$base).$padding;
Line 1122  sub excel_initialize { Line 1120  sub excel_initialize {
     }      }
     my $too_many_cols_error_message =       my $too_many_cols_error_message = 
         '<h2>'.&mt('Unable to Complete Request').'</h2>'.$/.          '<h2>'.&mt('Unable to Complete Request').'</h2>'.$/.
         '<p>'.&mt('LON-CAPA is unable to produce your Excel spreadsheet because your selections will result in more than 255 columns.  Excel allows only 255 columns in a spreadsheet.').'</p>'.$/.          '<p class="LC_warning">'.&mt('LON-CAPA is unable to produce your Excel spreadsheet because your selections will result in more than 255 columns.  Excel allows only 255 columns in a spreadsheet.').'</p>'.$/.
         '<p>'.&mt('You may consider reducing the number of <b>Sequences or Folders</b> you have selected.').'</p>'.$/.          '<p>'.&mt('You may consider reducing the number of <b>Sequences or Folders</b> you have selected.').'</p>'.$/.
         '<p>'.&mt('LON-CAPA can produce <b>CSV</b> files of this data or Excel files of the <b>Scores Summary</b> data.').'</p>'.$/;          '<p>'.&mt('LON-CAPA can produce <b>CSV</b> files of this data or Excel files of the <b>Scores Summary</b> data.').'</p>'.$/;
     if ($chosen_output->{'base'} eq 'tries' && $total_columns > 255) {      if ($chosen_output->{'base'} eq 'tries' && $total_columns > 255) {
Line 1181  sub excel_initialize { Line 1179  sub excel_initialize {
     my $sectionstring = '';      my $sectionstring = '';
     my @Sections = &Apache::lonstatistics::get_selected_sections();      my @Sections = &Apache::lonstatistics::get_selected_sections();
     $excel_sheet->write($header_row,$cols_output++,      $excel_sheet->write($header_row,$cols_output++,
                         &Apache::lonstatistics::section_and_enrollment_description('plaintext'),                          &Apache::lonstatistics::section_and_enrollment_description('localized'),
                         $format->{'h3'});                          $format->{'h3'});
     #      #
     # Put the date in there too      # Put the date in there too
Line 1205  sub excel_initialize { Line 1203  sub excel_initialize {
     # Add the student headers      # Add the student headers
     $cols_output = 0;      $cols_output = 0;
     foreach my $field (&get_student_fields_to_show()) {      foreach my $field (&get_student_fields_to_show()) {
         $excel_sheet->write($resource_name_row,$cols_output++,$field,          $excel_sheet->write($resource_name_row,$cols_output++,&mt($field),
                             $format->{'bold'});                              $format->{'bold'});
     }      }
     #      #
Line 1656  sub csv_initialize{ Line 1654  sub csv_initialize{
     # Deal with unimplemented requests      # Deal with unimplemented requests
     $request_aborted = undef;      $request_aborted = undef;
     if ($chosen_output->{'base'} =~ /final table/) {      if ($chosen_output->{'base'} =~ /final table/) {
         $r->print(<<END);          $r->print(
 <h2>Unable to Complete Request</h2>              '<h2>'.&mt('Unable to Complete Request').'</h2>'
 <p>             .'<p class="LC_warning">'
 The <b>Summary Table (Scores)</b> option is not available for non-HTML output.             .&mt('The [_1]Summary Table (Scores)[_2] option'
 </p>                 .' is not available for non-HTML output.','<b>','</b>')
 END             .'</p>'
           );
        $request_aborted = 1;         $request_aborted = 1;
     }      }
     return if ($request_aborted);      return if ($request_aborted);
Line 1972  sub student_tries_on_sequence { Line 1971  sub student_tries_on_sequence {
                  ($links eq 'all')) {                   ($links eq 'all')) {
                 my $link = '/adm/grades'.                  my $link = '/adm/grades'.
                     '?symb='.&escape($resource->shown_symb).                      '?symb='.&escape($resource->shown_symb).
                         '&student='.$student->{'username'}.                          '&amp;student='.$student->{'username'}.
                             '&userdom='.$student->{'domain'}.                              '&amp;userdom='.$student->{'domain'}.
                                 '&command=submission';                                  '&amp;command=submission';
                 $symbol = &link($symbol, $link);                  $symbol = &link($symbol, $link);
             }              }
             $value .= $symbol;              $value .= $symbol;
Line 2130  sub student_performance_on_sequence { Line 2129  sub student_performance_on_sequence {
             if ( ($links eq 'yes' && $symbol ne ' ') || ($links eq 'all')) {              if ( ($links eq 'yes' && $symbol ne ' ') || ($links eq 'all')) {
                 my $link = '/adm/grades' .                  my $link = '/adm/grades' .
                     '?symb='.&escape($resource->shown_symb).                      '?symb='.&escape($resource->shown_symb).
                     '&student='.$student->{'username'}.                      '&amp;student='.$student->{'username'}.
                     '&userdom='.$student->{'domain'}.                      '&amp;userdom='.$student->{'domain'}.
                     '&command=submission';                      '&amp;command=submission';
                 $symbol = &link($symbol, $link);                  $symbol = &link($symbol, $link);
             }              }
             $Str .= $symbol;              $Str .= $symbol;

Removed from v.1.165  
changed lines
  Added in v.1.172


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