--- loncom/interface/slotrequest.pm 2016/08/06 21:32:55 1.125.2.1 +++ loncom/interface/slotrequest.pm 2017/11/01 02:49:13 1.125.2.3.2.1 @@ -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.125.2.1 2016/08/06 21:32:55 raeburn Exp $ +# $Id: slotrequest.pm,v 1.125.2.3.2.1 2017/11/01 02:49:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -162,9 +162,24 @@ $js var startdate = startm+"/"+startd+"/"+starty; var starttime = new Date(startdate).getTime(); starttime = starttime/1000; + var starth = form.start_hour.options[form.start_hour.selectedIndex].value; + if (numberRegExp.test(starth)) { + starth = parseInt(starth); + if (starth > 0 && starth <= 23) { + starttime += 3600 * starth; + } + } var enddate = endm+"/"+endd+"/"+endy; var endtime = new Date(enddate).getTime(); endtime = endtime/1000; + var endh = form.end_hour.options[form.end_hour.selectedIndex].value; + if (numberRegExp.test(endh)) { + endh = parseInt(endh); + if (endh > 0 && endh <= 23) { + endtime += 3600 * endh; + } + } + var shown = 0; for (var i=0; i<$i; i++) { if ((slotstart[i] >= starttime) && (slotend[i] <= endtime)) { @@ -1461,15 +1476,16 @@ sub show_table { $r->print(''); $r->print('
'); my $linkstart=''.$show_fields{$which}.''); + $tableheader .= ''.&mt('No slots meet the criteria for display').'
'); + } + $r->print(''); return; } @@ -2066,14 +2096,16 @@ sub show_reservations { if ($showntablehdr) { $r->print(&Apache::loncommon::end_data_table().''.&mt('Previous [_1] changes',$curr{'show'}).' | '); + $r->print(''); } if ($more_records) { - $r->print(''.&mt('Next [_1] changes',$curr{'show'}).' | '); + $r->print(''); } - $r->print('