--- loncom/interface/slotrequest.pm 2006/02/03 23:42:54 1.43
+++ loncom/interface/slotrequest.pm 2006/02/06 22:42:11 1.45
@@ -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.43 2006/02/03 23:42:54 albertel Exp $
+# $Id: slotrequest.pm,v 1.45 2006/02/06 22:42:11 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -362,7 +362,6 @@ sub release_slot {
'0_availablestudent',
1, $new_param, 'string',
$uname,$udom);
- my $description=&get_description($env{'form.slotname'},\%slot);
$r->print("
Released Reservation: $description
");
if ($mgr eq 'F') {
$r->print(''.
@@ -452,7 +451,7 @@ STUFF
}
return;
}
- my %slot=&Apache::lonnet::get_slot($env{'form.slotname'});
+
my $reserved=&make_reservation($env{'form.slotname'},
\%slot,$symb);
my $description=&get_description($env{'form.slotname'},\%slot);
@@ -498,7 +497,7 @@ STUFF
}
sub allowed_slot {
- my ($slot_name,$slot,$symb)=@_;
+ my ($slot_name,$slot,$symb,$slots)=@_;
#already started
if ($slot->{'starttime'} < time) {
# all open slot to be schedulable
@@ -521,6 +520,12 @@ sub allowed_slot {
&& $slot->{'symb'} ne $symb) {
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");
return 1;
}
@@ -550,7 +555,7 @@ sub show_choices {
(keys(%slots))) {
&Apache::lonxml::debug("Checking Slot $slot");
- next if (!&allowed_slot($slot,$slots{$slot}));
+ next if (!&allowed_slot($slot,$slots{$slot},undef,\%slots));
$available++;