Diff for /loncom/interface/lonquickgrades.pm between versions 1.49.6.6.2.1 and 1.49.6.7

version 1.49.6.6.2.1, 2020/09/08 04:24:18 version 1.49.6.7, 2021/03/04 01:42:20
Line 64  sub real_handler { Line 64  sub real_handler {
   
     my $reinitresult;      my $reinitresult;
   
     if ($env{'request.course.id'}) {  
         my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};  
         my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};  
         my ($blocked,$blocktext) =  
             &Apache::loncommon::blocking_status('grades',$cnum,$cdom);  
         if ($blocked) {  
             my $checkrole = "cm./$cdom/$cnum";  
             if ($env{'request.course.sec'} ne '') {  
                 $checkrole .= "/$env{'request.course.sec'}";  
             }  
             unless ((&Apache::lonnet::allowed('evb',undef,undef,$checkrole)) &&  
                     ($env{'request.role'} !~ m{^st\./$cdom/$cnum})) {  
                 &grades_blocked($r,$blocktext,$showPoints);  
                 return OK;  
             }  
         }  
     }  
   
     unless ($cangrade) {      unless ($cangrade) {
         # Check for critical messages and redirect if present.          # Check for critical messages and redirect if present.
         my ($redirect,$url) = &Apache::loncommon::critical_redirect(300,'grades');          my ($redirect,$url) = &Apache::loncommon::critical_redirect(300);
         if ($redirect) {          if ($redirect) {
             &Apache::loncommon::content_type($r,'text/html');              &Apache::loncommon::content_type($r,'text/html');
             $r->header_out(Location => $url);              $r->header_out(Location => $url);
Line 110  sub real_handler { Line 92  sub real_handler {
             my $preamble = '<div id="LC_update_'.$cid.'" class="LC_info">'.              my $preamble = '<div id="LC_update_'.$cid.'" class="LC_info">'.
                            '<br />'.                             '<br />'.
                            &mt('Your course session is being updated because of recent changes by course personnel.').                             &mt('Your course session is being updated because of recent changes by course personnel.').
                            ' '.&mt('Please be patient.').'<br /></div>'.                             ' '.&mt('Please be patient').'.<br /></div>'.
                            '<div style="padding:0;clear:both;margin:0;border:0"></div>';                             '<div style="padding:0;clear:both;margin:0;border:0"></div>';
             my %prog_state = &Apache::lonhtmlcommon::Create_PrgWin($r,undef,$preamble);              my %prog_state = &Apache::lonhtmlcommon::Create_PrgWin($r,undef,$preamble);
             &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Updating course'));              &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Updating course'));
             $r->rflush();              $r->rflush();
             my ($furl,$ferr) = &Apache::lonuserstate::readmap("$cdom/$cnum");              my ($furl,$ferr) = &Apache::lonuserstate::readmap("$cdom/$cnum");
             &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Finished'));              &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Finished!'));
             &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);              &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
             my $closure = <<ENDCLOSE;              my $closure = <<ENDCLOSE;
 <script type="text/javascript">  <script type="text/javascript">
Line 206  ENDCLOSE Line 188  ENDCLOSE
     return OK;      return OK;
 }  }
   
 sub grades_blocked {  
     my ($r,$blocktext,$caller) = @_;  
     my $title = 'Points Display';  
     if ($caller eq 'spreadsheet') {  
         $title = 'Spreadsheet';  
     } elsif ($env{'course.'.$env{'request.course.id'}.'.grading'} ne 'standard') {  
         $title = 'Completed Problems Display';  
     }  
     my $brcrum = [{href=>"/adm/quickgrades",text => $title}];  
     &Apache::lonhtmlcommon::clear_breadcrumbs();  
     &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/quickgrades',  
                                             text=> $title});  
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs($title);  
     &Apache::loncommon::content_type($r,'text/html');  
     &Apache::loncommon::no_cache($r);  
     $r->send_http_header;  
     $r->print(&Apache::loncommon::start_page($title).  
               $breadcrumbs.  
               $blocktext.  
               &Apache::loncommon::end_page());  
     return;  
 }  
   
 #  #
 # Go through the complete course and collect data  # Go through the complete course and collect data
 #  #

Removed from v.1.49.6.6.2.1  
changed lines
  Added in v.1.49.6.7


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