--- loncom/interface/statistics/lonproblemstatistics.pm 2004/04/01 21:14:32 1.80 +++ loncom/interface/statistics/lonproblemstatistics.pm 2004/05/14 20:30:17 1.85 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemstatistics.pm,v 1.80 2004/04/01 21:14:32 matthew Exp $ +# $Id: lonproblemstatistics.pm,v 1.85 2004/05/14 20:30:17 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -55,6 +55,7 @@ use Apache::loncommon(); use Apache::lonhtmlcommon; use Apache::loncoursedata; use Apache::lonstatistics; +use LONCAPA::lonmetadata(); use Apache::lonlocal; use Spreadsheet::WriteExcel; use Apache::lonstathelpers(); @@ -95,6 +96,10 @@ my %SeqStat; # keys are symbs, values ## statistics display? ## selected yes (yes|no) Is the column selected by default? ## +## format no sprintf format string +## +## excel_format no excel format type +## (see &Apache::loncommon::define_excel_formats my @Fields = ( { name => 'problem_num', title => 'P#', @@ -260,6 +265,39 @@ my @Fields = ( selectable => 'yes', defaultselected => 'no', }, +## duedate included for research purposes. Commented out most of the time. +# { name => 'duedate', +# title => 'Due Date', +# align => 'left', +# color => '#FFFFFF', +# sortable => 'yes', +# graphable => 'no', +# long_title => 'Due date of resource for instructor', +# selectable => 'no', +# defaultselected => 'yes', +# }, +## opendate included for research purposes. Commented out most of the time. +# { name => 'opendate', +# title => 'Open Date', +# align => 'left', +# color => '#FFFFFF', +# sortable => 'yes', +# graphable => 'no', +# long_title => 'date resource became answerable', +# selectable => 'no', +# defaultselected => 'yes', +# }, +## symb included for research purposes. Commented out most of the time. +# { name => 'symb', +# title => 'Symb', +# align => 'left', +# color => '#FFFFFF', +# sortable => 'yes', +# graphable => 'no', +# long_title => 'Unique LON-CAPA identifier for problem', +# selectable => 'no', +# defaultselected => 'yes', +# }, ); my @SeqFields = ( @@ -461,6 +499,11 @@ sub parse_field_selection { } } } + # + # Always show all the sequence statistics (for now) + foreach my $field (@SeqFields) { + $field->{'selected'} = 'yes'; + } return; } @@ -818,15 +861,9 @@ sub sequence_html_header { sub sequence_html_output { my ($seq) = @_; my $data = $SeqStat{$seq->{'symb'}}; -# $SeqStat{$symb}->{'max'} -# $SeqStat{$symb}->{'min'} -# $SeqStat{$symb}->{'mean'} -# $SeqStat{$symb}->{'std'} -# $SeqStat{$symb}->{'count'} -# $SeqStat{$symb}->{'max_possible'} my $row = ''; foreach my $field (@SeqFields) { -# next if ($field->{'selected'} ne 'yes'); + next if ($field->{'selected'} ne 'yes'); $row .= '{'align'})) { $row .= ' align="'.$field->{'align'}.'"'; @@ -970,6 +1007,11 @@ sub degrees_plot { my $diffdata .= ''.join(',',@Labels).''.$/. ''.join(',',@Diff).''.$/; # + my $title = 'Degree of Discrimination\nand Degree of Difficulty'; + if ($xmax > 50) { + $title = 'Degree of Discrimination and Degree of Difficulty'; + } + # $plot=<<"END"; - Degree of Discrmination and Degree of Difficulty + $title Problem Number '.join(',',@Mean).''.$/. ''.join(',',@STD).''.$/; # + my $title = 'Mean and S.D. of Tries'; + if ($xmax > 25) { + $title = 'Mean and Standard Deviation of Tries'; + } + # $plot=<<"END"; - Mean and S.D. of Tries + $title Problem Number + Number of Tries 'yes', name => 'degrees', - title => 'DoDisc and DoDiff' }, + title => 'Difficulty Indexes' }, { graphable=>'yes', name => 'tries statistics', - title => 'Mean and S.D. of Tries' }); + title => 'Tries Statistics' }); # my $Str= "\n".'