--- loncom/interface/slotrequest.pm 2009/04/23 17:33:54 1.95 +++ loncom/interface/slotrequest.pm 2009/10/15 23:53:46 1.104 @@ -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.95 2009/04/23 17:33:54 bisitz Exp $ +# $Id: slotrequest.pm,v 1.104 2009/10/15 23:53:46 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -707,7 +707,8 @@ $lt{'or'} STUFF if (!$inhibit_return_link) { - $r->print(&mt('or').'

').&return_link($r); + $r->print(&mt('or').'

'); + &return_link($r); } else { $r->print('

'); } @@ -1434,8 +1435,6 @@ sub manage_reservations { .&mt('Instructors may use a reservation system to place restrictions on when and where assignments can be worked on.') .'
' .&mt('One example is for management of laboratory space, which is only available at certain times, and has a limited number of seats.') - .'

' - .&mt('Your reservation status for any such assignments is listed below:') .'

' ); if (!defined($navmap)) { @@ -1450,7 +1449,11 @@ sub manage_reservations { my @backgrounds = ("LC_odd_row","LC_even_row"); my $numcolors = scalar(@backgrounds); my $location=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/whitespace_21.gif"); - $r->print(''."\n"); + my $slotheader = '

'. + &mt('Your reservation status for any such assignments is listed below:'). + '

'. + '
'."\n"; + my $shownheader = 0; my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef); while (my $resource = $it->next()) { if ($resource == $it->BEGIN_MAP()) { @@ -1545,11 +1548,19 @@ sub manage_reservations { foreach my $item (@maprows) { $rownum ++; my $bgcolor = $backgrounds[$rownum % $numcolors]; + if (!$shownheader) { + $r->print($slotheader); + $shownheader = 1; + } $r->print(''.$item.''."\n"); } } $rownum ++; my $bgcolor = $backgrounds[$rownum % $numcolors]; + if (!$shownheader) { + $r->print($slotheader); + $shownheader = 1; + } $r->print('
'."\n"); for (my $i=0; $i<$depth; $i++) { $r->print(''); @@ -1584,11 +1595,13 @@ sub manage_reservations { } } } + if ($shownheader) { + $r->print('
'); + } if (!$reservable) { $r->print(''.&mt('No course items currently require a reservation to gain access.').''); } - $r->print(''. - '

'. + $r->print('

'. &mt('Reservation History').'

'); } @@ -1599,9 +1612,9 @@ sub show_map_row { $output .= ''; } if ($type eq 'page') { - $output .= ' '."\n"; + $output .= ' '."\n"; } else { - $output .= ' '."\n"; + $output .= ' '."\n"; } $output .= $title.' '."\n"; unshift (@{$maprows},$output); @@ -1735,7 +1748,7 @@ ENDSCRIPT } } else { $r->print('' - .&mt('There are no transactions to display') + .&mt('There are no transactions to display.') .'' ); } @@ -1932,7 +1945,7 @@ function chgPage(caller) { ENDSCRIPT } } else { - $r->print(&mt('There are no records to display')); + $r->print(&mt('There are no records to display.')); } $r->print(''. ''. @@ -2051,36 +2064,41 @@ sub display_filter { } $output .= '  '. - ''. - &mt('[_1]Note:[_2] Only changes made from servers running LON-CAPA 2.8.99.0 or later are displayed.'); + '

'. + &mt('Only changes made from servers running LON-CAPA [_1] or later are displayed.' + ,'2.9.0'); if ($version) { - $output .= ' '.&mt('This server is version [_3].','','',$version); + $output .= ' '.&mt('This LON-CAPA server is version [_1]',$version); } - $output .= '



'; + $output .= '



'; return $output; } sub upload_start { my ($r)=@_; - $r->print(&Apache::grades::checkforfile_js()); - my $result.=''."\n"; - $result.='
'."\n"; - $result.=' '. - &mt('Specify a file containing the slot definitions.'). - '
'."\n"; - my $upfile_select=&Apache::loncommon::upfile_select_html(); - my $ignore=&mt('Ignore First Line'); - $result.=< - -$upfile_select -
- - -ENDUPFORM - $result.='
'."\n"; - $result.=''."\n"; - $r->print($result); + $r->print( + &Apache::grades::checkforfile_js() + .'

'.&mt('Specify a file containing the slot definitions.').'

' + .'
' + .'' + .&Apache::lonhtmlcommon::start_pick_box() + .&Apache::lonhtmlcommon::row_title(&mt('File')) + .&Apache::loncommon::upfile_select_html() + .&Apache::lonhtmlcommon::row_closure() + .&Apache::lonhtmlcommon::row_title( + '') + .'' + .&Apache::lonhtmlcommon::row_closure(1) + .&Apache::lonhtmlcommon::end_pick_box() + .'

' + .'' + .'

' + .'
' + ); } sub csvuploadmap_header { @@ -2102,8 +2120,8 @@ sub csvuploadmap_header { Total number of records found in file: $distotal
Enter as many fields as you can. The system will inform you and bring you back to this page if the data selected is insufficient to create the slots.
- - + + @@ -2127,7 +2145,7 @@ sub csvuploadmap_footer { -
+
ENDPICK }