[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface slotrequest.pm
raeburn
raeburn at source.lon-capa.org
Mon Aug 8 17:18:32 EDT 2016
raeburn Mon Aug 8 21:18:32 2016 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface slotrequest.pm
Log:
- For 2.11
- Backport 1.128.
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.125.2.1 loncom/interface/slotrequest.pm:1.125.2.2
--- loncom/interface/slotrequest.pm:1.125.2.1 Sat Aug 6 21:32:55 2016
+++ loncom/interface/slotrequest.pm Mon Aug 8 21:18:31 2016
@@ -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.2 2016/08/08 21:18:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -162,9 +162,24 @@
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)) {
More information about the LON-CAPA-cvs
mailing list