--- loncom/interface/slotrequest.pm 2006/06/16 19:49:00 1.64 +++ loncom/interface/slotrequest.pm 2006/06/20 03:32:40 1.66 @@ -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.64 2006/06/16 19:49:00 albertel Exp $ +# $Id: slotrequest.pm,v 1.66 2006/06/20 03:32:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -256,7 +256,7 @@ sub make_reservation { my $parm_symb = $symb; my $parm_level = 1; - if ($use_slots eq 'map') { + if ($use_slots eq 'map' || $use_slots eq 'map_map') { my ($map) = &Apache::lonnet::decode_symb($symb); $parm_symb = &Apache::lonnet::symbread($map); $parm_level = 2; @@ -495,7 +495,7 @@ sub release_reservation { } my $parm_level = 1; - if ($use_slots eq 'map') { + if ($use_slots eq 'map' || $use_slots eq 'map_map') { $parm_level = 2; } # store new parameter string @@ -1031,14 +1031,15 @@ sub show_table { $r->print(''); $r->print('

'); my $linkstart=' - - '); + $r->print(&Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row().' + '); foreach my $which (@show_order) { if ($which ne 'proctor' && exists($show{$which})) { $r->print(''.$linkstart.$which.'">'.$show_fields{$which}.''); } } + $r->print(&Apache::loncommon::end_data_table_header_row()); my %name_cache; my $slotsort = sub { @@ -1180,7 +1181,10 @@ DELETELINK undef($remove_all); } - $r->print("\n$edit $delete\n"); + my $row_start=&Apache::loncommon::start_data_table_row(); + my $row_end=&Apache::loncommon::end_data_table_row(); + $r->print($row_start. + "\n$edit $delete\n"); if (exists($show{'name'})) { $colspan++;$r->print("$slot"); } @@ -1223,12 +1227,12 @@ DELETELINK if (exists($show{'scheduled'})) { $colspan++;$r->print("$remove_all $ids\n"); } - $r->print("\n"); + $r->print("$row_end\n"); if (exists($show{'proctor'})) { $r->print(< +$row_start $proctors - +$row_end STUFF } } @@ -1566,7 +1570,9 @@ sub handler { } my (undef,undef,$res)=&Apache::lonnet::decode_symb($symb); my $useslots = &Apache::lonnet::EXT("resource.0.useslots",$symb); - if ($useslots ne 'resource' && $useslots ne 'map') { + if ($useslots ne 'resource' + && $useslots ne 'map' + && $useslots ne 'map_map') { &fail($r,'not_available'); return OK; }