--- loncom/interface/slotrequest.pm 2023/07/07 03:52:40 1.145
+++ loncom/interface/slotrequest.pm 2023/07/12 15:48:23 1.147
@@ -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.145 2023/07/07 03:52:40 raeburn Exp $
+# $Id: slotrequest.pm,v 1.147 2023/07/12 15:48:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -50,7 +50,7 @@ sub fail {
} else {
$r->print('
'.&mt('Failed.').'
');
}
-
+
&return_link($r);
&end_page($r);
}
@@ -60,8 +60,8 @@ sub start_page {
my $args;
if (ref($brcrum) eq 'ARRAY') {
$args = {bread_crumbs => $brcrum};
- if ($bread_crumbs_component) {
- $args->{bread_crumbs_component} = $bread_crumbs_component;
+ if ($bread_crumbs_component) {
+ $args->{bread_crumbs_component} = $bread_crumbs_component;
}
}
if (($env{'form.requestattempt'}) || ($env{'form.command'} eq 'manageresv')) {
@@ -284,7 +284,7 @@ function uncheckSlotRadio() {
}
if (slotpicks.length) {
for (var i=0; i $last) { $last=$num; }
}
-
+
my $wanted=$last+1;
&Apache::lonxml::debug("wanted $wanted
");
if (scalar(@ids) >= $max) {
# full up
return undef;
}
-
+
my %reservation=('name' => $env{'user.name'}.':'.$env{'user.domain'},
'timestamp' => time,
'symb' => $symb_for_db);
@@ -704,7 +704,7 @@ sub remove_registration {
sub remove_registration_user {
my ($r) = @_;
-
+
my $slot_name = $env{'form.slotname'};
my $name = &Apache::loncommon::plainname($env{'form.uname'},
@@ -714,7 +714,7 @@ sub remove_registration_user {
my $msg = &mt('Remove [_1] from slot [_2] for [_3]',
$name,$slot_name,$title);
-
+
&remove_registration_confirmation($r,$msg,['uname','udom','slotname',
'entry','symb','context']);
}
@@ -750,14 +750,14 @@ END_CONFIRM
sub release_all_slot {
my ($r,$mgr)=@_;
-
+
my $slot_name = $env{'form.slotname'};
my ($cnum,$cdom)=&get_course();
my %consumed=&Apache::lonnet::dump('slot_reservations',$cdom,$cnum,
"^$slot_name\0");
-
+
$r->print(''.&mt('Releasing reservations').'
');
foreach my $entry (sort { $consumed{$a}{'name'} cmp
@@ -801,7 +801,7 @@ sub release_slot {
} else {
$r->print("$msg
");
}
-
+
if ($mgr eq 'F') {
$r->print(''.
&mt('Return to slot list').'
');
@@ -1166,7 +1166,7 @@ sub return_link {
my $target = &return_target();
if (($env{'form.command'} eq 'manageresv') || ($env{'form.context'} eq 'usermanage')) {
$r->print(''.
- &mt('Return to reservations').'
');
+ &mt('Return to reservations').'');
} else {
$r->print(''.
&mt('Return to last resource').'
');
@@ -1340,7 +1340,7 @@ sub allowed_slot {
if (($slot->{'endreserve'}) &&
($slot->{'endreserve'} < time)) {
return 0;
- }
+ }
&Apache::lonxml::debug("$slot_name reserve good");
my $userallowed=0;
@@ -1487,7 +1487,7 @@ sub show_choices {
);
foreach my $option (@options) {
my $onclick = "toggleSlotDisplay(this.form,'$num');";
- if (($option eq 'show') && ($env{'form.command'} eq 'manageresv')) {
+ if (($option eq 'show') && ($env{'form.command'} eq 'manageresv')) {
$onclick .= "currSlotDisplay$num(this.form,'$num');";
}
$output .= '