Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.166 and 1.173

version 1.166, 2011/12/22 00:28:11 version 1.173, 2013/07/22 18:06:58
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 465  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 582  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 838  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 1119  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 [_1]Sequences or Folders[_2] you have selected.','<b>','</b>').'</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 [_1]CSV[_2] files of this data or Excel files of the [_1]Scores Summary[_2] data.','<b>','</b>').'</p>'.$/;
     if ($chosen_output->{'base'} eq 'tries' && $total_columns > 255) {      if ($chosen_output->{'base'} eq 'tries' && $total_columns > 255) {
         $r->print($too_many_cols_error_message);          $r->print($too_many_cols_error_message);
         $request_aborted = 1;          $request_aborted = 1;
Line 1178  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 1202  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 1653  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 1969  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 2127  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.166  
changed lines
  Added in v.1.173


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