Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.150.2.5 and 1.161

version 1.150.2.5, 2010/04/14 07:08:00 version 1.161, 2010/04/14 06:57:17
Line 255  sub next_and_previous_buttons { Line 255  sub next_and_previous_buttons {
             'document.Statistics.submit();" />';              'document.Statistics.submit();" />';
     } else {      } else {
         $previousbutton .= '<input type="button" value="'.          $previousbutton .= '<input type="button" value="'.
             &mt('Previous student').'" disabled="disabled" />';              &mt('Previous Student').'" disabled="disabled" />';
     }      }
     #      #
     # Build the next student link      # Build the next student link
Line 267  sub next_and_previous_buttons { Line 267  sub next_and_previous_buttons {
             &mt('Next Student ([_1])',              &mt('Next Student ([_1])',
             $next->{'username'}.':'.$next->{'domain'}).              $next->{'username'}.':'.$next->{'domain'}).
             '" onclick="document.Statistics.SelectedStudent.value='.              '" onclick="document.Statistics.SelectedStudent.value='.
             "'$sname'".';'.              "'".$sname."'".';'.
             'document.Statistics.submit();" />';              'document.Statistics.submit();" />';
     } else {      } else {
         $nextbutton .= '<input type="button" value="'.          $nextbutton .= '<input type="button" value="'.
             &mt('Next student').'" disabled="disabled" />';              &mt('Next Student').'" disabled="disabled" />';
     }      }
     #      #
     # Build the 'all students' button      # Build the 'all students' button
Line 361  sub CreateInterface { Line 361  sub CreateInterface {
     $Str .= &CreateAndParseOutputDataSelector();      $Str .= &CreateAndParseOutputDataSelector();
     $Str .= '</td></tr>'."\n";      $Str .= '</td></tr>'."\n";
     $Str .= '</table>'."\n";      $Str .= '</table>'."\n";
     $Str .= '<p>'.      $Str .= '<p>'
             &mt('Status:').' '.             .&mt('Status:').' '
             '<input type="text" name="stats_status" size="60" value="" readonly="readonly" />'.             .'<input type="text" name="stats_status" size="60" value="" readonly="readonly" />'
             '</p>';             .'</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;
     $Str .= '<input type="submit" name="ClearCache" value="'.      $Str .= '<input type="submit" name="ClearCache" value="'.
         &mt('Clear Caches').'" />';          &mt('Clear Caches').'" />';
     $Str .= '<p>'.      $Str .= '<p>'
             '<input type="submit" name="Generate Chart"'.             .'<input type="submit" name="Generate Chart"'
             ' value="'.&mt('Generate Chart').'" />'.             .' value="'.&mt('Generate Chart').'" />'
             '</p>';             .'</p>';
   
     return $Str;      return $Str;
 }  }
   
Line 556  my @OutputDataOptions = Line 555  my @OutputDataOptions =
 sub HTMLifyOutputDataDescriptions {  sub HTMLifyOutputDataDescriptions {
     my $Str = '';      my $Str = '';
     $Str .= '<h2>'.&mt('Output Data').'</h2>'."\n";      $Str .= '<h2>'.&mt('Output Data').'</h2>'."\n";
   
     $Str .= "<dl>\n";      $Str .= "<dl>\n";
     foreach my $option (@OutputDataOptions) {      foreach my $option (@OutputDataOptions) {
         $Str .= '    <dt>'.$option->{'name'}.'</dt>';          $Str .= '    <dt>'.$option->{'name'}.'</dt>';
Line 665  sub html_initialize { Line 663  sub html_initialize {
         &Apache::lonstatistics::selected_sequences_with_assessments();          &Apache::lonstatistics::selected_sequences_with_assessments();
     if (! ref($navmap)) {      if (! ref($navmap)) {
         # Unable to get data, so bail out          # Unable to get data, so bail out
         $r->print('<p class="LC_error">'.          $r->print('<p class="LC_error">'
                   &mt('Unable to retrieve course information.').                   .&mt('Unable to retrieve course information.')
                   '</p>');                   .'</p>');
     }      }
   
     # If we're showing links, show a checkbox to open in new      # If we're showing links, show a checkbox to open in new
     # windows.      # windows.
     if ($show_links ne 'no') {      if ($show_links ne 'no') {
         my $labeltext = &mt('Show links in new window:');          my $labeltext = &mt('Show links in new window');
         $r->print(<<NEW_WINDOW_CHECKBOX);          $r->print(<<NEW_WINDOW_CHECKBOX);
 <script type="text/javascript">new_window = true;</script>  <script type="text/javascript">new_window = true;</script>
 <p><label>$labeltext   <p><label> 
 <input type="checkbox" checked="checked" onclick="new_window=this.checked" />  <input type="checkbox" checked="checked" onclick="new_window=this.checked" />
   $labeltext
 </label></p>  </label></p>
 NEW_WINDOW_CHECKBOX  NEW_WINDOW_CHECKBOX
     }      }
Line 715  NEW_WINDOW_CHECKBOX Line 714  NEW_WINDOW_CHECKBOX
                 $width{$symb}->{'width_sum'} += 1;                              $width{$symb}->{'width_sum'} += 1;            
             }              }
     $total_count += &count_parts($navmap,$seq);      $total_count += &count_parts($navmap,$seq);
             # Use 3 digits for the sum              # Use 6 digits for the sum
             $width{$symb}->{'width_sum'} += 3;              $width{$symb}->{'width_sum'} += 6;
         }          }
         # Compute width of maximum          # Compute width of maximum
         if ($chosen_output->{'sequence_max'}) {          if ($chosen_output->{'sequence_max'}) {
Line 724  NEW_WINDOW_CHECKBOX Line 723  NEW_WINDOW_CHECKBOX
                 # One digit for the '/'                  # One digit for the '/'
                 $width{$symb}->{'width_sum'} +=1;                  $width{$symb}->{'width_sum'} +=1;
             }              }
             # Use 3 digits for the total              # Use 6 digits for the total
             $width{$symb}->{'width_sum'}+=3;              $width{$symb}->{'width_sum'}+=6;
         }          }
  #   #
         if ($chosen_output->{'every_problem'}) {          if ($chosen_output->{'every_problem'}) {
Line 827  sub html_outputstudent { Line 826  sub html_outputstudent {
     return if (! defined($navmap));      return if (! defined($navmap));
     #      #
     if($count++ % 5 == 0 && $count > 0) {      if($count++ % 5 == 0 && $count > 0) {
         $r->print("</pre><pre>");  #       $r->print("</pre><pre>");
           $r->print('</pre>');
           &Apache::lonhtmlcommon::Increment_PrgWin(
               $r,\%prog_state,'last five students');
           $r->rflush();
           $r->print('<pre>');
     }      }
     # First, the @StudentData fields need to be listed      # First, the @StudentData fields need to be listed
     my @to_show = &get_student_fields_to_show();      my @to_show = &get_student_fields_to_show();
Line 887  sub html_outputstudent { Line 891  sub html_outputstudent {
             $ratio .= ' ';              $ratio .= ' ';
         }          }
         if ($chosen_output->{'sequence_sum'} && $score ne ' ') {          if ($chosen_output->{'sequence_sum'} && $score ne ' ') {
             my $score .= sprintf("%3.0f",$score);              my $score .= sprintf("%3.2f",$score);
             $ratio .= (' 'x(3-length($score))).$score;              $ratio .= (' 'x(6-length($score))).$score;
         } elsif($chosen_output->{'sequence_sum'}) {          } elsif($chosen_output->{'sequence_sum'}) {
             $ratio .= ' 'x3;              $ratio .= ' 'x6;
         }          }
         if ($chosen_output->{'sequence_max'}) {          if ($chosen_output->{'sequence_max'}) {
             if ($chosen_output->{'sequence_sum'}) {              if ($chosen_output->{'sequence_sum'}) {
                 $ratio .= '/';                  $ratio .= '/';
             }              }
             $ratio .= sprintf("%3.0f",$seq_max);              my $sequence_total=sprintf("%3.2f",$seq_max);
               $ratio .= $sequence_total.(' 'x(6-length($sequence_total)));
         }          }
         #          #
         if (! $chosen_output->{'every_problem'}) {          if (! $chosen_output->{'every_problem'}) {
Line 930  sub html_outputstudent { Line 935  sub html_outputstudent {
     if (! defined($score)) {      if (! defined($score)) {
         $score = ' ' x $total_sum_width;          $score = ' ' x $total_sum_width;
     } else {      } else {
         $score = sprintf("%.0f",$score);          $score = sprintf("%.2f",$score);
         $score = (' 'x(3-length($score))).$score;          $score = (' 'x(6-length($score))).$score;
     }      }
     $Str .= ' '.' 'x($total_sum_width-length($score)).$score.' / '.$max;      $Str .= ' '.' 'x($total_sum_width-length($score)).$score.' / '.$max;
     $Str .= " \n";      $Str .= " \n";
     #      #
     $r->print($Str);      $r->print($Str);
     #      #
     $r->rflush();  #   $r->rflush();
     &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,'last student');  #   &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,'last student');
     return;      return;
 }      }    
   

Removed from v.1.150.2.5  
changed lines
  Added in v.1.161


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