--- loncom/interface/statistics/lonproblemanalysis.pm	2003/11/11 22:07:46	1.48
+++ loncom/interface/statistics/lonproblemanalysis.pm	2004/01/08 19:20:12	1.53
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemanalysis.pm,v 1.48 2003/11/11 22:07:46 matthew Exp $
+# $Id: lonproblemanalysis.pm,v 1.53 2004/01/08 19:20:12 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -49,7 +49,7 @@ my @SubmitButtons = ({ name => 'ProblemA
                      { name => 'updatecaches',
                        text => 'Update Student Data' },
                      { name => 'SelectAnother',
-                       text => 'Choose a different resource' },
+                       text => 'Choose a different Problem' },
                      { name => 'ExcelOutput',
                        text => 'Produce Excel Output' });
 
@@ -73,6 +73,19 @@ sub render_resource {
 sub BuildProblemAnalysisPage {
     my ($r,$c)=@_;
     #
+    my %Saveable_Parameters = ('Status' => 'scalar',
+                               'Section' => 'array',
+                               'NumPlots' => 'scalar',
+                               'AnalyzeAs' => 'scalar',
+                               'AnalyzeOver' => 'scalar',
+                               );
+    &Apache::loncommon::store_course_settings('problem_analysis',
+                                              \%Saveable_Parameters);
+    &Apache::loncommon::restore_course_settings('problem_analysis',
+                                                \%Saveable_Parameters);
+    #
+    &Apache::lonstatistics::PrepareClasslist();
+    #
     $r->print('<h2>'.&mt('Option Response Problem Analysis').'</h2>');
     $r->print(&CreateInterface());
     #
@@ -1390,6 +1403,8 @@ sub CreateInterface {
     { # These braces are here to organize the code, not scope it.
         {
             $Str .= '<nobr>'.&mt('Analyze Over ');
+            $Str .= &Apache::loncommon::help_open_topic
+                                                  ('Analysis_Analyze_Over');
             $Str .='<select name="AnalyzeOver" >';
             $Str .= '<option value="Tries" ';
             if (! exists($ENV{'form.AnalyzeOver'}) || 
@@ -1401,10 +1416,13 @@ sub CreateInterface {
             $Str .= '<option value="Time" ';
             $Str .= ' selected ' if ($ENV{'form.AnalyzeOver'} eq 'Time');
             $Str .= '>'.&mt('Time').'</option>';
-            $Str .= '</select></nobr><br />';
+            $Str .= '</select>';
+            $Str .= '</nobr><br />';
         }
         {
             $Str .= '<nobr>'.&mt('Analyze as ');
+            $Str .= &Apache::loncommon::help_open_topic
+                                                  ('Analysis_Analyze_as');
             $Str .='<select name="AnalyzeAs" >';
             $Str .= '<option value="Concepts" ';
             if (! exists($ENV{'form.AnalyzeAs'}) || 
@@ -1420,6 +1438,8 @@ sub CreateInterface {
         }
         {
             $Str .= '<br /><nobr>'.&mt('Number of Plots:');
+            $Str .= &Apache::loncommon::help_open_topic
+                                                  ('Analysis_num_plots');
             $Str .= '<select name="NumPlots">';
             if (! exists($ENV{'form.NumPlots'}) 
                 || $ENV{'form.NumPlots'} < 1 
@@ -1478,10 +1498,14 @@ sub ProblemSelector {
                         if ($ENV{'form.problemchoice'} eq $value) {
                             $checked = 'checked ';
                         }
+                        my $title = $res->{'title'};
+                        if (! defined($title) || $title eq '') {
+                            ($title) = ($res->{'src'} =~ m:/([^/]*)$:);
+                        }
                         $seq_str .= '<tr><td>'.
   '<input type="radio" name="problemchoice" value="'.$value.'" '.$checked.'/>'.
   '</td><td>'.
-  '<a href="'.$res->{'src'}.'">'.$res->{'title'}.'</a> ';
+  '<a href="'.$res->{'src'}.'">'.$title.'</a> ';
 #  '<a href="'.$res->{'src'}.'">'.$resptype.' '.$res->{'title'}.'</a> ';
                         if ($partdata->{'option'} > 1) {
                             $seq_str .= &mt('response').' '.$respid;