version 1.43, 2006/02/03 23:42:54
|
version 1.45, 2006/02/06 22:42:11
|
Line 362 sub release_slot {
|
Line 362 sub release_slot {
|
'0_availablestudent', |
'0_availablestudent', |
1, $new_param, 'string', |
1, $new_param, 'string', |
$uname,$udom); |
$uname,$udom); |
my $description=&get_description($env{'form.slotname'},\%slot); |
|
$r->print("<p>Released Reservation: $description</p>"); |
$r->print("<p>Released Reservation: $description</p>"); |
if ($mgr eq 'F') { |
if ($mgr eq 'F') { |
$r->print('<p><a href="/adm/slotrequest?command=showslots">'. |
$r->print('<p><a href="/adm/slotrequest?command=showslots">'. |
Line 452 STUFF
|
Line 451 STUFF
|
} |
} |
return; |
return; |
} |
} |
my %slot=&Apache::lonnet::get_slot($env{'form.slotname'}); |
|
my $reserved=&make_reservation($env{'form.slotname'}, |
my $reserved=&make_reservation($env{'form.slotname'}, |
\%slot,$symb); |
\%slot,$symb); |
my $description=&get_description($env{'form.slotname'},\%slot); |
my $description=&get_description($env{'form.slotname'},\%slot); |
Line 498 STUFF
|
Line 497 STUFF
|
} |
} |
|
|
sub allowed_slot { |
sub allowed_slot { |
my ($slot_name,$slot,$symb)=@_; |
my ($slot_name,$slot,$symb,$slots)=@_; |
#already started |
#already started |
if ($slot->{'starttime'} < time) { |
if ($slot->{'starttime'} < time) { |
# all open slot to be schedulable |
# all open slot to be schedulable |
Line 521 sub allowed_slot {
|
Line 520 sub allowed_slot {
|
&& $slot->{'symb'} ne $symb) { |
&& $slot->{'symb'} ne $symb) { |
return 0; |
return 0; |
} |
} |
|
my $conflict = &check_for_conflict($symb,$slot_name,$slot,$slots); |
|
if ($conflict) { |
|
if ($slots->{$conflict}{'starttime'} < time) { |
|
return 0; |
|
} |
|
} |
&Apache::lonxml::debug("$slot_name symb good"); |
&Apache::lonxml::debug("$slot_name symb good"); |
return 1; |
return 1; |
} |
} |
Line 550 sub show_choices {
|
Line 555 sub show_choices {
|
(keys(%slots))) { |
(keys(%slots))) { |
|
|
&Apache::lonxml::debug("Checking Slot $slot"); |
&Apache::lonxml::debug("Checking Slot $slot"); |
next if (!&allowed_slot($slot,$slots{$slot})); |
next if (!&allowed_slot($slot,$slots{$slot},undef,\%slots)); |
|
|
$available++; |
$available++; |
|
|