--- loncom/interface/statistics/lonproblemstatistics.pm 2003/08/27 21:33:33 1.56 +++ loncom/interface/statistics/lonproblemstatistics.pm 2003/09/29 16:20:18 1.59 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemstatistics.pm,v 1.56 2003/08/27 21:33:33 matthew Exp $ +# $Id: lonproblemstatistics.pm,v 1.59 2003/09/29 16:20:18 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -54,8 +54,16 @@ use Apache::lonnet(); use Apache::lonhtmlcommon; use Apache::loncoursedata; use Apache::lonstatistics; +use Apache::lonlocal; use Spreadsheet::WriteExcel; +## +## Localization notes: +## +## in @Fields[0]->{'long_title'} is placed in Excel files and is used as the +## header for plots created with Graph.pm, both of which more than likely do +## not support localization. +## my @Fields = ( { name => 'problem_num', title => 'P#', @@ -174,64 +182,6 @@ select sections, maps, and output. ############################################### ############################################### -sub CreateInterface { - my $Str = ''; - $Str .= '
Sections | '; - $Str .= 'Enrollment Status | '; - $Str .= 'Sequences and Folders | '; - $Str .= 'Output | '; - $Str .= '
'."\n"; - $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5); - $Str .= ' | '; - $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5); - $Str .= ' | '; - # - my $only_seq_with_assessments = sub { - my $s=shift; - if ($s->{'num_assess'} < 1) { - return 0; - } else { - return 1; - } - }; - $Str .= &Apache::lonstatistics::MapSelect('Maps','multiple,all',5, - $only_seq_with_assessments); - $Str .= ' | '."\n"; - $Str .= &CreateAndParseOutputSelector(); - $Str .= ' |
'.&mt('Sections').' | '; + $Str .= ''.&mt('Enrollment Status').' | '; + $Str .= ''.&mt('Sequences and Folders').' | '; + $Str .= ''.&mt('Output').' | '; + $Str .= '
'."\n"; + $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5); + $Str .= ' | '; + $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5); + $Str .= ' | '; # - # Build the form element - $Str = qq/"; - return $Str; + }; + $Str .= &Apache::lonstatistics::MapSelect('Maps','multiple,all',5, + $only_seq_with_assessments); + $Str .= ' | '."\n"; + my ($html,$outputmode,$show) = + &Apache::lonstatistics::CreateAndParseOutputSelector( + 'statsoutputmode', + 'HTML problem statistics grouped', + @OutputOptions); + $Str .= $html; + $Str .= ' |