Diff for /loncom/interface/slotrequest.pm between versions 1.10 and 1.11

version 1.10, 2005/09/06 20:53:36 version 1.11, 2005/09/06 20:54:58
Line 514  sub handler { Line 514  sub handler {
  return OK;   return OK;
     }      }
     $env{'request.symb'}=$symb;      $env{'request.symb'}=$symb;
     my ($status) = &Apache::lonhomework::check_task_access('0');  
     if ($status eq 'CAN_ANSWER' ||  
  $status eq 'NEEDS_CHECKIN' ||  
  $status eq 'WAITING_FOR_GRADE') {  
  &fail($r,'not_allowed');  
  return OK;  
     }  
     my $vgr=&Apache::lonnet::allowed('vgr',$env{'request.course.id'});  
     if ($env{'form.command'} eq 'showslots' && $vgr eq 'F') {      if ($env{'form.command'} eq 'showslots' && $vgr eq 'F') {
  &show_table($r,$symb);   &show_table($r,$symb);
     } elsif ($env{'form.requestattempt'}) {  
  &show_choices($r,$symb);  
     } elsif ($env{'form.command'} eq 'release') {  
  &release_slot($r,$symb);  
     } elsif ($env{'form.command'} eq 'get') {  
  &get_slot($r,$symb);  
     } elsif ($env{'form.command'} eq 'change') {  
         &release_slot($r,$symb,$env{'form.releaseslot'},1);  
  &get_slot($r,$symb);  
     } else {      } else {
  $r->print("<p>Unknown command: ".$env{'form.command'}."</p>");   my ($status) = &Apache::lonhomework::check_task_access('0');
    if ($status eq 'CAN_ANSWER' ||
       $status eq 'NEEDS_CHECKIN' ||
       $status eq 'WAITING_FOR_GRADE') {
       &fail($r,'not_allowed');
       return OK;
    }
    my $vgr=&Apache::lonnet::allowed('vgr',$env{'request.course.id'});
    if ($env{'form.requestattempt'}) {
       &show_choices($r,$symb);
    } elsif ($env{'form.command'} eq 'release') {
       &release_slot($r,$symb);
    } elsif ($env{'form.command'} eq 'get') {
       &get_slot($r,$symb);
    } elsif ($env{'form.command'} eq 'change') {
       &release_slot($r,$symb,$env{'form.releaseslot'},1);
       &get_slot($r,$symb);
    } else {
       $r->print("<p>Unknown command: ".$env{'form.command'}."</p>");
    }
     }      }
     &end_page($r);      &end_page($r);
     return OK;      return OK;

Removed from v.1.10  
changed lines
  Added in v.1.11


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