--- loncom/interface/lonstatistics.pm 2003/06/10 19:19:57 1.76 +++ loncom/interface/lonstatistics.pm 2003/08/27 21:33:33 1.79 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstatistics.pm,v 1.76 2003/06/10 19:19:57 matthew Exp $ +# $Id: lonstatistics.pm,v 1.79 2003/08/27 21:33:33 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -797,6 +797,44 @@ sub SectionSelect { return $Str; } +############################################### +############################################### + +=pod + +=item &Gather_Student_Data() + +Ensures all student data is up to date. + +=cut + +############################################### +############################################### +sub Gather_Student_Data { + my ($r) = @_; + my $c = $r->connection(); + # + my @Sequences = &Apache::lonstatistics::Sequences_with_Assess(); + # + my @Students = @Apache::lonstatistics::Students; + # + # Open the progress window + my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin + ($r,'Statistics Compilation Status', + 'Statistics Compilation Progress', scalar(@Students)); + # + while (my $student = shift @Students) { + return if ($c->aborted()); + my ($status,undef) = &Apache::loncoursedata::ensure_current_data + ($student->{'username'},$student->{'domain'}, + $ENV{'request.course.id'}); + &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state, + 'last student'); + } + &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); + $r->rflush(); +} + ################################################## ################################################## sub DisplayClasslist { @@ -805,8 +843,46 @@ sub DisplayClasslist { my @Fields = ('fullname','username','domain','id','section'); # my $Str=''; + if (! @Students) { + if ($SelectedSections[0] eq 'all') { + if (lc($ENV{'form.Status'}) eq 'any') { + $Str .= '
'."\n";
$Str .= '
'."\n"; + $Str = ''; +# $Str .= '
'."\n"; # return $Str; } @@ -987,8 +1064,6 @@ END &Apache::lonstudentassessment::BuildStudentAssessmentPage($r,$c); } elsif($GoToPage eq 'DoDiffGraph' || $GoToPage eq 'PercentWrongGraph') { # &Apache::lonproblemstatistics::BuildGraphicChart($r,$c); - } elsif($GoToPage eq 'classlist') { - &DisplayClasslist($r); } elsif($GoToPage eq 'Correct-problems Plot') { # &Apache::lonpercentage::BuildPercentageGraph($r,$c); } |