Diff for /loncom/interface/lonquickgrades.pm between versions 1.54 and 1.55

version 1.54, 2010/12/03 15:21:35 version 1.55, 2010/12/03 21:33:52
Line 61  sub real_handler { Line 61  sub real_handler {
     &Apache::loncommon::no_cache($r);      &Apache::loncommon::no_cache($r);
     $r->send_http_header;      $r->send_http_header;
   
     my $showPoints =       my $showPoints =
         $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'standard';          $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'standard';
     my $notshowSPRSlink =       my $notshowSPRSlink =
         (($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'external')          (($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'external')
       || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals'));        || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals'));
     my $notshowTotals=      my $notshowTotals=
Line 72  sub real_handler { Line 72  sub real_handler {
         $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories';          $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories';
   
   
     # Header  
     my $title = "Grading and Statistics";#$showPoints ? "Points Display" : "Completed Problems Display";      my $title = "Grading and Statistics";#$showPoints ? "Points Display" : "Completed Problems Display";
     my $brcrum = [{href=>"/adm/quickgrades",text => "Points Display"}];      my $brcrum = [{href=>"/adm/quickgrades",text => "Points Display"}];
     $r->print(&Apache::loncommon::start_page($title,undef,      $r->print(&Apache::loncommon::start_page($title,undef,
                                             {'bread_crumbs' => $brcrum})                                              {'bread_crumbs' => $brcrum})
              );               );
   
     $r->print(&Apache::lonhtmlcommon::coursepreflink(&mt('Grade display settings'),'grading'));      &startGradeScreen($r,'quick');
   
     if (!$showPoints && !$notshowSPRSlink ) {  
         $r->print('<p>'  
                  .&mt('This screen shows how many problems (or problem parts) you have completed'  
                      .', and how many you have not yet done.'  
                      .' You can also look at [_1]a detailed score sheet[_2].'  
                      ,'<a href="/adm/studentcalc">','</a>')  
                  .'</p>');  
     }  
   
     $r->print('<p class="LC_info">'.&mt('This may take a few moments to display.').'</p>');  
   
     $r->rflush();      $r->rflush();
   
Line 110  sub real_handler { Line 98  sub real_handler {
        &outputTable($r,$showPoints,$notshowTotals,         &outputTable($r,$showPoints,$notshowTotals,
                  $navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted);                   $navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted);
     }      }
       &endGradeScreen($r);
     return OK;      return OK;
   
 }  }
   
   sub startGradeScreen {
       my ($r,$mode)=@_;
   
       my $showPoints =
           $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'standard';
       my $notshowSPRSlink =
           (($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'external')
         || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals')
         || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories'));
       my $notshowTotals=
           $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals';
       my $showCategories=
           $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories';
   
       my $allowed_to_view =  &Apache::lonnet::allowed('vgr',$env{'request.course.id'});
       my $allowed_to_edit =  &Apache::lonnet::allowed('mgr',$env{'request.course.id'});
   
       if ($allowed_to_view) {
          $r->print('<table><tr>');
          if ($notshowTotals)  { $r->print ('<td>'.&mt('Students do not see total points.').'</td>'); }
          if ($notshowSPRSlink){ $r->print ('<td>'.&mt('Students do not see link to spreadsheet.').'</td>'); }
          if ($showPoints)     { $r->print ('<td>'.&mt('Students will see points based on problem weights.').'</td>'); }
          if ($showCategories) { $r->print ('<td>'.&mt('Students will see points based on categories.').'</td>'); }
          $r->print('<td>'.&Apache::lonhtmlcommon::coursepreflink(&mt('Grade display settings'),'grading').'</td></td></table>');
       }
   
   
       $r->print('<ul class="LC_TabContentBigger" id="main">');
       $r->print('<li'.($mode eq 'quick'?' class="active"':'').'><a href="/adm/quickgrades"><b>'.
                                             ($showPoints?&mt('Points'):($showCategories?&mt('Grades'):&mt('Completion'))).'</b></a></li>');
   
       if (!($showPoints || $notshowSPRSlink) || ($allowed_to_view)) {
          $r->print('<li'.($mode eq 'spreadsheet'?' class="active"':'').'><a href="/adm/'.($allowed_to_view?'classcalc':'studentcalc').'"><b>'.
                                                                    &mt('Spreadsheet').'</b></a></li>');
       }
       $r->print('</ul>');
       $r->print('<div class="LC_Box" style="clear:both;margin:0;"><div id="maincoursedoc" style="margin:0 0;padding:0 0;"><div class="LC_ContentBox" id="mainCourseDocuments" style="display: block;">');
   }
   
   sub endGradeScreen {
      my ($r)=@_;
      $r->print('</div></div></div>');
   }
   
   
 sub getData {  sub getData {
   
     my ($showPoints,$uname,$udom)=@_;      my ($showPoints,$uname,$udom)=@_;

Removed from v.1.54  
changed lines
  Added in v.1.55


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