version 1.148, 2025/03/18 18:57:28
|
version 1.149, 2025/03/20 15:46:05
|
Line 104 sub start_page {
|
Line 104 sub start_page {
|
|
|
sub end_page { |
sub end_page { |
my ($r)=@_; |
my ($r)=@_; |
$r->print(&Apache::loncommon::end_page()); |
$r->print('</div>'.&Apache::loncommon::end_page()); |
} |
} |
|
|
sub reservation_js { |
sub reservation_js { |
Line 1473 sub show_choices {
|
Line 1473 sub show_choices {
|
} |
} |
} |
} |
my $showfilter = 'none'; |
my $showfilter = 'none'; |
$output .= '<fieldset><legend>'.&mt('Actions').'</legend>'."\n". |
$output .= '<fieldset><legend>'.&mt('Actions').':</legend>'."\n". |
'<form method="post" name="reservationdisplay_'.$num. |
'<form method="post" name="reservationdisplay_'.$num. |
'" action="" onsubmit="toggleSlotDisplay(this.form,'."'$num'".');">'; |
'" action="" onsubmit="toggleSlotDisplay(this.form,'."'$num'".');">'; |
my @options = ('all','filter'); |
my @options = ('all','filter'); |
Line 1833 sub show_table {
|
Line 1833 sub show_table {
|
<input type="hidden" name="command" value="showslots" />'); |
<input type="hidden" name="command" value="showslots" />'); |
$r->print('<div>'); |
$r->print('<div>'); |
$r->print('<table class="inline"> |
$r->print('<table class="inline"> |
<tr><th>'.&mt('Show').'</th> |
<tr><th><label for="show">'.&mt('Show').'</label></th> |
<th>'.&mt('Student Display').'</th> |
<th><label for="studisplay">'.&mt('Student Display').'</label></th> |
<th>'.&mt('Open').'</th> |
<th><label for="when">'.&mt('Open').'</label></th> |
<th>'.&mt('Slot Name Filter').'</th> |
<th><label for="name_filter_type">'.&mt('Slot Name Filter').'</label></th> |
<th>'.&mt('Options').'</th> |
<th>'.&mt('Options').'</th> |
</tr> |
</tr> |
<tr><td valign="top">'.&Apache::loncommon::multiple_select_form('show',\@show,6,\%show_fields,\@show_order). |
<tr><td valign="top">'.&Apache::loncommon::multiple_select_form('show',\@show,6,\%show_fields,\@show_order,'show'). |
'</td> |
'</td> |
<td valign="top"> |
<td valign="top"> |
'.&Apache::loncommon::multiple_select_form('studisplay',\@stu_display, |
'.&Apache::loncommon::multiple_select_form('studisplay',\@stu_display, |
6,\%stu_display_fields, |
6,\%stu_display_fields, |
\@stu_display_order).' |
\@stu_display_order,'studisplay').' |
</td> |
</td> |
<td valign="top">'.&Apache::loncommon::select_form($when,'when',\%when_fields). |
<td valign="top">'.&Apache::loncommon::select_form($when,'when',\%when_fields,'','','when'). |
'</td> |
'</td> |
<td valign="top">'.&Apache::loncommon::select_form($name_filter_type, |
<td valign="top"><span class="LC_nobreak">'.&Apache::loncommon::select_form($name_filter_type, |
'name_filter_type', |
'name_filter_type', |
\%name_filter_type_fields). |
\%name_filter_type_fields,'','','name_filter_type'). |
'<br />'. |
' '. |
&Apache::lonhtmlcommon::textbox('name_filter_value', |
&Apache::lonhtmlcommon::textbox('name_filter_value', |
$env{'form.name_filter_value'}, |
$env{'form.name_filter_value'}, |
15). |
15,'aria-label="'.&mt('Name filter').'"'). |
'</td> |
'</span></td> |
<td valign="top"> |
<td valign="top"> |
<table> |
<fieldset class="LC_delete_slot"> |
<tr> |
<legend>'.&mt('Deleted slots').'</legend> |
<td rowspan="2">'.&mt('Deleted slots:').'</td> |
<span class="LC_nobreak"><label>'.$show_radio.&mt('Show').'</label> |
<td><label>'.$show_radio.&mt('Show').'</label></td> |
<label>'.$hide_radio.&mt('Hide').'</label></span> |
</tr> |
</fieldset> |
<tr> |
</td> |
<td><label>'.$hide_radio.&mt('Hide').'</label></td> |
|
</tr> |
|
</table> |
|
</td> |
|
</tr> |
</tr> |
</table>'); |
</table>'); |
$r->print('</div>'); |
$r->print('</div>'); |
Line 1874 sub show_table {
|
Line 1870 sub show_table {
|
my $linkstart='<a href="/adm/slotrequest?command=showslots&order='; |
my $linkstart='<a href="/adm/slotrequest?command=showslots&order='; |
my $tableheader = &Apache::loncommon::start_data_table(). |
my $tableheader = &Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row().' |
&Apache::loncommon::start_data_table_header_row().' |
<th></th>'; |
<th><span class="LC_visually_hidden">'.&mt('Action').'</span></th>'; |
foreach my $which (@show_order) { |
foreach my $which (@show_order) { |
if ($which ne 'proctor' && exists($show{$which})) { |
if ($which ne 'proctor' && exists($show{$which})) { |
$tableheader .= '<th>'.$linkstart.$which.'">'.$show_fields{$which}.'</a></th>'; |
$tableheader .= '<th>'.$linkstart.$which.'">'.$show_fields{$which}.'</a></th>'; |
Line 2041 sub show_table {
|
Line 2037 sub show_table {
|
my ($edit,$delete,$showlog,$remove_all); |
my ($edit,$delete,$showlog,$remove_all); |
if ($mgr) { |
if ($mgr) { |
$edit=(<<"EDITLINK"); |
$edit=(<<"EDITLINK"); |
<a href="/adm/helper/newslot.helper?name=$slot">$lt{'edit'}</a> |
<p class="LC_medium_line"><a href="/adm/helper/newslot.helper?name=$slot">$lt{'edit'}</a></p> |
EDITLINK |
EDITLINK |
|
|
$delete=(<<"DELETELINK"); |
$delete=(<<"DELETELINK"); |
<a href="/adm/slotrequest?command=delete&slotname=$slot">$lt{'delete'}</a> |
<p class="LC_medium_line"><a href="/adm/slotrequest?command=delete&slotname=$slot">$lt{'delete'}</a></p> |
DELETELINK |
DELETELINK |
|
|
$remove_all=&remove_link($slot,'remove all').'<br />'; |
$remove_all=&remove_link($slot,'remove all').'<br />'; |
Line 2058 DELETELINK
|
Line 2054 DELETELINK
|
} |
} |
|
|
$showlog=(<<"LOGLINK"); |
$showlog=(<<"LOGLINK"); |
<a href="/adm/slotrequest?command=slotlog&slotname=$slot">$lt{'slotlog'}</a> |
<p class="LC_medium_line"><a href="/adm/slotrequest?command=slotlog&slotname=$slot">$lt{'slotlog'}</a></p> |
LOGLINK |
LOGLINK |
|
|
if ($slots{$slot}{'type'} ne 'schedulable_student') { |
if ($slots{$slot}{'type'} ne 'schedulable_student') { |
Line 2298 sub manage_reservations {
|
Line 2294 sub manage_reservations {
|
my $slotheader = '<p>'. |
my $slotheader = '<p>'. |
&mt('Your reservation status for any such assignments is listed below:'). |
&mt('Your reservation status for any such assignments is listed below:'). |
'</p>'. |
'</p>'. |
'<table class="LC_data_table LC_tableOfContent" id="LC_slot_reservations">'."\n"; |
'<table class="LC_data_table LC_tableOfContent" id="LC_slot_reservations">'."\n". |
|
'<tr class="LC_visually_hidden">'. |
|
'<th>'.&mt('Resource or Folder').'</th>'. |
|
'<th colspan="2">'.&mt('Reservation Status').'</th></tr>'."\n"; |
my $shownheader = 0; |
my $shownheader = 0; |
my $currmap; |
my $currmap; |
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef); |
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef); |
Line 2914 sub display_filter {
|
Line 2913 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 = '<br /><table><tr><td valign="top">'. |
my $output = '<br /><table><tr><th class="LC_log_filter">'. |
'<span class="LC_nobreak"><b>'.&mt('Changes/page:').'</b><br />'. |
'<span class="LC_nobreak"><label for="show">'.&mt('Changes/page:').'</label></span></th>'. |
&Apache::lonmeta::selectbox('show',$curr->{'show'},'','',undef, |
'<th class="LC_log_filter">'.&mt('Window during which changes occurred:').'</th>'; |
(&mt('all'),5,10,20,50,100,1000,10000)). |
if (ref($allsymbs) eq 'ARRAY') { |
'</td><td> </td>'; |
$output.= '<th class="LC_log_filter"><label for="resource">'.&mt('Resource').'</label></th>'. |
|
'<th class="LC_log_filter"><label for="chgcontext">'.&mt('Context').'</label></th>'; |
|
} else { |
|
$output.= '<th class="LC_log_filter"><label for="action">'.&mt('Action').'</label></th>'; |
|
} |
|
$output .= '</tr><tr><td class="LC_log_filter">'. |
|
&Apache::lonmeta::selectbox('show',$curr->{'show'},'','show',undef, |
|
(&mt('all'),5,10,20,50,100,1000,10000)). |
|
'</td>'; |
my $startform = |
my $startform = |
&Apache::lonhtmlcommon::date_setter($formname,'log_start_date', |
&Apache::lonhtmlcommon::date_setter($formname,'log_start_date', |
$curr->{'log_start_date'},undef, |
$curr->{'log_start_date'},undef, |
Line 2929 sub display_filter {
|
Line 2936 sub display_filter {
|
undef,undef,undef,undef,undef,undef,$nolink); |
undef,undef,undef,undef,undef,undef,$nolink); |
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |
my %lt = &reservationlog_contexts($crstype); |
my %lt = &reservationlog_contexts($crstype); |
$output .= '<td valign="top"><b>'.&mt('Window during which changes occurred:'). |
$output .= '<td class="LC_log_filter"><table><tr><th>'.&mt('After:').'</th>'. |
'</b><br /><table><tr><td>'.&mt('After:'). |
'<td>'.$startform.'</td></tr>'. |
'</td><td>'.$startform.'</td></tr><tr><td>'.&mt('Before:').'</td><td>'. |
'<tr><th>'.&mt('Before:').'</th>'. |
$endform.'</td></tr></table></td><td> </td>'; |
'<td>'.$endform.'</td></tr></table>'. |
|
'</td>'; |
if (ref($allsymbs) eq 'ARRAY') { |
if (ref($allsymbs) eq 'ARRAY') { |
$output .= '<td valign="top"><b>'.&mt('Resource').'</b><br />'. |
$output .= '<td class="LC_log_filter"><select name="resource" id="resource"><option value="any"'; |
'<select name="resource"><option value="any"'; |
|
if ($curr->{'resource'} eq 'any') { |
if ($curr->{'resource'} eq 'any') { |
$output .= ' selected="selected"'; |
$output .= ' selected="selected"'; |
} |
} |
Line 2948 sub display_filter {
|
Line 2955 sub display_filter {
|
} |
} |
$output .= ' <option value="'.$symb.'"'.$selstr.'>'.$title.'</option>'; |
$output .= ' <option value="'.$symb.'"'.$selstr.'>'.$title.'</option>'; |
} |
} |
$output .= '</select></td><td> </td><td valign="top"><b>'. |
$output .= '</select></td>'. |
&mt('Context:').'</b><br /><select name="chgcontext">'; |
'<td class="LC_log_filter"><select name="chgcontext" id="chgcontext">'; |
foreach my $chgtype ('any','user','manage','parameter') { |
foreach my $chgtype ('any','user','manage','parameter') { |
my $selstr = ''; |
my $selstr = ''; |
if ($curr->{'chgcontext'} eq $chgtype) { |
if ($curr->{'chgcontext'} eq $chgtype) { |
Line 2959 sub display_filter {
|
Line 2966 sub display_filter {
|
} |
} |
$output .= '</select></td>'; |
$output .= '</select></td>'; |
} else { |
} else { |
$output .= '<td valign="top"><b>'.&mt('Action').'</b><br />'. |
$output .= '<td class="LC_log_filter"><select name="action" id="action"><option value="any"'; |
'<select name="action"><option value="any"'; |
|
if ($curr->{'action'} eq 'any') { |
if ($curr->{'action'} eq 'any') { |
$output .= ' selected="selected"'; |
$output .= ' selected="selected"'; |
} |
} |
Line 2974 sub display_filter {
|
Line 2980 sub display_filter {
|
} |
} |
$output .= '</select></td>'; |
$output .= '</select></td>'; |
} |
} |
$output .= '<td> </td></tr></table>'. |
$output .= '</tr></table>'. |
'<p><input type="submit" value="'. |
'<p><input type="submit" value="'. |
&mt('Update Display').'" /></p>'. |
&mt('Update Display').'" /></p>'. |
'<p class="LC_info">'. |
'<p class="LC_info">'. |
Line 3027 sub upload_start {
|
Line 3033 sub upload_start {
|
my ($r)=@_; |
my ($r)=@_; |
$r->print( |
$r->print( |
&Apache::grades::checkforfile_js() |
&Apache::grades::checkforfile_js() |
.'<h2>'.&mt('Upload a file containing the slot definitions').'</h2>' |
.'<h2 class="LC_heading_2">'.&mt('Upload a file containing the slot definitions').'</h2>' |
.'<form method="post" enctype="multipart/form-data"' |
.'<form method="post" enctype="multipart/form-data"' |
.' action="/adm/slotrequest" name="slotupload">' |
.' action="/adm/slotrequest" name="slotupload">' |
.'<input type="hidden" name="command" value="csvuploadmap" />' |
.'<input type="hidden" name="command" value="csvuploadmap" />' |
.&Apache::lonhtmlcommon::start_pick_box() |
.&Apache::lonhtmlcommon::start_pick_box() |
.&Apache::lonhtmlcommon::row_title(&mt('File')) |
.&Apache::lonhtmlcommon::row_title('<label for="upfile">'.&mt('File').'</label>') |
.&Apache::loncommon::upfile_select_html() |
.&Apache::loncommon::upfile_select_html() |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_title( |
.&Apache::lonhtmlcommon::row_title( |
Line 3065 sub csvuploadmap_header {
|
Line 3071 sub csvuploadmap_header {
|
|
|
$r->print( |
$r->print( |
'<form method="post" enctype="multipart/form-data" action="/adm/slotrequest" name="slotupload">' |
'<form method="post" enctype="multipart/form-data" action="/adm/slotrequest" name="slotupload">' |
.'<h2>'.&mt('Identify fields in uploaded list').'</h2>' |
.'<h2 class="LC_heading_2">'.&mt('Identify fields in uploaded list').'</h2>' |
.'<div class="LC_columnSection">' |
.'<div class="LC_columnSection">' |
.&Apache::loncommon::help_open_topic( |
.&Apache::loncommon::help_open_topic( |
'Slot About',&mt('Help on slots')) |
'Slot About',&mt('Help on slots')) |
Line 3520 sub handler {
|
Line 3526 sub handler {
|
$js = &reservation_js(\%slots,$consumed_uniqueperiods,$available,$got_slots,$symb); |
$js = &reservation_js(\%slots,$consumed_uniqueperiods,$available,$got_slots,$symb); |
} |
} |
&start_page($r,$title,$brcrum,$bread_crumbs_component,$js,$mgr); |
&start_page($r,$title,$brcrum,$bread_crumbs_component,$js,$mgr); |
|
$r->print('<div class="LC_landmark" role="main">'."\n"); |
|
|
if ($env{'form.command'} eq 'manageresv') { |
if ($env{'form.command'} eq 'manageresv') { |
$allavailable = $available; |
$allavailable = $available; |