--- loncom/interface/statistics/lonstudentassessment.pm 2005/04/07 06:56:24 1.121 +++ loncom/interface/statistics/lonstudentassessment.pm 2005/04/08 13:44:43 1.123 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentassessment.pm,v 1.121 2005/04/07 06:56:24 albertel Exp $ +# $Id: lonstudentassessment.pm,v 1.123 2005/04/08 13:44:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -430,14 +430,9 @@ sub CreateAndParseOutputSelector { [$elementname]); # # Format for output options is 'mode, restrictions'; - my $selected = 'html, without links'; - if (exists($env{'form.'.$elementname})) { - if (ref($env{'form.'.$elementname} eq 'ARRAY')) { - $selected = $env{'form.'.$elementname}->[0]; - } else { - $selected = $env{'form.'.$elementname}; - } - } + my $selected = (&Apache::loncommon::get_env_multiple('form.'.$elementname))[0]; + $selected = 'html, without links' if (!$selected); + # # Set package variables describing output mode $show_links = 'no'; @@ -551,14 +546,9 @@ sub CreateAndParseOutputDataSelector { my $Str = ''; my $elementname = 'chartoutputdata'; # - my $selected = 'scores'; - if (exists($env{'form.'.$elementname})) { - if (ref($env{'form.'.$elementname} eq 'ARRAY')) { - $selected = $env{'form.'.$elementname}->[0]; - } else { - $selected = $env{'form.'.$elementname}; - } - } + my $selected = (&Apache::loncommon::get_env_multiple('form.'.$elementname))[0]; + $selected = 'scores' if (!$selected); + # $chosen_output = $OutputDataOptions[0]; foreach my $option (@OutputDataOptions) { @@ -720,6 +710,21 @@ sub html_initialize { $Str .= "
";
     $r->print($Str);
     $r->rflush();
+    #
+    # Let the user know what we are doing
+    my $studentcount = scalar(@Apache::lonstatistics::Students); 
+    if ($env{'form.SelectedStudent'}) {
+        $studentcount = '1';
+    }
+    #
+    # Initialize progress window
+    %prog_state=&Apache::lonhtmlcommon::Create_PrgWin
+        ($r,'HTML Chart Status',
+         'HTML Chart Progress', $studentcount,
+         'inline',undef,'Statistics','stats_status');
+    #
+    &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,
+                                          'Processing first student');
     return;
 }
 
@@ -832,6 +837,7 @@ sub html_outputstudent {
     $r->print($Str);
     #
     $r->rflush();
+    &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,'last student');
     return;
 }    
 
@@ -849,6 +855,7 @@ sub html_finish {
         }
     }
     $r->rflush();
+    &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
     undef($navmap);
     return;
 }