--- loncom/interface/statistics/lonproblemstatistics.pm 2004/10/06 15:37:59 1.94 +++ loncom/interface/statistics/lonproblemstatistics.pm 2005/01/11 19:45:18 1.96 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemstatistics.pm,v 1.94 2004/10/06 15:37:59 matthew Exp $ +# $Id: lonproblemstatistics.pm,v 1.96 2005/01/11 19:45:18 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -231,6 +231,17 @@ my @Fields = ( selectable => 'yes', defaultselected => 'yes', }, + { name => 'tries_per_correct', + title => 'tries/correct', + align => 'right', + color => '#FFDDDD', + format => '%4.1f', + sortable => 'yes', + graphable => 'yes', + long_title => 'Tries per Correct Answer', + selectable => 'yes', + defaultselected => 'yes', + }, { name => 'num_wrong', title => '#Wrng', align => 'right', @@ -342,6 +353,17 @@ my @Fields = ( # selectable => 'no', # defaultselected => 'yes', # }, +## weight included for research purposes. Commented out most of the time. +# { name => 'weight', +# title => 'weight', +# align => 'right', +# color => '#FFFFFF', +# sortable => 'no', +# graphable => 'no', +# long_title => 'Problem weight (for instructor)', +# selectable => 'no', +# defaultselected => 'yes', +# }, ); my @SeqFields = ( @@ -1564,6 +1586,9 @@ sub get_statistics { &Apache::lonnet::put('nohist_resevaldata',\%storestats,$dom,$user); } # + $data->{'tries_per_correct'} = $data->{'tries'} / + ($data->{'num_solved'}+0.1); + # # Get the due date for research purposes (commented out most of the time) # $data->{'duedate'} = # &Apache::lonnet::EXT('resource.'.$part.'.duedate',$symb); @@ -1573,6 +1598,8 @@ sub get_statistics { # &Apache::lonnet::EXT('resource.'.$part.'.maxtries',$symb); # $data->{'hinttries'} = # &Apache::lonnet::EXT('resource.'.$part.'.hinttries',$symb); +# $data->{'weight'} = +# &Apache::lonnet::EXT('resource.'.$part.'.weight',$symb); # $data->{'resptypes'} = join(',',@{$resource->{'partdata'}->{$part}->{'ResponseTypes'}}); return $data; }