Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.150.2.2 and 1.155

version 1.150.2.2, 2009/08/13 18:45:04 version 1.155, 2009/05/17 23:13:49
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 .= '<input type="submit" name="Generate Chart" value="'.
             &mt('Status:').' '.          &mt('Generate Chart').'" />';
             '<input type="text" name="stats_status" size="60" value="" readonly="readonly" />'.      $Str .= '&nbsp;'x5;
             '</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"'.      $Str .= 
             ' value="'.&mt('Generate Chart').'" />'.          &mt('Status [_1]',
             '</p>';              '<input type="text" name="stats_status" size="60" value="" readonly="readonly" />');
       $Str .= '</p>';
     return $Str;      return $Str;
 }  }
   
Line 664  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("<h3>".
                   &mt('Unable to retrieve course information.').                    &mt('Unable to retrieve course information.').
                   '</p>');                    '</h3>');
     }      }
   
     # If we're showing links, show a checkbox to open in new      # If we're showing links, show a checkbox to open in new
Line 683  NEW_WINDOW_CHECKBOX Line 682  NEW_WINDOW_CHECKBOX
   
     #      #
     $r->print("<h3>".$env{'course.'.$env{'request.course.id'}.'.description'}.      $r->print("<h3>".$env{'course.'.$env{'request.course.id'}.'.description'}.
               "&nbsp;&nbsp;".&Apache::lonlocal::locallocaltime(time)."</h3>");                "&nbsp;&nbsp;".localtime(time)."</h3>");
     #      #
     if ($chosen_output->{'base'} !~ /^final table/) {      if ($chosen_output->{'base'} !~ /^final table/) {
         $r->print("<h3>".&mt($chosen_output->{'shortdesc'})."</h3>");                  $r->print("<h3>".&mt($chosen_output->{'shortdesc'})."</h3>");        
Line 714  NEW_WINDOW_CHECKBOX Line 713  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 723  NEW_WINDOW_CHECKBOX Line 722  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 886  sub html_outputstudent { Line 885  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 929  sub html_outputstudent { Line 929  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";

Removed from v.1.150.2.2  
changed lines
  Added in v.1.155


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