Diff for /loncom/interface/lonstatistics.pm between versions 1.148.2.3 and 1.148.2.7

version 1.148.2.3, 2010/01/11 04:11:52 version 1.148.2.7, 2010/12/05 17:27:30
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) {
               my $cdom = $env{'course.'.$cid.'.domain'};
               if ($cdom =~ /^\w+citest$/) {
                   my $sequence = &Apache::loncommon::get_citest_map($cdom);
                   my $cnum = $env{'course.'.$cid.'.num'};  
                   if ($sequence) {
                       $mapurl = '/uploaded/'.$cdom.'/'.$cnum.'/'.$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 520  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 540  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 767  sub CreateMainMenu { Line 789  sub CreateMainMenu {
              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.')},
          ]});           ]});
     unless(&Apache::loncommon::needs_gci_custom()) {      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,          push(@reports,
         {categorytitle => 'Reports',          {categorytitle => 'Reports',
          items => [           items => [
Line 789  return &Apache::lonhtmlcommon::generate_ Line 821  return &Apache::lonhtmlcommon::generate_
     
 }  }
   
   
   
 sub handler {  sub handler {
     my $r=shift;      my $r=shift;
     my $c = $r->connection();      my $c = $r->connection();
Line 828  sub handler { Line 858  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 930  ENDSTYLE Line 964  ENDSTYLE
             ({href=>              ({href=>
               '/adm/statistics?reportselected=student_submission_reports',                '/adm/statistics?reportselected=student_submission_reports',
               text=>'Student Submission Reports'});                text=>'Student Submission Reports'});
             if ($gcicustom) {              &Apache::lonstudentsubmissions::BuildStudentSubmissionsPage($r,$c);
                 $r->print(&mt('Only aggregate performance data are available for Concept Tests.'));  
             } else {  
                 &Apache::lonstudentsubmissions::BuildStudentSubmissionsPage($r,$c);  
             }  
         } elsif($GoToPage eq 'survey_reports') {          } elsif($GoToPage eq 'survey_reports') {
             &Apache::lonhtmlcommon::add_breadcrumb              &Apache::lonhtmlcommon::add_breadcrumb
                 ({href=>                  ({href=>

Removed from v.1.148.2.3  
changed lines
  Added in v.1.148.2.7


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