Diff for /loncom/interface/lonstatistics.pm between versions 1.148 and 1.148.2.5

version 1.148, 2009/12/16 13:00:45 version 1.148.2.5, 2010/09/12 17:40:33
Line 456  sub selected_sequences_with_assessments Line 456  sub selected_sequences_with_assessments
         return ('Can not open Coursemap');          return ('Can not open Coursemap');
     }      }
     #      #
     my @sequences = $navmap->retrieveResources(undef,      my $mapurl;
       if (&Apache::loncommon::needs_gci_custom()) {
           my $cid = $env{'request.course.id'};
           if ($cid) {
               $mapurl = '/uploaded/'.$env{'course.'.$cid.'.domain'}.'/'.$env{'course.'.$cid.'.num'}.'/default_1261144274.sequence';
           }
       }
       my @sequences = $navmap->retrieveResources($mapurl,
                                                sub { shift->is_map(); },1,0,1);                                                 sub { shift->is_map(); },1,0,1);
     my $toplevelseq = $navmap->getById('0.0');      unless (&Apache::loncommon::needs_gci_custom()) {
     if (!grep(/^\Q$toplevelseq\E$/,@sequences)) {          my $toplevelseq = $navmap->getById('0.0');
         unshift(@sequences,$toplevelseq);          if (!grep(/^\Q$toplevelseq\E$/,@sequences)) {
               unshift(@sequences,$toplevelseq);
           }
     }      }
   
     my @sequences_with_assessments;      my @sequences_with_assessments;
Line 504  sub map_select { Line 513  sub map_select {
         $form .= 'multiple="multiple" ';          $form .= 'multiple="multiple" ';
     }      }
     $form .= 'size="'.$numvisible.'" >'."\n";      $form .= 'size="'.$numvisible.'" >'."\n";
     #      unless (&Apache::loncommon::needs_gci_custom()) {
     # Put in option for 'all'          #
     $form .= '    <option value="all" ';          # Put in option for 'all'
     if ($selected_maps[0] eq 'all') {          $form .= '    <option value="all" ';
         $form .= 'selected ';          if ($selected_maps[0] eq 'all') {
               $form .= 'selected ';
           }
           $form .= ">all</option>\n";
     }      }
     $form .= ">all</option>\n";  
     #      #
     # Loop through the sequences      # Loop through the sequences
     my @sequences = &selected_sequences_with_assessments('all');      my @sequences = &selected_sequences_with_assessments('all');
Line 522  sub map_select { Line 533  sub map_select {
     }      }
     foreach my $seq (@sequences){      foreach my $seq (@sequences){
         $form .= '    <option value="'.$seq->symb.'" ';          $form .= '    <option value="'.$seq->symb.'" ';
         foreach (@selected_maps) {          if ((&Apache::loncommon::needs_gci_custom()) && (@selected_maps == 1)) {
             if ($seq->symb eq $_) {              $form .= 'selected ';
                 $form .= 'selected ';          } else {
                 last;              foreach (@selected_maps) {
                   if ($seq->symb eq $_) {
                       $form .= 'selected ';
                       last;
                   }
             }              }
         }          }
         $form .= '>'.$seq->compTitle."</option>\n";          $form .= '>'.$seq->compTitle."</option>\n";
Line 766  sub CreateMainMenu { Line 781  sub CreateMainMenu {
              icon => 'coprplot.png',               icon => 'coprplot.png',
              linktext => ('Correct Problems Plot'),               linktext => ('Correct Problems Plot'),
              linktitle => ('Display a histogram of student performance in the course.')},               linktitle => ('Display a histogram of student performance in the course.')},
          ]},           ]});
       if (&Apache::loncommon::needs_gci_custom()) {
           push(@reports,
           {categorytitle => 'Reports',
            items => [
               {url => '/adm/statistics?reportSelected=student_submission_reports',
                            permission => 'F',
                icon => 'edit-copy.png',
                linktext => ('Student Submission Reports'),
                linktitle => ('Prepare reports of student submissions.')},
            ]});
       } else {
           push(@reports,
         {categorytitle => 'Reports',          {categorytitle => 'Reports',
          items => [           items => [
             {url => '/adm/statistics?reportSelected=student_submission_reports',              {url => '/adm/statistics?reportSelected=student_submission_reports',
Line 781  sub CreateMainMenu { Line 808  sub CreateMainMenu {
  linktext => ('Survey Reports'),   linktext => ('Survey Reports'),
              linktitle => ('Prepare reports on survey results.')},               linktitle => ('Prepare reports on survey results.')},
          ]});           ]});
       }
           
 return &Apache::lonhtmlcommon::generate_menu(@reports);  return &Apache::lonhtmlcommon::generate_menu(@reports);
     
Line 817  sub handler { Line 845  sub handler {
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
     if ($r->header_only) { return OK; }      if ($r->header_only) { return OK; }
       my $gcicustom = &Apache::loncommon::needs_gci_custom();
       if ($gcicustom) {
           my $now = time;
           my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
           my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
           my $courseopt=&Apache::lonnet::get_courseresdata($cnum,$cdom);
           my $duedate = $courseopt->{$env{'request.course.id'}.'.0.duedate'};
           if ((!$duedate) || ($duedate > $now)) {
               $r->print(&Apache::loncommon::start_page("Course Statistics"));
               $r->print('<h3>'.&mt('Display of statistics').'</h3>');
               if ($duedate > $now) { 
                   $r->print('<p>'.&mt('Aggregate test performance data will be available after the Concept Test end date: [_1].',
                            &Apache::lonlocal::locallocaltime($duedate)).'</p>');
               } else {
                   $r->print('<p>'.
                             &mt('Aggregate test performance data unavailable without definition of an end date for the Concept Test.').'</p>');
               }
               $r->print(&Apache::loncommon::end_page());
               return OK;
           }
       }
   
     #      #
     # Extract form elements from query string      # Extract form elements from query string
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
Line 902  ENDSTYLE Line 952  ENDSTYLE
             &Apache::lonsubmissiontimeanalysis::BuildSubmissionTimePage($r,$c);              &Apache::lonsubmissiontimeanalysis::BuildSubmissionTimePage($r,$c);
         } elsif($GoToPage eq 'student_submission_reports') {          } elsif($GoToPage eq 'student_submission_reports') {
             &Apache::lonhtmlcommon::add_breadcrumb              &Apache::lonhtmlcommon::add_breadcrumb
                 ({href=>              ({href=>
                   '/adm/statistics?reportselected=student_submission_reports',                '/adm/statistics?reportselected=student_submission_reports',
                   text=>'Student Submission Reports'});                text=>'Student Submission Reports'});
             &Apache::lonstudentsubmissions::BuildStudentSubmissionsPage($r,$c);              &Apache::lonstudentsubmissions::BuildStudentSubmissionsPage($r,$c);
         } elsif($GoToPage eq 'survey_reports') {          } elsif($GoToPage eq 'survey_reports') {
             &Apache::lonhtmlcommon::add_breadcrumb              &Apache::lonhtmlcommon::add_breadcrumb
Line 922  ENDSTYLE Line 972  ENDSTYLE
             &Apache::lonhtmlcommon::add_breadcrumb              &Apache::lonhtmlcommon::add_breadcrumb
                 ({href=>'/adm/statistics?reportselected=student_assessment',                  ({href=>'/adm/statistics?reportselected=student_assessment',
                   text=>'Chart'});                    text=>'Chart'});
             &Apache::lonstudentassessment::BuildStudentAssessmentPage($r,$c);              if ($gcicustom) {
                   $r->print(&mt('Only aggregate performance data are available for Concept Tests.'));  
               } else {
                   &Apache::lonstudentassessment::BuildStudentAssessmentPage($r,$c);
               }
         } elsif($GoToPage eq 'grading_analysis') {          } elsif($GoToPage eq 'grading_analysis') {
             &Apache::lonhtmlcommon::add_breadcrumb              &Apache::lonhtmlcommon::add_breadcrumb
                 ({href=>'/adm/statistics?reportselected=grading_anaylsis',                  ({href=>'/adm/statistics?reportselected=grading_anaylsis',

Removed from v.1.148  
changed lines
  Added in v.1.148.2.5


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