version 1.95, 2009/04/23 17:33:54
|
version 1.104, 2009/10/15 23:53:46
|
Line 707 $lt{'or'}
|
Line 707 $lt{'or'}
|
STUFF |
STUFF |
|
|
if (!$inhibit_return_link) { |
if (!$inhibit_return_link) { |
$r->print(&mt('or').'</p>').&return_link($r); |
$r->print(&mt('or').'</p>'); |
|
&return_link($r); |
} else { |
} else { |
$r->print('</p>'); |
$r->print('</p>'); |
} |
} |
Line 1434 sub manage_reservations {
|
Line 1435 sub manage_reservations {
|
.&mt('Instructors may use a reservation system to place restrictions on when and where assignments can be worked on.') |
.&mt('Instructors may use a reservation system to place restrictions on when and where assignments can be worked on.') |
.'<br />' |
.'<br />' |
.&mt('One example is for management of laboratory space, which is only available at certain times, and has a limited number of seats.') |
.&mt('One example is for management of laboratory space, which is only available at certain times, and has a limited number of seats.') |
.'</p><p>' |
|
.&mt('Your reservation status for any such assignments is listed below:') |
|
.'</p>' |
.'</p>' |
); |
); |
if (!defined($navmap)) { |
if (!defined($navmap)) { |
Line 1450 sub manage_reservations {
|
Line 1449 sub manage_reservations {
|
my @backgrounds = ("LC_odd_row","LC_even_row"); |
my @backgrounds = ("LC_odd_row","LC_even_row"); |
my $numcolors = scalar(@backgrounds); |
my $numcolors = scalar(@backgrounds); |
my $location=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/whitespace_21.gif"); |
my $location=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/whitespace_21.gif"); |
$r->print('<table class="LC_data_table LC_tableOfContent">'."\n"); |
my $slotheader = '<p>'. |
|
&mt('Your reservation status for any such assignments is listed below:'). |
|
'</p>'. |
|
'<table class="LC_data_table LC_tableOfContent">'."\n"; |
|
my $shownheader = 0; |
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef); |
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef); |
while (my $resource = $it->next()) { |
while (my $resource = $it->next()) { |
if ($resource == $it->BEGIN_MAP()) { |
if ($resource == $it->BEGIN_MAP()) { |
Line 1545 sub manage_reservations {
|
Line 1548 sub manage_reservations {
|
foreach my $item (@maprows) { |
foreach my $item (@maprows) { |
$rownum ++; |
$rownum ++; |
my $bgcolor = $backgrounds[$rownum % $numcolors]; |
my $bgcolor = $backgrounds[$rownum % $numcolors]; |
|
if (!$shownheader) { |
|
$r->print($slotheader); |
|
$shownheader = 1; |
|
} |
$r->print('<tr class="'.$bgcolor.'">'.$item.'</tr>'."\n"); |
$r->print('<tr class="'.$bgcolor.'">'.$item.'</tr>'."\n"); |
} |
} |
} |
} |
$rownum ++; |
$rownum ++; |
my $bgcolor = $backgrounds[$rownum % $numcolors]; |
my $bgcolor = $backgrounds[$rownum % $numcolors]; |
|
if (!$shownheader) { |
|
$r->print($slotheader); |
|
$shownheader = 1; |
|
} |
$r->print('<tr class="'.$bgcolor.'"><td>'."\n"); |
$r->print('<tr class="'.$bgcolor.'"><td>'."\n"); |
for (my $i=0; $i<$depth; $i++) { |
for (my $i=0; $i<$depth; $i++) { |
$r->print('<img src="'.$location.'" alt="" />'); |
$r->print('<img src="'.$location.'" alt="" />'); |
Line 1584 sub manage_reservations {
|
Line 1595 sub manage_reservations {
|
} |
} |
} |
} |
} |
} |
|
if ($shownheader) { |
|
$r->print('</table>'); |
|
} |
if (!$reservable) { |
if (!$reservable) { |
$r->print('<span class="LC_info">'.&mt('No course items currently require a reservation to gain access.').'</span>'); |
$r->print('<span class="LC_info">'.&mt('No course items currently require a reservation to gain access.').'</span>'); |
} |
} |
$r->print('</table>'. |
$r->print('<p><a href="/adm/slotrequest?command=showresv">'. |
'<p><a href="/adm/slotrequest?command=showresv">'. |
|
&mt('Reservation History').'</a></p>'); |
&mt('Reservation History').'</a></p>'); |
} |
} |
|
|
Line 1599 sub show_map_row {
|
Line 1612 sub show_map_row {
|
$output .= '<img src="'.$location.'" alt="" />'; |
$output .= '<img src="'.$location.'" alt="" />'; |
} |
} |
if ($type eq 'page') { |
if ($type eq 'page') { |
$output .= '<img src="/adm/lonIcons/navmap.page.open.gif"> '."\n"; |
$output .= '<img src="/adm/lonIcons/navmap.page.open.gif" alt="" /> '."\n"; |
} else { |
} else { |
$output .= '<img src="/adm/lonIcons/navmap.folder.open.gif"> '."\n"; |
$output .= '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" /> '."\n"; |
} |
} |
$output .= $title.'</td><td colspan="2"> </td>'."\n"; |
$output .= $title.'</td><td colspan="2"> </td>'."\n"; |
unshift (@{$maprows},$output); |
unshift (@{$maprows},$output); |
Line 1735 ENDSCRIPT
|
Line 1748 ENDSCRIPT
|
} |
} |
} else { |
} else { |
$r->print('<span class="LC_info">' |
$r->print('<span class="LC_info">' |
.&mt('There are no transactions to display') |
.&mt('There are no transactions to display.') |
.'</span>' |
.'</span>' |
); |
); |
} |
} |
Line 1932 function chgPage(caller) {
|
Line 1945 function chgPage(caller) {
|
ENDSCRIPT |
ENDSCRIPT |
} |
} |
} else { |
} else { |
$r->print(&mt('There are no records to display')); |
$r->print(&mt('There are no records to display.')); |
} |
} |
$r->print('<input type="hidden" name="page" value="'.$curr{'page'}.'" />'. |
$r->print('<input type="hidden" name="page" value="'.$curr{'page'}.'" />'. |
'<input type="hidden" name="slotname" value="'.$env{'form.slotname'}.'" />'. |
'<input type="hidden" name="slotname" value="'.$env{'form.slotname'}.'" />'. |
Line 2051 sub display_filter {
|
Line 2064 sub display_filter {
|
} |
} |
$output .= '<td> </td><td valign="middle"><input type="submit" value="'. |
$output .= '<td> </td><td valign="middle"><input type="submit" value="'. |
&mt('Update Display').'" /></tr></table>'. |
&mt('Update Display').'" /></tr></table>'. |
'<span class="LC_roleslog_note">'. |
'<p class="LC_info">'. |
&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) { |
if ($version) { |
$output .= ' '.&mt('This server is version [_3].','<b>','</b>',$version); |
$output .= ' '.&mt('This LON-CAPA server is version [_1]',$version); |
} |
} |
$output .= '</span><hr noshade><br />'; |
$output .= '</p><hr /><br />'; |
return $output; |
return $output; |
} |
} |
|
|
sub upload_start { |
sub upload_start { |
my ($r)=@_; |
my ($r)=@_; |
$r->print(&Apache::grades::checkforfile_js()); |
$r->print( |
my $result.='<table width="100%" border="0"><tr bgcolor="#E6FFFF"><td>'."\n"; |
&Apache::grades::checkforfile_js() |
$result.=' <b>'. |
.'<h3>'.&mt('Specify a file containing the slot definitions.').'</h3>' |
&mt('Specify a file containing the slot definitions.'). |
.'<form method="post" enctype="multipart/form-data"' |
'</b></td></tr>'."\n"; |
.' action="/adm/slotrequest" name="slotupload">' |
$result.='<tr bgcolor="#ffffe6"><td>'."\n"; |
.'<input type="hidden" name="command" value="csvuploadmap" />' |
my $upfile_select=&Apache::loncommon::upfile_select_html(); |
.&Apache::lonhtmlcommon::start_pick_box() |
my $ignore=&mt('Ignore First Line'); |
.&Apache::lonhtmlcommon::row_title(&mt('File')) |
$result.=<<ENDUPFORM; |
.&Apache::loncommon::upfile_select_html() |
<form method="post" enctype="multipart/form-data" action="/adm/slotrequest" name="slotupload"> |
.&Apache::lonhtmlcommon::row_closure() |
<input type="hidden" name="command" value="csvuploadmap" /> |
.&Apache::lonhtmlcommon::row_title( |
$upfile_select |
'<label for="noFirstLine">' |
<br /><input type="button" onClick="javascript:checkUpload(this.form);" value="Upload Data" /> |
.&mt('Ignore First Line') |
<label><input type="checkbox" name="noFirstLine" />$ignore</label> |
.'</label>') |
</form> |
.'<input type="checkbox" name="noFirstLine" id="noFirstLine" />' |
ENDUPFORM |
.&Apache::lonhtmlcommon::row_closure(1) |
$result.='</td></tr></table>'."\n"; |
.&Apache::lonhtmlcommon::end_pick_box() |
$result.='</td></tr></table>'."\n"; |
.'<p>' |
$r->print($result); |
.'<input type="button" onclick="javascript:checkUpload(this.form);"' |
|
.' value="'.&mt('Next').'" />' |
|
.'</p>' |
|
.'</form>' |
|
); |
} |
} |
|
|
sub csvuploadmap_header { |
sub csvuploadmap_header { |
Line 2102 sub csvuploadmap_header {
|
Line 2120 sub csvuploadmap_header {
|
Total number of records found in file: $distotal <hr /> |
Total number of records found in file: $distotal <hr /> |
Enter as many fields as you can. The system will inform you and bring you back |
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.<hr /> |
to this page if the data selected is insufficient to create the slots.<hr /> |
<input type="button" value="Reverse Association" onClick="javascript:this.form.associate.value='Reverse Association';submit(this.form);" /> |
<input type="button" value="Reverse Association" onclick="javascript:this.form.associate.value='Reverse Association';submit(this.form);" /> |
<label><input type="checkbox" name="noFirstLine" $checked />$ignore</label> |
<label><input type="checkbox" name="noFirstLine"$checked />$ignore</label> |
<input type="hidden" name="associate" value="" /> |
<input type="hidden" name="associate" value="" /> |
<input type="hidden" name="datatoken" value="$datatoken" /> |
<input type="hidden" name="datatoken" value="$datatoken" /> |
<input type="hidden" name="fileupload" value="$env{'form.fileupload'}" /> |
<input type="hidden" name="fileupload" value="$env{'form.fileupload'}" /> |
Line 2127 sub csvuploadmap_footer {
|
Line 2145 sub csvuploadmap_footer {
|
</table> |
</table> |
<input type="hidden" name="nfields" value="$i" /> |
<input type="hidden" name="nfields" value="$i" /> |
<input type="hidden" name="keyfields" value="$keyfields" /> |
<input type="hidden" name="keyfields" value="$keyfields" /> |
<input type="button" onClick="javascript:verify(this.form)" value="$buttontext" /><br /> |
<input type="button" onclick="javascript:verify(this.form)" value="$buttontext" /><br /> |
</form> |
</form> |
ENDPICK |
ENDPICK |
} |
} |