Diff for /loncom/interface/statistics/lonproblemanalysis.pm between versions 1.132 and 1.143

version 1.132, 2008/10/30 17:45:25 version 1.143, 2012/12/17 03:51:02
Line 31  use Apache::lonnet; Line 31  use Apache::lonnet;
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonhtmlcommon();  use Apache::lonhtmlcommon();
 use Apache::loncoursedata();  use Apache::loncoursedata();
   use Apache::lonquickgrades();
 use Apache::lonstatistics;  use Apache::lonstatistics;
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonstathelpers();  use Apache::lonstathelpers();
Line 73  sub BuildProblemAnalysisPage { Line 74  sub BuildProblemAnalysisPage {
     #      #
     &Apache::lonstatistics::PrepareClasslist();      &Apache::lonstatistics::PrepareClasslist();
     #      #
       $r->print(&Apache::lonhtmlcommon::breadcrumbs('Detailed Problem Analysis'));
       &Apache::lonquickgrades::startGradeScreen($r,'statistics');
   
     $r->print(&CreateInterface());      $r->print(&CreateInterface());
     #      #
     my @Students = @Apache::lonstatistics::Students;      my @Students = @Apache::lonstatistics::Students;
Line 142  sub BuildProblemAnalysisPage { Line 146  sub BuildProblemAnalysisPage {
             my $resource = $current_problem->{'resource'};              my $resource = $current_problem->{'resource'};
             $r->print('<h1>'.$resource->compTitle.'</h1>');              $r->print('<h1>'.$resource->compTitle.'</h1>');
             $r->print('<h3>'.$resource->src.'</h3>');              $r->print('<h3>'.$resource->src.'</h3>');
             $r->print('<h4>'.&Apache::lonstatistics::section_and_enrollment_description().'</h4>');              $r->print('<p>'.&Apache::lonstatistics::section_and_enrollment_description().'</p>');
             if ($env{'form.show_prob'} eq 'true') {              if ($env{'form.show_prob'} eq 'true') {
                 $r->print('<hr />'                  $r->print('<hr />'
                          .&Apache::lonstathelpers::render_resource($resource)                           .&Apache::lonstathelpers::render_resource($resource)
Line 626  sub numerical_determine_answers { Line 630  sub numerical_determine_answers {
     my ($r,$resource,$partid,$respid,$students)=@_;      my ($r,$resource,$partid,$respid,$students)=@_;
     my $c = $r->connection();      my $c = $r->connection();
     #      #
     my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin      my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,scalar(@$students));
         ($r,'Student Answer Compilation Status',  
          'Student Answer Compilation Progress', scalar(@$students),  
          'inline',undef,'Statistics','stats_status');  
     #      #
     # Read in the cache (if it exists) before we start timing things.      # Read in the cache (if it exists) before we start timing things.
     &Apache::lonstathelpers::ensure_proper_cache($resource->{'symb'});      &Apache::lonstathelpers::ensure_proper_cache($resource->{'symb'});
Line 663  sub numerical_determine_answers { Line 664  sub numerical_determine_answers {
         }          }
         $answers{$correct->{$sname.':'.$sdom}{'answer'}}++;          $answers{$correct->{$sname.':'.$sdom}{'answer'}}++;
         &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,          &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,
                                                  &mt('last student'));                                                       'last student');
     }      }
     &Apache::lonstathelpers::write_analysis_cache();      &Apache::lonstathelpers::write_analysis_cache();
     &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);      &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
Line 1332  sub OR_tries_analysis { Line 1333  sub OR_tries_analysis {
             if ($try > 1) {              if ($try > 1) {
                 $analysis_html.= '<tr><td colspan="4">'                  $analysis_html.= '<tr><td colspan="4">'
                                 .'<div class="LC_info">'                                  .'<div class="LC_info">'
                                 .&mt('None of the selected students attempted the problem more than [_1] times.'                                  .&mt('None of the selected students attempted the problem more than [quant,_1,time].'
                                     ,$try-1)                                      ,$try-1)
                                 .'</div>'                                  .'</div>'
                                 .'</td></tr>';                                  .'</td></tr>';
Line 1477  sub OR_time_analysis { Line 1478  sub OR_time_analysis {
     #      #
     if ($num_concepts < 2) {      if ($num_concepts < 2) {
         $table = '<h3>'.          $table = '<h3>'.
             &mt('Not enough data for concept analysis.  '.                   &mt('Not enough data for concept analysis.').' '.
                 'Performing Foil Analysis').                   &mt('Performing Foil Analysis').
                 '</h3>'.$table;                   '</h3>'.$table;
     }      }
     #      #
     my $num_plots = $env{'form.NumPlots'};      my $num_plots = $env{'form.NumPlots'};
Line 1558  sub OR_time_analysis { Line 1559  sub OR_time_analysis {
         $table .= '<tr><td colspan="4" align="center">'.          $table .= '<tr><td colspan="4" align="center">'.
             &mt('Start time: [_1]',$startdateform).'<br />'.              &mt('Start time: [_1]',$startdateform).'<br />'.
             &mt('End time: [_1]',$enddateform).'</td></tr>'.$/;              &mt('End time: [_1]',$enddateform).'</td></tr>'.$/;
         $table.= '<tr><td colspan="4">&nbsp</td></tr>'.$/;          $table.= '<tr><td colspan="4">&nbsp;</td></tr>'.$/;
     }      }
     $table .= '</table>';      $table .= '</table>';
     #      #
Line 1875  sub CreateInterface { Line 1876  sub CreateInterface {
     ##      ##
     ## Build the menu      ## Build the menu
     my $Str = '';      my $Str = '';
     $Str .= &Apache::lonhtmlcommon::breadcrumbs('Detailed Problem Analysis');  
     $Str .= '<p>';      $Str .= '<p>';
     $Str .= &Apache::loncommon::start_data_table();      $Str .= &Apache::loncommon::start_data_table();
     $Str .= &Apache::loncommon::start_data_table_header_row();      $Str .= &Apache::loncommon::start_data_table_header_row();
Line 1901  sub CreateInterface { Line 1901  sub CreateInterface {
     #      #
     ##      ##
     ##      ##
     $Str .= '<td align="right" valign="top">';      $Str .= '<td valign="top">';
     ##      ##
     my $showprob_checkbox =       my $showprob_checkbox = 
         '<input type="checkbox" name="show_prob" value="true" ';          '<input type="checkbox" name="show_prob" value="true"';
     if ($env{'form.show_prob'} eq 'true') {      if ($env{'form.show_prob'} eq 'true') {
         $showprob_checkbox .= 'checked="checked" ';          $showprob_checkbox .= ' checked="checked"';
     }      }
     $showprob_checkbox.= ' />';      $showprob_checkbox.= ' />';
     $Str.= '<nobr><label>'.      $Str.= '<span class="LC_nobreak"><label>'.
         &mt('Show problem [_1]',$showprob_checkbox).          $showprob_checkbox.' '.&mt('Show problem').
         '</label></nobr><br />';          '</label></span><br />';
     ##      ##
     my $analyze_selector = '<select name="AnalyzeOver" >';      my $analyze_selector = '<select name="AnalyzeOver" >';
     $analyze_selector .= '<option value="tries" ';      $analyze_selector .= '<option value="tries" ';
Line 1925  sub CreateInterface { Line 1925  sub CreateInterface {
     $analyze_selector .= ' selected ' if ($env{'form.AnalyzeOver'} eq 'time');      $analyze_selector .= ' selected ' if ($env{'form.AnalyzeOver'} eq 'time');
     $analyze_selector .= '>'.&mt('Time').'</option>';      $analyze_selector .= '>'.&mt('Time').'</option>';
     $analyze_selector .= '</select>';      $analyze_selector .= '</select>';
     $Str .= '<nobr><label>'.      $Str .= '<span class="LC_nobreak"><label>'.
         &mt('Analyze Over [_1] [_2]',          &mt('Analyze Over [_1] [_2]',
             $analyze_selector,              $analyze_selector,
             &Apache::loncommon::help_open_topic('Analysis_Analyze_Over')).              &Apache::loncommon::help_open_topic('Analysis_Analyze_Over')).
             '</label></nobr><br />'.$/;              '</label></span><br />'.$/;
     ##      ##
     my $numplots_selector = '<select name="NumPlots">';      my $numplots_selector = '<select name="NumPlots">';
     if (! exists($env{'form.NumPlots'})       if (! exists($env{'form.NumPlots'}) 
Line 1942  sub CreateInterface { Line 1942  sub CreateInterface {
         if ($env{'form.NumPlots'} == $i) { $numplots_selector.=' selected="selected" '; }          if ($env{'form.NumPlots'} == $i) { $numplots_selector.=' selected="selected" '; }
         $numplots_selector .= '>'.$i.'</option>';          $numplots_selector .= '>'.$i.'</option>';
     }      }
     $numplots_selector .= '</select></nobr><br />';      $numplots_selector .= '</select>';
     $Str .= '<nobr><label>'.&mt('Number of Plots [_1]',$numplots_selector).      $Str .= '<span class="LC_nobreak"><label>'.&mt('Number of Plots [_1]',$numplots_selector).
         '</label></nobr>';          '</label></span><br />';
     ##      ##
     $Str .= '</td>';      $Str .= '</td>';
     ##      ##

Removed from v.1.132  
changed lines
  Added in v.1.143


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>