Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.128 and 1.129

version 1.128, 2006/01/28 19:25:59 version 1.129, 2006/01/29 19:39:03
Line 472  my @OutputDataOptions = Line 472  my @OutputDataOptions =
        grand_maximum => 1,         grand_maximum => 1,
        summary_table => 1,         summary_table => 1,
        maximum_row => 1,         maximum_row => 1,
          ignore_weight => 0,
        shortdesc => 'Total Score and Maximum Possible for each '.         shortdesc => 'Total Score and Maximum Possible for each '.
            'Sequence or Folder',             'Sequence or Folder',
        longdesc => 'The score of each student as well as the '.         longdesc => 'The score of each student as well as the '.
Line 490  my @OutputDataOptions = Line 491  my @OutputDataOptions =
        grand_maximum => 1,         grand_maximum => 1,
        summary_table => 1,         summary_table => 1,
        maximum_row => 1,         maximum_row => 1,
          ignore_weight => 0,
        shortdesc => 'Score on each Problem Part',         shortdesc => 'Score on each Problem Part',
        longdesc =>'The students score on each problem part, computed as'.         longdesc =>'The students score on each problem part, computed as'.
            'the part weight * part awarded',             'the part weight * part awarded',
Line 507  my @OutputDataOptions = Line 509  my @OutputDataOptions =
        grand_maximum => 0,         grand_maximum => 0,
        summary_table => 0,         summary_table => 0,
        maximum_row => 0,         maximum_row => 0,
          ignore_weight => 0,
        shortdesc => 'Number of Tries before success on each Problem Part',         shortdesc => 'Number of Tries before success on each Problem Part',
        longdesc =>'The number of tries before success on each problem part.',         longdesc =>'The number of tries before success on each problem part.',
        non_html_notes => 'negative values indicate an incorrect problem',         non_html_notes => 'negative values indicate an incorrect problem',
Line 524  my @OutputDataOptions = Line 527  my @OutputDataOptions =
        grand_maximum => 1,         grand_maximum => 1,
        summary_table => 1,         summary_table => 1,
        maximum_row => 0,         maximum_row => 0,
          ignore_weight => 1,
        shortdesc => 'Number of Problem Parts completed successfully.',         shortdesc => 'Number of Problem Parts completed successfully.',
        longdesc => 'The Number of Problem Parts completed successfully and '.         longdesc => 'The Number of Problem Parts completed successfully and '.
            'the maximum possible for each student',             'the maximum possible for each student',
Line 781  sub html_outputstudent { Line 785  sub html_outputstudent {
         } else {          } else {
             ($performance,$performance_length,$score,$seq_max,$rawdata) =              ($performance,$performance_length,$score,$seq_max,$rawdata) =
                 &student_performance_on_sequence($student,\%StudentsData,                  &student_performance_on_sequence($student,\%StudentsData,
                                                  $navmap,$seq,$show_links);                                                   $navmap,$seq,$show_links,
                                                    $chosen_output->{ignore_weight});
         }          }
         my $ratio='';          my $ratio='';
         if ($chosen_output->{'every_problem'} &&           if ($chosen_output->{'every_problem'} && 
Line 1407  sub excel_outputstudent { Line 1412  sub excel_outputstudent {
         } else {          } else {
             ($performance,$performance_length,$score,$seq_max,$rawdata) =              ($performance,$performance_length,$score,$seq_max,$rawdata) =
                 &student_performance_on_sequence($student,\%StudentsData,                  &student_performance_on_sequence($student,\%StudentsData,
                                                  $navmap,$seq,'no');                                                   $navmap,$seq,'no',
                                                    $chosen_output->{ignore_weight});
         }           } 
         if ($chosen_output->{'every_problem'}) {          if ($chosen_output->{'every_problem'}) {
             if ($chosen_output->{'correct'}) {              if ($chosen_output->{'correct'}) {
Line 1677  sub csv_outputstudent { Line 1683  sub csv_outputstudent {
         } else {          } else {
             ($performance,$performance_length,$score,$seq_max,$rawdata) =              ($performance,$performance_length,$score,$seq_max,$rawdata) =
                 &student_performance_on_sequence($student,\%StudentsData,                  &student_performance_on_sequence($student,\%StudentsData,
                                                  $navmap,$seq,'no');                                                   $navmap,$seq,'no',
                                                    $chosen_output->{ignore_weight});
         }          }
         if ($chosen_output->{'every_problem'}) {          if ($chosen_output->{'every_problem'}) {
             if ($chosen_output->{'correct'}) {              if ($chosen_output->{'correct'}) {
Line 1898  Inputs: Line 1905  Inputs:
 #######################################################  #######################################################
 #######################################################  #######################################################
 sub student_performance_on_sequence {  sub student_performance_on_sequence {
     my ($student,$studentdata,$navmap,$seq,$links) = @_;      my ($student,$studentdata,$navmap,$seq,$links,$awarded_only) = @_;
     $links = 'no' if (! defined($links));      $links = 'no' if (! defined($links));
     my $Str = ''; # final result string      my $Str = ''; # final result string
     my ($score,$max) = (0,0);      my ($score,$max) = (0,0);
Line 1912  sub student_performance_on_sequence { Line 1919  sub student_performance_on_sequence {
         my $resource_data = $studentdata->{$symb};          my $resource_data = $studentdata->{$symb};
         foreach my $part (@{$resource->parts()}) {          foreach my $part (@{$resource->parts()}) {
             $partscore = undef;              $partscore = undef;
             my $weight = &Apache::lonnet::EXT('resource.'.$part.'.weight',              my $weight;
                                               $symb,              if (!$awarded_only){
                                               $student->{'domain'},                  $weight = &Apache::lonnet::EXT('resource.'.$part.'.weight',
                                               $student->{'username'},                                                 $symb,
                                               $student->{'section'});                                                 $student->{'domain'},
                                                  $student->{'username'},
                                                  $student->{'section'});
               }
             if (!defined($weight) || ($weight eq '')) {               if (!defined($weight) || ($weight eq '')) { 
                 $weight=1;                  $weight=1;
             }              }

Removed from v.1.128  
changed lines
  Added in v.1.129


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