--- loncom/interface/slotrequest.pm 2016/10/24 01:13:54 1.125.2.3 +++ loncom/interface/slotrequest.pm 2018/06/27 14:26:28 1.125.2.4 @@ -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.125.2.3 2016/10/24 01:13:54 raeburn Exp $ +# $Id: slotrequest.pm,v 1.125.2.4 2018/06/27 14:26:28 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -841,9 +841,15 @@ sub get_slot { if ($slot_name && $slot_name ne $conflictable_slot) { my %slot=&Apache::lonnet::get_slot($slot_name); my $description1=&get_description($slot_name,\%slot); + my $slottype1=$slot{'type'}; %slot=&Apache::lonnet::get_slot($env{'form.slotname'}); my $description2=&get_description($env{'form.slotname'},\%slot); - if ($slot_name ne $env{'form.slotname'}) { + if ($slottype1 eq 'preassigned') { + $r->print('

'.&mt('You already have a reservation: "[_1]", assigned by your instructor.', + $description1).'

'. + '

'.&mt('Your instructor must unassign it before you can make a new reservation.'). + '

'); + } elsif ($slot_name ne $env{'form.slotname'}) { $r->print(<