| 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/Instructor/Stats.pm,v 1.50 2005/02/06 20:47:20 gage Exp $ |
4 | # $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm,v 1.52 2005/05/19 20:53:18 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. |
| … | |
… | |
| 361 | # $totalRight |
361 | # $totalRight |
| 362 | ################################### |
362 | ################################### |
| 363 | |
363 | |
| 364 | foreach my $problemRecord (@problemRecords) { |
364 | foreach my $problemRecord (@problemRecords) { |
| 365 | next unless ref($problemRecord); |
365 | next unless ref($problemRecord); |
|
|
366 | |
| 366 | # warn "Can't find record for problem $prob in set $setName for $student"; |
367 | # warn "Can't find record for problem $prob in set $setName for $student"; |
| 367 | # FIXME check the legitimate reasons why a student record might not be defined |
368 | # FIXME check the legitimate reasons why a student record might not be defined |
| 368 | #################################################################### |
369 | #################################################################### |
| 369 | # Grab data from the database |
370 | # Grab data from the database |
| 370 | #################################################################### |
371 | #################################################################### |
| … | |
… | |
| 474 | my %attempts_percentiles_for_problem = (); |
475 | my %attempts_percentiles_for_problem = (); |
| 475 | my %problemPage = (); # link to the problem page |
476 | my %problemPage = (); # link to the problem page |
| 476 | foreach my $probID (@problemIDs) { |
477 | foreach my $probID (@problemIDs) { |
| 477 | $attempts_percentiles_for_problem{$probID} = { |
478 | $attempts_percentiles_for_problem{$probID} = { |
| 478 | determine_percentiles([@brackets2], @{$attempts_list_for_problem{$probID}}) |
479 | determine_percentiles([@brackets2], @{$attempts_list_for_problem{$probID}}) |
|
|
480 | |
| 479 | }; |
481 | }; |
| 480 | $problemPage{$probID} = $urlpath->newFromModule("WeBWorK::ContentGenerator::Problem", |
482 | $problemPage{$probID} = $urlpath->newFromModule("WeBWorK::ContentGenerator::Problem", |
| 481 | courseID => $courseName, setID => $setName, problemID => $probID); |
483 | courseID => $courseName, setID => $setName, problemID => $probID); |
|
|
484 | |
| 482 | } |
485 | } |
| 483 | |
486 | |
| 484 | ##################################################################################### |
487 | ##################################################################################### |
| 485 | # Table showing the percentage of students with correct answers for each problems |
488 | # Table showing the percentage of students with correct answers for each problems |
| 486 | ##################################################################################### |
489 | ##################################################################################### |