--- loncom/interface/slotrequest.pm 2019/07/07 22:06:04 1.142
+++ loncom/interface/slotrequest.pm 2023/03/29 16:01:13 1.144
@@ -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.142 2019/07/07 22:06:04 raeburn Exp $
+# $Id: slotrequest.pm,v 1.144 2023/03/29 16:01:13 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -56,10 +56,13 @@ sub fail {
}
sub start_page {
- my ($r,$title,$brcrum,$js)=@_;
+ my ($r,$title,$brcrum,$bread_crumbs_component,$js)=@_;
my $args;
if (ref($brcrum) eq 'ARRAY') {
$args = {bread_crumbs => $brcrum};
+ if ($bread_crumbs_component) {
+ $args->{bread_crumbs_component} = $bread_crumbs_component;
+ }
}
if (($env{'form.requestattempt'}) || ($env{'form.command'} eq 'manageresv')) {
my %loaditems = (
@@ -1663,10 +1666,6 @@ sub show_table {
}
my $available;
if ($mgr eq 'F') {
- # FIXME: This line should be deleted once Slots uses breadcrumbs
- $r->print('
'.&Apache::loncommon::help_open_topic(
- 'Slot About', &mt('Help on slots')));
-
$r->print('
'.
''.&mt('Changes/page:').' '. - &Apache::lonmeta::selectbox('show',$curr->{'show'},undef, + &Apache::lonmeta::selectbox('show',$curr->{'show'},'',undef, (&mt('all'),5,10,20,50,100,1000,10000)). ' | '; my $startform = @@ -3300,6 +3299,9 @@ sub csv_upload_assign { 'secret','symb') { if ($entries{$fields{$key}}) { $slot{$key}=$entries{$fields{$key}}; + if ($key eq 'maxspace') { + $slot{$key} =~ s/\D+//g; + } } } if ($entries{$fields{'iptied'}} =~ /^\s*(yes|1)\s*$/i) { @@ -3407,7 +3409,7 @@ sub handler { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}); my %crumb_titles = &slot_command_titles(); - my $brcrum; + my ($brcrum,$bread_crumbs_component); my $vgr=&Apache::lonnet::allowed('vgr',$env{'request.course.id'}); my $mgr=&Apache::lonnet::allowed('mgr',$env{'request.course.id'}); @@ -3443,8 +3445,10 @@ sub handler { } elsif ($vgr eq 'F') { if ($env{'form.command'} =~ /^(slotlog|showslots|uploadstart|csvuploadmap|csvuploadassign|delete|release|remove_registration)$/) { $brcrum =[{href=>"/adm/slotrequest?command=showslots", - text=>$crumb_titles{'showslots'}}]; + text=>$crumb_titles{'showslots'}, + help=>'Slot_Use'}]; $title = 'Managing Slots'; + $bread_crumbs_component = 'Slots'; unless ($env{'form.command'} eq 'showslots') { if (ref($brcrum) eq 'ARRAY') { push(@{$brcrum},{href=>"/adm/slotrequest?command=$env{'form.command'}",text=>$crumb_titles{$env{'form.command'}}}); @@ -3472,7 +3476,7 @@ sub handler { if (($env{'form.requestattempt'}) || ($env{'form.command'} eq 'manageresv')) { $js = &reservation_js(\%slots,$consumed_uniqueperiods,$available,$got_slots,$symb); } - &start_page($r,$title,$brcrum,$js); + &start_page($r,$title,$brcrum,$bread_crumbs_component,$js); if ($env{'form.command'} eq 'manageresv') { $allavailable = $available; |