--- loncom/interface/statistics/lonproblemanalysis.pm 2003/10/07 16:07:39 1.26 +++ loncom/interface/statistics/lonproblemanalysis.pm 2004/01/20 15:51:06 1.61 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemanalysis.pm,v 1.26 2003/10/07 16:07:39 matthew Exp $ +# $Id: lonproblemanalysis.pm,v 1.61 2004/01/20 15:51:06 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -24,7 +24,6 @@ # # http://www.lon-capa.org/ # - package Apache::lonproblemanalysis; use strict; @@ -34,228 +33,1382 @@ use Apache::lonhtmlcommon(); use Apache::loncoursedata(); use Apache::lonstatistics; use Apache::lonlocal; +use Apache::lonstathelpers; +use HTML::Entities(); +use Time::Local(); +use Spreadsheet::WriteExcel(); + +my $plotcolors = ['#33ff00', + '#0033cc', '#990000', '#aaaa66', '#663399', '#ff9933', + '#66ccff', '#ff9999', '#cccc33', '#660000', '#33cc66', + ]; + +my @SubmitButtons = ({ name => 'PrevProblemAnalysis', + text => 'Previous Problem' }, + { name => 'ProblemAnalysis', + text => 'Analyze Problem Again' }, + { name => 'NextProblemAnalysis', + text => 'Next Problem' }, + { name => 'break'}, + { name => 'ClearCache', + text => 'Clear Caches' }, + { name => 'updatecaches', + text => 'Update Student Data' }, + { name => 'SelectAnother', + text => 'Choose a different Problem' }, + { name => 'ExcelOutput', + text => 'Produce Excel Output' }); + sub BuildProblemAnalysisPage { my ($r,$c)=@_; + # + my %Saveable_Parameters = ('Status' => 'scalar', + 'Section' => 'array', + 'NumPlots' => 'scalar', + 'AnalyzeAs' => 'scalar', + 'AnalyzeOver' => 'scalar', + ); + &Apache::loncommon::store_course_settings('problem_analysis', + \%Saveable_Parameters); + &Apache::loncommon::restore_course_settings('problem_analysis', + \%Saveable_Parameters); + # + &Apache::lonstatistics::PrepareClasslist(); + # $r->print('