--- loncom/interface/statistics/lonstathelpers.pm 2005/02/01 15:15:28 1.36 +++ loncom/interface/statistics/lonstathelpers.pm 2005/02/23 02:03:42 1.38 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstathelpers.pm,v 1.36 2005/02/01 15:15:28 matthew Exp $ +# $Id: lonstathelpers.pm,v 1.38 2005/02/23 02:03:42 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1354,7 +1354,6 @@ sub manage_caches { } sub gather_full_student_data { - &Apache::lonnet::logthis('called gather_full_student_data'); my ($r,$formname,$inputname) = @_; my $status_type; if (defined($formname)) { @@ -1387,6 +1386,57 @@ sub gather_full_student_data { return; } +#################################################### +#################################################### + +=pod + +=item &submission_report_form + +Input: The originating reportSelected value for the current stats page. + +Output: Scalar containing HTML with needed form elements and a link to +the student submission reports page. + +=cut + +#################################################### +#################################################### +sub submission_report_form { + my ($original_report) = @_; + # Note: In the link below we change the reportSelected value. If + # the user hits the 'back' button on the browser after getting their + # student submissions report, this value may still be around. So we + # output a script block to set it properly. If the $original_report + # value is unset, you are just asking for trouble. + if (! defined($original_report)) { + &Apache::lonnet::logthis + ('someone called lonstathelpers::submission_report_form without '. + ' enough input.'); + } + my $html = $/. + ''. + ''. + ''. + ''; + my $output_selector = $/.''.$/; + my $link = ''; + $html.= &mt('View data as [_1] [_2]go[_3]',$output_selector, + $link,'').$/; + return $html +} #################################################### ####################################################