[LON-CAPA-cvs] cvs: loncom /interface slotrequest.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 06 Sep 2005 20:54:59 -0000
albertel Tue Sep 6 16:54:59 2005 EDT
Modified files:
/loncom/interface slotrequest.pm
Log:
- you should be able to see the table of slots even if you are in a slot
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.10 loncom/interface/slotrequest.pm:1.11
--- loncom/interface/slotrequest.pm:1.10 Tue Sep 6 16:53:36 2005
+++ loncom/interface/slotrequest.pm Tue Sep 6 16:54:58 2005
@@ -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.10 2005/09/06 20:53:36 albertel Exp $
+# $Id: slotrequest.pm,v 1.11 2005/09/06 20:54:58 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -514,27 +514,29 @@
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("<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);
return OK;