--- loncom/interface/slotrequest.pm 2015/09/25 02:03:29 1.127 +++ loncom/interface/slotrequest.pm 2015/09/25 16:13:00 1.128 @@ -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.127 2015/09/25 02:03:29 raeburn Exp $ +# $Id: slotrequest.pm,v 1.128 2015/09/25 16:13:00 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)) {