--- loncom/interface/slotrequest.pm 2016/05/21 21:13:58 1.132 +++ loncom/interface/slotrequest.pm 2017/12/22 02:00:46 1.136 @@ -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.132 2016/05/21 21:13:58 raeburn Exp $ +# $Id: slotrequest.pm,v 1.136 2017/12/22 02:00:46 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -465,7 +465,7 @@ sub get_consumed_uniqueperiods { return 'error: Unable to determine current status'; } my @problems = $navmap->retrieveResources(undef, - sub { $_[0]->is_problem() },1,0); + sub { $_[0]->is_gradable() },1,0); my %used_slots; foreach my $problem (@problems) { my $symb = $problem->symb(); @@ -805,7 +805,7 @@ sub release_reservation { if ($passed_resource->is_map()) { my ($a_resource) = $navmap->retrieveResources($passed_resource, - sub {$_[0]->is_problem()},0,1); + sub {$_[0]->is_gradable()},0,1); $symb = $a_resource->symb(); } } else { @@ -1602,15 +1602,16 @@ sub show_table { $r->print(''); $r->print('
'); my $linkstart=''.$show_fields{$which}.''); + $tableheader .= ''.&mt('No slots meet the criteria for display').'
'); + } + $r->print(''); return; } @@ -2013,7 +2028,7 @@ sub manage_reservations { if (ref($resource)) { my $symb = $resource->symb(); $contents{$lastcontainer} ++; - next if (!$resource->is_problem() && !$resource->is_sequence() && + next if (!$resource->is_gradable() && !$resource->is_sequence() && !$resource->is_page()); $count ++; if (($resource->is_sequence()) || ($resource->is_page())) { @@ -2021,7 +2036,7 @@ sub manage_reservations { $container{$lastcontainer} = $resource; $container_title{$lastcontainer} = $resource->compTitle(); } - if ($resource->is_problem()) { + if ($resource->is_gradable()) { my ($useslots) = $resource->slot_control(); next if (($useslots eq '') || ($useslots =~ /^\s*no\s*$/i)); push(@ordered,$symb); @@ -2360,14 +2375,16 @@ sub show_reservations { if ($showntablehdr) { $r->print(&Apache::loncommon::end_data_table().''.&mt('Previous [_1] changes',$curr{'show'}).' | '); + $r->print(''); } if ($more_records) { - $r->print(''.&mt('Next [_1] changes',$curr{'show'}).' | '); + $r->print(''); } - $r->print('