--- loncom/interface/slotrequest.pm 2006/05/12 01:20:31 1.60 +++ loncom/interface/slotrequest.pm 2006/06/20 03:32:40 1.66 @@ -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.60 2006/05/12 01:20:31 albertel Exp $ +# $Id: slotrequest.pm,v 1.66 2006/06/20 03:32:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,12 +36,15 @@ use Apache::lonlocal; use Apache::lonnet; use Apache::lonnavmaps(); use Date::Manip; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; sub fail { my ($r,$code)=@_; if ($code eq 'not_valid') { $r->print('
'.&mt('Unable to understand what resource you wanted to sign up for.').'
'); - + } elsif ($code eq 'not_available') { + $r->print(''.&mt('No slots are available.').'
'); } elsif ($code eq 'not_allowed') { $r->print(''.&mt('Not allowed to sign up or change reservations at this time.').'
'); } else { @@ -253,7 +256,7 @@ sub make_reservation { my $parm_symb = $symb; my $parm_level = 1; - if ($use_slots eq 'map') { + if ($use_slots eq 'map' || $use_slots eq 'map_map') { my ($map) = &Apache::lonnet::decode_symb($symb); $parm_symb = &Apache::lonnet::symbread($map); $parm_level = 2; @@ -382,13 +385,13 @@ sub remove_registration_confirmation { 'no' => 'No',); $r->print(<<"END_CONFIRM");$msg
- - @@ -492,7 +495,7 @@ sub release_reservation { } my $parm_level = 1; - if ($use_slots eq 'map') { + if ($use_slots eq 'map' || $use_slots eq 'map_map') { $parm_level = 2; } # store new parameter string @@ -568,7 +571,7 @@ sub get_slot { $r->print("Already have a reservation: $description1
"); if ($slot_name ne $env{'form.slotname'}) { $r->print(<