[system] / branches / gage_dev / webwork2 / lib / WeBWorK / ContentGenerator / Grades.pm Repository:
ViewVC logotype

Diff of /branches/gage_dev/webwork2/lib/WeBWorK/ContentGenerator/Grades.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3132 Revision 3133
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Grades.pm,v 1.10 2004/11/11 15:52:08 gage Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Grades.pm,v 1.11 2004/12/18 20:41:26 gage Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
293 } 293 }
294 else { 294 else {
295 $longStatus = 'X '; 295 $longStatus = 'X ';
296 } 296 }
297 297
298 my $incorrect = $problemRecord->num_incorrect;
299 $string .= $longStatus; 298 $string .= $longStatus;
300 $twoString .= threeSpaceFill($incorrect); 299 $twoString .= threeSpaceFill($num_correct);
301 my $probValue = $problemRecord->value; 300 my $probValue = $problemRecord->value;
302 $probValue = 1 unless defined($probValue) and $probValue ne ""; # FIXME?? set defaults here? 301 $probValue = 1 unless defined($probValue) and $probValue ne ""; # FIXME?? set defaults here?
303 $total += $probValue; 302 $total += $probValue;
304 $totalRight += round_score($status*$probValue) if $valid_status; 303 $totalRight += round_score($status*$probValue) if $valid_status;
305 } 304 }
306 305
307 306
308 my $avg_num_attempts = ($num_of_problems) ? $num_of_attempts/$num_of_problems : 0; 307 my $avg_num_attempts = ($num_of_problems) ? $num_of_attempts/$num_of_problems : 0;
309 my $successIndicator = ($avg_num_attempts) ? ($totalRight/$total)**2/$avg_num_attempts : 0 ; 308 my $successIndicator = ($avg_num_attempts) ? ($totalRight/$total)**2/$avg_num_attempts : 0 ;
310 309
311 push @rows, CGI::Tr( 310 push @rows, CGI::Tr(
312 CGI::td(CGI::a({-href=>$act_as_student_set_url}, underscore2nbsp($setName))), 311 CGI::td(CGI::a({-href=>$act_as_student_set_url}, underscore2nbsp($setName))),

Legend:
Removed from v.3132  
changed lines
  Added in v.3133

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9