--- loncom/interface/slotrequest.pm 2006/02/03 23:42:54 1.43 +++ loncom/interface/slotrequest.pm 2006/02/03 23:53:30 1.44 @@ -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.44 2006/02/03 23:53:30 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -498,7 +498,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 +521,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 +556,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++;