Diff for /loncom/interface/lonquickgrades.pm between versions 1.106 and 1.110

version 1.106, 2015/03/13 22:34:00 version 1.110, 2017/06/26 01:56:58
Line 37  use Apache::lonnet; Line 37  use Apache::lonnet;
 use Apache::grades;  use Apache::grades;
 use Apache::loncoursedata;  use Apache::loncoursedata;
 use Apache::lonstudentassessment;  use Apache::lonstudentassessment;
   use Apache::lonuserstate;
   
 use Time::HiRes;  use Time::HiRes;
 use Spreadsheet::WriteExcel;  use Spreadsheet::WriteExcel;
Line 79  sub real_handler { Line 80  sub real_handler {
   
     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);          my ($redirect,$url) = &Apache::loncommon::critical_redirect(300,'grades');
         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 105  sub real_handler { Line 106  sub real_handler {
                 $env{'user.reinit'} = 1;                  $env{'user.reinit'} = 1;
                 return HTTP_NOT_ACCEPTABLE;                  return HTTP_NOT_ACCEPTABLE;
             }              }
           } elsif ((&Apache::loncommon::course_type() eq 'Placement') &&
                    (!$env{'request.role.adv'})) {
               my $furl = &Apache::lonpageflip::first_accessible_resource();
               &Apache::loncommon::content_type($r,'text/html');
               $r->header_out(Location => $furl);
               return REDIRECT;
         }          }
     }      }
   
Line 176  sub real_handler { Line 183  sub real_handler {
         if ($env{'form.udom'}) { $udom=$env{'form.udom'}; }          if ($env{'form.udom'}) { $udom=$env{'form.udom'}; }
         if ($env{'form.id'}) { $stdid=$env{'form.id'}; }          if ($env{'form.id'}) { $stdid=$env{'form.id'}; }
         if (($stdid) && ($udom)) {          if (($stdid) && ($udom)) {
             $uname=(&Apache::lonnet::idget($udom,$stdid))[1];              $uname=(&Apache::lonnet::idget($udom,[$stdid],'ids'))[1];
         }          }
         if (($stdid) && (!$uname)) {          if (($stdid) && (!$uname)) {
             $r->print('<p><span class="LC_warning">'.&mt("Unknown Student/Employee ID: [_1]",$stdid).'</span></p>');              $r->print('<p><span class="LC_warning">'.&mt("Unknown Student/Employee ID: [_1]",$stdid).'</span></p>');

Removed from v.1.106  
changed lines
  Added in v.1.110


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