Diff for /loncom/interface/statistics/lonsurveyreports.pm between versions 1.5 and 1.6

version 1.5, 2005/03/14 20:28:22 version 1.6, 2005/03/17 19:02:45
Line 125  sub BuildSurveyReportsPage { Line 125  sub BuildSurveyReportsPage {
             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(&Apache::lonstathelpers::render_resource($resource));              if ($ENV{'form.renderprob'} eq 'true') {
                   $r->print(&Apache::lonstathelpers::render_resource($resource));
               }
             $r->rflush();              $r->rflush();
             my %Data = &Apache::lonstathelpers::get_problem_data              my %Data = &Apache::lonstathelpers::get_problem_data
                 ($resource->src);                  ($resource->src);
               &Compile_Student_Answers($current_problem,\%Data,\@Students);
             if ($ENV{'form.output'} eq 'HTML' ||               if ($ENV{'form.output'} eq 'HTML' || 
                 ! defined($ENV{'form.output'})) {                  ! defined($ENV{'form.output'})) {
                 &make_HTML_report($r,$current_problem,\%Data,\@Students);                  &make_HTML_report($r,$current_problem,\%Data,\@Students);
Line 268  sub Compile_Student_Answers { Line 271  sub Compile_Student_Answers {
 #########################################################  #########################################################
 sub make_Excel_report {  sub make_Excel_report {
     my ($r,$problem,$problem_data,$students) = @_;      my ($r,$problem,$problem_data,$students) = @_;
     &Compile_Student_Answers($problem,$problem_data,$students);  
     my ($workbook,$filename,$format) = &Apache::loncommon::create_workbook($r);      my ($workbook,$filename,$format) = &Apache::loncommon::create_workbook($r);
     if (! defined($workbook)) { return '';}      if (! defined($workbook)) { return '';}
     $r->print('<script>'.      $r->print('<script>'.
Line 384  sub make_Excel_report { Line 386  sub make_Excel_report {
 #########################################################  #########################################################
 sub make_HTML_report {  sub make_HTML_report {
     my ($r,$problem,$ProblemData,$Students) = @_;      my ($r,$problem,$ProblemData,$Students) = @_;
     &Compile_Student_Answers($problem,$ProblemData,$Students);  
     # &output_hash('',$ProblemData);  
     my $resource = $problem->{'resource'};      my $resource = $problem->{'resource'};
     foreach my $partid (@{$resource->parts}) {      foreach my $partid (@{$resource->parts}) {
         my @response_ids   = $resource->responseIds($partid);          my @response_ids   = $resource->responseIds($partid);
Line 532  sub CreateInterface { Line 532  sub CreateInterface {
     $Str .= '<p>';      $Str .= '<p>';
     $Str .= '<table cellspacing="5">'."\n";      $Str .= '<table cellspacing="5">'."\n";
     $Str .= '<tr>';      $Str .= '<tr>';
     $Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>';      $Str .= '<th>'.&mt('Sections').'</th>';
     $Str .= '<td align="center"><b>'.&mt('Enrollment Status').'</b></td>';      $Str .= '<th>'.&mt('Enrollment Status').'</th>';
     $Str .= '<td align="center"><b>'.&mt('Output Format').'</b></td>';      $Str .= '<th>'.&mt('Output Format').'</th>';
       $Str .= '<th>'.'&nbsp;'.'</th>';
     $Str .= '</tr>'."\n";      $Str .= '</tr>'."\n";
     #      #
     $Str .= '<tr><td align="center">'."\n";      $Str .= '<tr><td align="center">'."\n";
Line 547  sub CreateInterface { Line 548  sub CreateInterface {
     #      #
     $Str .= '<td align="center">'.$output_selector.'</td>';      $Str .= '<td align="center">'.$output_selector.'</td>';
     #      #
       # Render problem checkbox
       my $prob_checkbox = '<input type="checkbox" name="renderprob" ';
       if (exists($ENV{'form.renderprob'}) && $ENV{'form.renderprob'} eq 'true') {
           $prob_checkbox .= 'checked ';
       }
       $prob_checkbox .= 'value="true" />';
       $Str .= '<td align="right" valign="top">'.
           '<label><b>'.
           &mt('Show problem [_1]',$prob_checkbox).'</b></label><br />'.
           '<label><b>'.
           '</td>';
       #
     $Str .= '</tr>'."\n";      $Str .= '</tr>'."\n";
     $Str .= '</table>'."\n";      $Str .= '</table>'."\n";
     #      #

Removed from v.1.5  
changed lines
  Added in v.1.6


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