--- loncom/interface/statistics/loncorrectproblemplot.pm 2008/10/30 17:45:25 1.24 +++ loncom/interface/statistics/loncorrectproblemplot.pm 2012/05/07 10:12:42 1.28 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncorrectproblemplot.pm,v 1.24 2008/10/30 17:45:25 bisitz Exp $ +# $Id: loncorrectproblemplot.pm,v 1.28 2012/05/07 10:12:42 goltermann Exp $ # # Copyright Michigan State University Board of Trustees # @@ -31,6 +31,7 @@ use strict; use Apache::lonnet; use Apache::loncommon(); use Apache::lonhtmlcommon(); +use Apache::lonquickgrades(); use Apache::loncoursedata(); use Apache::lonstatistics; use Apache::lonstathelpers; @@ -67,6 +68,9 @@ sub BuildCorrectProblemsPage { \%Saveable_Parameters); # &Apache::lonstatistics::PrepareClasslist(); + + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Correct Problems Plot')); + &Apache::lonquickgrades::startGradeScreen($r,'statistics'); # $r->print(&CreateInterface()); # @@ -123,9 +127,9 @@ sub BuildCorrectProblemsPage { } } } - $r->print('

'. + $r->print('

'. &Apache::lonstatistics::section_and_enrollment_description(). - '

'); + '

'); my ($starttime,$endtime) = &Apache::lonstathelpers::get_time_limits(); if (defined($starttime) || defined($endtime)) { # Inform the user what the time limits on the data are. @@ -142,7 +146,7 @@ sub BuildCorrectProblemsPage { $starttime,$endtime); $r->print(&AnalyzeScoreData($score_data,$title,$total_weights)); } else { - $r->print('

'.&mt('Make a sequence selection from the "Sequences and Folders" menu and hit "Create Plot" to begin').'

'); + $r->print('

'.&mt('Make a sequence selection from the "Sequences and Folders" menu and hit "Create Plot" to begin').'

'); } return; } @@ -166,7 +170,7 @@ sub AnalyzeScoreData { # # Basic check first if (ref($score_data) ne 'ARRAY' || @$score_data < 1) { - return '

'.&mt('There is no data to plot').'

'; + return '

'.&mt('There is no data to plot').'

'; } # # Determine which bins to use @@ -188,7 +192,10 @@ sub AnalyzeScoreData { '

'. &mt('Problem weights do not reflect individual student settings.') .'

'. - ''."\n".''."\n"; + &Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row(). + ''. + &Apache::loncommon::end_data_table_header_row(); my $sum = 0; while (my $bin = shift(@Bins)) { push (@Xdata,$bin->{'start'}); @@ -197,12 +204,14 @@ sub AnalyzeScoreData { if ($bin->{'count'} > $max) { $max = $bin->{'count'}; } - $Str.= ''. - ''."\n"; + $Str.= &Apache::loncommon::start_data_table_row(). + ''. + ''. + &Apache::loncommon::end_data_table_row().'
'; } # scale max to an integer. $max = 5*(int($max/5)+1); - $Str .= "
RangeCount
'.&mt('Range').''.&mt('Count').'
'.$bin->{'start'}.' - '.$bin->{'end'}.''.$bin->{'count'}.'
'.$bin->{'start'}.' - '.$bin->{'end'}.''.$bin->{'count'}.'

\n"; + $Str .= &Apache::loncommon::end_data_table()."
\n"; $title = &HTML::Entities::decode($title); $Str = "\n

". &Apache::loncommon::DrawBarGraph($title.' ('.$sum.' students)', @@ -290,7 +299,6 @@ sub CreateInterface { ## ## Environment variable initialization my $Str; - $Str .= &Apache::lonhtmlcommon::breadcrumbs('Correct Problems Plot'); $Str .= '

'; # $Str .= &Apache::loncommon::start_data_table(); @@ -324,13 +332,6 @@ sub CreateInterface { # $Str .= &Apache::loncommon::end_data_table_row(); $Str .= &Apache::loncommon::end_data_table(); - # - $Str .= '

' - .&mt('Status: [_1]', - '') - .'

'; - $Str .= '

'; ## return $Str; }