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

version 1.144.2.2, 2010/02/13 00:30:53 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 738  sub DisplayClasslist { Line 753  sub DisplayClasslist {
 sub CreateMainMenu {  sub CreateMainMenu {
     #      #
     # Define menu data      # Define menu data
     my @reports = ({ internal_name => 'problem_statistics',      my @reports = (
                      name => &mt('Overall Problem Statistics'),      {categorytitle => 'Statistics and Analyses',
                      short_description =>            items => [
     &mt('Student performance statistics on all problems.'),              {url => '/adm/statistics?reportSelected=problem_statistics',
                  },   permission => 'F',
                    { internal_name => 'problem_analysis',               icon => 'document-open.png',
                      name => &mt('Detailed Problem Analysis'),               linktext => ('Overall Problem Statistics'),
                      short_description =>                linktitle => ('Student performance statistics on all problems.')},
     &mt('Detailed statistics and graphs of student performance on problems.'),         
                  },              {url => '/adm/statistics?reportSelected=problem_analysis',
                    { internal_name => 'submissiontime_analysis',   permission => 'F',
                      name => &mt('Submission Time Plots'),               icon => 'edit-find.png',
                      short_description =>                linktext => ('Detailed Problem Analysis'),
     &mt('Display and analysis of submission times on assessments.'),               linktitle => ('Detailed statistics and graphs of student performance on problems.')},
                  },           ]},
                    { internal_name => 'student_submission_reports',          {categorytitle => 'Plots',
                      name => &mt('Student Submission Reports'),           items => [
                      short_description =>               {url => '/adm/statistics?reportSelected=submissiontime_analysis',
     &mt('Prepare reports of student submissions.'),   permission => 'F',
                  },               icon => 'subtimpl.png',
                    { internal_name => 'survey_reports',               linktext => ('Submission Time Plots'),
                      name => &mt('Survey Reports'),               linktitle => ('Display and analysis of submission times on assessments.')},
                      short_description =>         
     &mt('Prepare reports on survey results.'),              {url => '/adm/statistics?reportSelected=correct_problems_plot',
                  },   permission => 'F',
                    { internal_name => 'correct_problems_plot',               icon => 'coprplot.png',
                      name => &mt('Correct Problems Plot'),               linktext => ('Correct Problems Plot'),
                      short_description =>                linktitle => ('Display a histogram of student performance in the course.')},
     &mt('Display a histogram of student performance in the course.'),           ]});
                  },      if (&Apache::loncommon::needs_gci_custom()) {
 #                   { internal_name => 'grading_analysis',          push(@reports,
 #                     name => &mt('Detailed Grading Analysis'),          {categorytitle => 'Reports',
 #                     short_description =>            items => [
 #    &mt('Display statistics about who graded who.'),              {url => '/adm/statistics?reportSelected=student_submission_reports',
 #                 },                           permission => 'F',
 #                   { internal_name => 'student_assessment',               icon => 'edit-copy.png',
 #                     name => &mt('Problem Status Chart'),               linktext => ('Student Submission Reports'),
 #                     short_description =>                linktitle => ('Prepare reports of student submissions.')},
 #    &mt('Brief view of each students performance in course.'),           ]});
 #                 },      } else {
                    # 'percentage'  => 'Correct-problems Plot',          push(@reports,
                    # 'activitylog' => 'Activity Log',          {categorytitle => 'Reports',
                    );           items => [
     #              {url => '/adm/statistics?reportSelected=student_submission_reports',
     # Create the menu   permission => 'F',
     my $Str;               icon => 'edit-copy.png',
     $Str .= '<h2>'.&mt('Please select a report to generate').'</h2>';               linktext => ('Student Submission Reports'),
     foreach my $reportdata (@reports) {               linktitle => ('Prepare reports of student submissions.')},
         $Str .='    <h3><a href="/adm/statistics?reportSelected='.                      
             $reportdata->{'internal_name'}.'" >'.              {url => '/adm/statistics?reportSelected=survey_reports',
             $reportdata->{'name'}."</a></h3>\n";   permission => 'F',
         $Str .= '    '.('&nbsp;'x8).$reportdata->{'short_description'}.               icon => 'docs.png',
             "\n";   linktext => ('Survey Reports'),
                linktitle => ('Prepare reports on survey results.')},
            ]});
     }      }
     $Str .="</dl>\n";      
     #  return &Apache::lonhtmlcommon::generate_menu(@reports);
     return $Str;   
 }  }
   
   
Line 828  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)) {
               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>');
               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 913  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 933  ENDSTYLE Line 976  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.144.2.2  
changed lines
  Added in v.1.148.2.6


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