version 1.91, 2009/03/27 06:47:59
|
version 1.100, 2009/08/05 13:40:10
|
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 1351 LOGLINK
|
Line 1352 LOGLINK
|
|
|
my $remove_all=&remove_link($slot,'remove all').'<br />'; |
my $remove_all=&remove_link($slot,'remove all').'<br />'; |
|
|
if ($ids ne '') { undef($delete); } |
if ($ids eq '') { |
if ($slots{$slot}{'type'} ne 'schedulable_student' |
undef($remove_all); |
|| $ids eq '') { |
} else { |
|
undef($delete); |
|
} |
|
if ($slots{$slot}{'type'} ne 'schedulable_student') { |
|
undef($showlog); |
undef($remove_all); |
undef($remove_all); |
} |
} |
|
|
Line 1426 STUFF
|
Line 1431 STUFF
|
sub manage_reservations { |
sub manage_reservations { |
my ($r,$type) = @_; |
my ($r,$type) = @_; |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
$r->print('<p>'.&mt('Instructors may use a reservation system to place restrictions on when and where assignments can be worked on.').'<br />'.&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>'); |
$r->print('<p>' |
|
.&mt('Instructors may use a reservation system to place restrictions on when and where assignments can be worked on.') |
|
.'<br />' |
|
.&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>' |
|
); |
if (!defined($navmap)) { |
if (!defined($navmap)) { |
$r->print('<div class="LC_error">'. |
$r->print('<div class="LC_error">'. |
&mt('Unable to retrieve information about course contents'). |
&mt('Unable to retrieve information about course contents'). |
Line 1588 sub show_map_row {
|
Line 1600 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 1611 sub show_reservations {
|
Line 1623 sub show_reservations {
|
my %log=&Apache::lonnet::dump('nohist_'.$cdom.'_'.$cnum.'_slotlog',$udom,$uname); |
my %log=&Apache::lonnet::dump('nohist_'.$cdom.'_'.$cnum.'_slotlog',$udom,$uname); |
if ($env{'form.origin'} eq 'aboutme') { |
if ($env{'form.origin'} eq 'aboutme') { |
$r->print('<div class="LC_fontsize_large">'. |
$r->print('<div class="LC_fontsize_large">'. |
&mt('History of student-schedulable slots for: [_1]', |
&mt('History of student-reservable slots for: [_1]', |
&Apache::loncommon::plainname($env{'form.uname'},$env{'form.udom'}, |
&Apache::loncommon::plainname($env{'form.uname'},$env{'form.udom'}, |
'firstname')).'</div>'); |
'firstname')).'</div>'); |
} |
} |
Line 1723 function chgPage(caller) {
|
Line 1735 function chgPage(caller) {
|
ENDSCRIPT |
ENDSCRIPT |
} |
} |
} else { |
} else { |
$r->print(&mt('There are no trasactions to display')); |
$r->print('<span class="LC_info">' |
|
.&mt('There are no transactions to display.') |
|
.'</span>' |
|
); |
} |
} |
$r->print('<input type="hidden" name="page" value="'.$curr{'page'}.'" />'."\n". |
$r->print('<input type="hidden" name="page" value="'.$curr{'page'}.'" />'."\n". |
'<input type="hidden" name="command" value="showresv" />'."\n"); |
'<input type="hidden" name="command" value="showresv" />'."\n"); |
Line 1738 ENDSCRIPT
|
Line 1753 ENDSCRIPT
|
|
|
sub show_reservations_log { |
sub show_reservations_log { |
my ($r) = @_; |
my ($r) = @_; |
|
my $badslot; |
|
if ($env{'form.slotname'} eq '') { |
|
$r->print('<div class="LC_warning">'.&mt('No slot name provided').'</div>'); |
|
$badslot = 1; |
|
} else { |
|
my %slot=&Apache::lonnet::get_slot($env{'form.slotname'}); |
|
if (keys(%slot) == 0) { |
|
$r->print('<div class="LC_warning">'.&mt('Invalid slot name: [_1]',$env{'form.slotname'}).'</div>'); |
|
$badslot = 1; |
|
} elsif ($slot{type} ne 'schedulable_student') { |
|
my $description = &get_description($env{'form.slotname'},\%slot); |
|
$r->print('<div class="LC_warning">'.&mt('Reservation history unavailable for non-student-reservable slot: [_1].',$description).'</div>'); |
|
$badslot = 1; |
|
} |
|
} |
|
if ($badslot) { |
|
$r->print('<p><a href="/adm/slotrequest?command=showslots">'. |
|
&mt('Return to slot list').'</a></p>'); |
|
return; |
|
} |
my $formname = 'reservationslog'; |
my $formname = 'reservationslog'; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
Line 1800 sub show_reservations_log {
|
Line 1835 sub show_reservations_log {
|
|
|
my %slot=&Apache::lonnet::get_slot($env{'form.slotname'}); |
my %slot=&Apache::lonnet::get_slot($env{'form.slotname'}); |
my $description = $slot{'description'}; |
my $description = $slot{'description'}; |
$r->print('<div class="LC_fontsize_large">'. |
$r->print('<span class="LC_fontsize_large">'. |
&mt('Reservation changes for slot: [_1]',$description).'</div>'); |
&mt('Reservation changes for student-reservable slot: [_1]',$description).'</span><br />'); |
|
|
$r->print(&display_filter($formname,$cdom,$cnum,\%curr,$version,\@allsymbs)); |
$r->print(&display_filter($formname,$cdom,$cnum,\%curr,$version,\@allsymbs)); |
my $showntablehdr = 0; |
my $showntablehdr = 0; |
Line 1898 function chgPage(caller) {
|
Line 1933 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'}.'" />'. |
'<input type="hidden" name="command" value="slotlog" /></form>'); |
'<input type="hidden" name="command" value="slotlog" /></form>'. |
|
'<p><a href="/adm/slotrequest?command=showslots">'. |
|
&mt('Return to slot list').'</a></p>'); |
return; |
return; |
} |
} |
|
|
Line 1954 sub display_filter {
|
Line 1991 sub display_filter {
|
my ($formname,$cdom,$cnum,$curr,$version,$allsymbs) = @_; |
my ($formname,$cdom,$cnum,$curr,$version,$allsymbs) = @_; |
my $nolink = 1; |
my $nolink = 1; |
my (%titles,%maptitles); |
my (%titles,%maptitles); |
my $output = '<table><tr><td valign="top">'. |
my $output = '<br /><table><tr><td valign="top">'. |
'<span class="LC_nobreak"><b>'.&mt('Changes/page:').'</b><br />'. |
'<span class="LC_nobreak"><b>'.&mt('Changes/page:').'</b><br />'. |
&Apache::lonmeta::selectbox('show',$curr->{'show'},undef, |
&Apache::lonmeta::selectbox('show',$curr->{'show'},undef, |
(&mt('all'),5,10,20,50,100,1000,10000)). |
(&mt('all'),5,10,20,50,100,1000,10000)). |
Line 2015 sub display_filter {
|
Line 2052 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.6.99.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(&Apache::grades::checkforfile_js()); |
my $result.='<table width=100% border=0><tr bgcolor="#e6ffff"><td>'."\n"; |
my $result.='<table width="100%" border="0"><tr bgcolor="#E6FFFF"><td>'."\n"; |
$result.=' <b>'. |
$result.=' <b>'. |
&mt('Specify a file containing the slot definitions.'). |
&mt('Specify a file containing the slot definitions.'). |
'</b></td></tr>'."\n"; |
'</b></td></tr>'."\n"; |
Line 2067 Total number of records found in file: $
|
Line 2105 Total number of records found in file: $
|
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'}" /> |