--- loncom/interface/slotrequest.pm 2005/08/15 19:54:26 1.8 +++ loncom/interface/slotrequest.pm 2005/09/09 18:27:56 1.13 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler for requesting to have slots added to a students record # -# $Id: slotrequest.pm,v 1.8 2005/08/15 19:54:26 albertel Exp $ +# $Id: slotrequest.pm,v 1.13 2005/09/09 18:27:56 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -456,13 +456,24 @@ sub show_table { my ($cnum,$cdom)=&get_course(); my %slots=&Apache::lonnet::dump('slots',$cdom,$cnum); my $available; - $r->print('
Slot name | +Type | +Description | +Start Time | +End Time | +Max space | +Scheduled Students | +Proctors | +Unique Period | +$slot | +$slots{$slot}->{'type'} | $description | $start | $end | $slots{$slot}->{'maxspace'} | $ids | +$slots{$slot}->{'proctor'} | +$slots{$slot}->{'uniqueperiod'} | STUFF } @@ -500,32 +514,30 @@ sub handler { return OK; } $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') { &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 { - $r->print("
---|