Diff for /loncom/interface/lonstatistics.pm between versions 1.148.2.2 and 1.148.2.6

version 1.148.2.2, 2010/01/06 19:41:49 version 1.148.2.6, 2010/11/09 15:01:53
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 825  sub handler { Line 853  sub handler {
         my $courseopt=&Apache::lonnet::get_courseresdata($cnum,$cdom);          my $courseopt=&Apache::lonnet::get_courseresdata($cnum,$cdom);
         my $duedate = $courseopt->{$env{'request.course.id'}.'.0.duedate'};          my $duedate = $courseopt->{$env{'request.course.id'}.'.0.duedate'};
         if ((!$duedate) || ($duedate > $now)) {          if ((!$duedate) || ($duedate > $now)) {
             $r->print(&Apache::loncommon::start_page("Course Statistics"));              my $brcrum = [{href=> '/adm/statistics',
                              text=> 'Statistics',}];
               my $args = {bread_crumbs           => $brcrum,
                           bread_crumbs_component => 'Statistics Main Page'};
               $r->print(&Apache::loncommon::start_page('Course Statistics',undef,$args));
             $r->print('<h3>'.&mt('Display of statistics').'</h3>');              $r->print('<h3>'.&mt('Display of statistics').'</h3>');
             if ($duedate > $now) {               if ($duedate > $now) { 
                 $r->print('<p>'.&mt('Aggregate test performance data will be available after the Concept Test end date: [_1].',                  $r->print('<p>'.&mt('Aggregate test performance data will be available after the Concept Test end date: [_1].',
Line 924  ENDSTYLE Line 956  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 945  ENDSTYLE Line 977  ENDSTYLE
                 ({href=>'/adm/statistics?reportselected=student_assessment',                  ({href=>'/adm/statistics?reportselected=student_assessment',
                   text=>'Chart'});                    text=>'Chart'});
             if ($gcicustom) {              if ($gcicustom) {
                 $r->print(&mt('Only aggregate performance data is available for Concept Tests.'));                    $r->print(&mt('Only aggregate performance data are available for Concept Tests.'));  
             } else {              } else {
                 &Apache::lonstudentassessment::BuildStudentAssessmentPage($r,$c);                  &Apache::lonstudentassessment::BuildStudentAssessmentPage($r,$c);
             }              }

Removed from v.1.148.2.2  
changed lines
  Added in v.1.148.2.6


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