--- loncom/interface/slotrequest.pm 2010/10/31 15:32:10 1.109
+++ loncom/interface/slotrequest.pm 2011/01/03 18:04:56 1.110
@@ -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.109 2010/10/31 15:32:10 raeburn Exp $
+# $Id: slotrequest.pm,v 1.110 2011/01/03 18:04:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -641,16 +641,19 @@ sub get_slot {
STUFF
- $r->print('
'.&mt('Reservation currently unchanged').'
'.
- '
');
+ $r->print('
'.&mt('Reservation currently unchanged').'
');
if ($slot_name ne '') {
- $r->print(&mt('To complete the transaction you [_1]must[_2] confirm you want the change to [_3] to be processed.'
- ,'','',''.$description2.'').' '
- .''
- .&mt('or').'
'.&mt('you will continue with the reservation you already had: [_1]'
- ,''.$description1.'').'
');
+ $r->print('
'.&mt('To complete the transaction you [_1]must confirm[_2] you want to [_3]process the change[_4] to [_5].'
+ ,'','','','',''.$description2.'')
+ .' '
+ .&mt('Or you can choose to [_1]make no change[_2] and continue[_2] with the reservation you already had: [_3].'
+ ,'','',''.$description1.'')
+ .'
'
+ .''
+ .(' 'x3)
+ .''
+ .'
');
}
- &return_link($r);
$r->print(<
STUFF
@@ -2163,6 +2166,8 @@ sub slot_change_messaging {
$msgtitle = &mt('Status of messages about saved reservation');
} elsif ($action eq 'release') {
$msgtitle = &mt('Status of messages about dropped reservation');
+ } elsif ($action eq 'nochange') {
+ $msgtitle = &mt('Status of messages about unchanged existing reservation');
}
return ''.$msgtitle.''
.'
'
@@ -2625,7 +2630,26 @@ sub handler {
} elsif ($env{'form.command'} eq 'get') {
&get_slot($r,$symb);
} elsif ($env{'form.command'} eq 'change') {
- if (&get_slot($r,$symb,$env{'form.releaseslot'},1)) {
+ if ($env{'form.nochange'}) {
+ my $slot_name = $env{'form.releaseslot'};
+ my @slots = &check_for_reservation($symb,'allslots');
+ my $msg;
+ if (($slot_name ne '') && (grep(/^\Q$slot_name\E/,@slots))) {
+ my %slot=&Apache::lonnet::get_slot($env{'form.releaseslot'});
+ my $description=&get_description($slot_name,\%slot);
+ $msg = ''.
+ &mt('Unchanged reservation: [_1]',$description).'
';
+ my $person =
+ &Apache::loncommon::plainname($env{'user.name'},$env{'user.domain'});
+ my $subject = &mt('Reservation unchanged: [_1]',$description);
+ my $msgbody = &mt('No change to existing registration by [_1] for [_2].',$person,$description);
+ $msg .= &slot_change_messaging($slot{'reservationmsg'},$subject,$msgbody,'nochange');
+ } else {
+ $msg = ''.&mt('Reservation no longer reported as available.').'';
+ }
+ $r->print($msg);
+ &return_link($r);
+ } elsif (&get_slot($r,$symb,$env{'form.releaseslot'},1)) {
&release_slot($r,$symb,$env{'form.releaseslot'});
}
} else {