[LON-CAPA-cvs] cvs: loncom /interface slotrequest.pm

raeburn raeburn at source.lon-capa.org
Fri Sep 25 12:13:00 EDT 2015


raeburn		Fri Sep 25 16:13:00 2015 EDT

  Modified files:              
    /loncom/interface	slotrequest.pm 
  Log:
  - Values user selected in hour dropdown lists for "Open after" and 
   "Closed before" when using "Search by date" display of slots were not used.  
  
  
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.127 loncom/interface/slotrequest.pm:1.128
--- loncom/interface/slotrequest.pm:1.127	Fri Sep 25 02:03:29 2015
+++ loncom/interface/slotrequest.pm	Fri Sep 25 16:13:00 2015
@@ -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 @@
                 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