--- loncom/interface/slotrequest.pm 2015/09/27 22:35:39 1.130 +++ 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.130 2015/09/27 22:35:39 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 { @@ -1494,7 +1494,8 @@ sub show_table { 'allowedusers' => 'Users slot is restricted to.', 'uniqueperiod' => 'Period of time slot is unique', 'scheduled' => 'Scheduled Students', - 'proctor' => 'List of proctors'); + 'proctor' => 'List of proctors', + 'iptied' => 'Unique IP each student',); if ($crstype eq 'Community') { $show_fields{'startreserve'} = &mt('Time members can start reserving'); $show_fields{'endreserve'} = &mt('Time members can no longer reserve'); @@ -1502,7 +1503,7 @@ sub show_table { } my @show_order=('name','description','type','starttime','endtime', 'startreserve','endreserve','reservationmsg','secret','space', - 'ip','symb','allowedsections','allowedusers','uniqueperiod', + 'ip','iptied','symb','allowedsections','allowedusers','uniqueperiod', 'scheduled','proctor'); my @show = (exists($env{'form.show'})) ? &Apache::loncommon::get_env_multiple('form.show') @@ -1601,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; } @@ -2002,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())) { @@ -2010,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); @@ -2349,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('