--- loncom/interface/statistics/lonsubmissiontimeanalysis.pm 2005/03/04 20:34:15 1.19 +++ loncom/interface/statistics/lonsubmissiontimeanalysis.pm 2012/05/03 11:21:33 1.34 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonsubmissiontimeanalysis.pm,v 1.19 2005/03/04 20:34:15 matthew Exp $ +# $Id: lonsubmissiontimeanalysis.pm,v 1.34 2012/05/03 11:21:33 goltermann Exp $ # # Copyright Michigan State University Board of Trustees # @@ -28,16 +28,16 @@ package Apache::lonsubmissiontimeanalysis; use strict; -use Apache::lonnet(); +use Apache::lonnet; use Apache::loncommon(); use Apache::lonhtmlcommon(); +use Apache::lonquickgrades(); use Apache::loncoursedata(); use Apache::lonstatistics; use Apache::lonstathelpers; use Apache::lonlocal; use HTML::Entities(); use Time::Local(); -use Spreadsheet::WriteExcel(); my $plotcolors = ['#33ff00', '#ff33cc', '#990000', '#aaaa66', '#663399', '#ff9933', @@ -67,25 +67,32 @@ sub BuildSubmissionTimePage { # &Apache::lonstatistics::PrepareClasslist(); # + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Submission Time Plots')); + &Apache::lonquickgrades::startGradeScreen($r,'statistics'); $r->print(&CreateInterface()); # my @Students = @Apache::lonstatistics::Students; # if (@Students < 1) { - $r->print('
'. + &Apache::lonstatistics::section_and_enrollment_description(). + '
'); $r->rflush(); + $r->print(''. - '
'.&mt('Begin').' | '. - ''.(' 'x3).' | '. ''.&mt('End').' | '. - ''.&mt('Submissions').' | '. - ''.(' 'x3).' | '. - ''.&mt('Correct Submissions').' | '. - ''.(' 'x3).' | '. - ''.&mt('Cumulative Correct of those attempting the problem').' | '. - ''.(' 'x3).' | '. - ''.&mt('Cumulative Percent Correct of those attempting the problem').' | '. - ''.&mt('Submissions (plotted)').' | '. + ''.&mt('Correct Submissions (not plotted)').' | '. + ''.&mt('Cumulative Correct of those attempting the problem (not plotted)').' | '. + ''.&mt('Cumulative Percent Correct of those attempting the problem (not plotted)').' | '. + ''.&mt('Cumulative Percent Correct of selected students (plotted)').' | '. + &Apache::loncommon::end_data_table_row(). + &Apache::loncommon::end_data_table_header_row(). ''; my @CumulativeCorrect=(0); - my @CumulativeCorrectPercent; + my @corr_as_percent_of_selected; + my @corr_as_percent_of_answering; for (my $i=0;$i<=$#Ydata;$i++) { $CumulativeCorrect[$i]=$CumulativeCorrect[-1]+$AnsData[$i]; - $CumulativeCorrectPercent[$i] = sprintf('%3.1f',100*$CumulativeCorrect[$i]/$numstudents); + $corr_as_percent_of_answering[$i] = + sprintf('%3.1f',100*$CumulativeCorrect[$i]/$numstudents); + $corr_as_percent_of_selected[$i] = + sprintf('%3.1f',100*$CumulativeCorrect[$i]/scalar(@$students)); if ($Ydata[$i] != 0) { next if (! defined($BinEnd[$i]) || $BinEnd[$i] == 0); - $htmltable .= - '
---|---|---|---|---|---|---|---|---|---|---|---|
'.
&Apache::lonlocal::locallocaltime($BinEnd[$i]-$binsize).
- ' | '.
- ' | '.
- ' | '.
+ ''.
&Apache::lonlocal::locallocaltime($BinEnd[$i]).' | '.
- ' | '.
+ ''.
''.$Ydata[$i].(' 'x3).' | '. - ''. ' | '.$AnsData[$i].(' 'x3).' | '. - ''. ' | '.$CumulativeCorrect[$i].' | '. - ''. - ' | '.$CumulativeCorrectPercent[$i].' | '. - ''.$corr_as_percent_of_answering[$i].' | '. + ''.$corr_as_percent_of_selected[$i].' | '. + &Apache::loncommon::end_data_table_row().$/; } } - $htmltable .= '
'; - $Str .= '
'.&mt('Sections').' | '; - $Str .= ''.&mt('Enrollment Status').' | '; - $Str .= ''.&mt('Sections').' | '; + $Str .= ''.&mt('Groups').' | '; + $Str .= ''.&mt('Access Status').' | '; + $Str .= &Apache::loncommon::end_data_table_header_row(); ## ## - $Str .= '
---|---|---|---|
'."\n"; + $Str .= &Apache::loncommon::start_data_table_row(); + $Str .= ' | '."\n"; $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',4); $Str .= ' | '; # + $Str .= ''."\n"; + $Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',4); + $Str .= ' | '; + # $Str .= ''; $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,4); $Str .= ' | '; # - $Str .= '