Index: lams_monitoring/lib/lams/lams.jar =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/lib/lams/Attic/lams.jar,v diff -u -r1.13 -r1.14 Binary files differ Index: lams_monitoring/lib/lams/lams_learning.jar =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/lib/lams/Attic/lams_learning.jar,v diff -u -r1.1 -r1.2 Binary files differ Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java,v diff -u -r1.17 -r1.18 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java 19 Apr 2005 05:46:57 -0000 1.17 +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java 20 Apr 2005 02:13:00 -0000 1.18 @@ -21,6 +21,7 @@ package org.lamsfoundation.lams.monitoring.service; import java.io.IOException; +import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -273,6 +274,7 @@ log.debug("=============Starting Lesson "+lessonId+"=============="); //we get the lesson just created Lesson requestedLesson = lessonDAO.getLesson(new Long(lessonId)); + Date lessonStartTime = new Date(); //initialize tool sessions if necessary for (Iterator i = requestedLesson.getLearningDesign() .getActivities() @@ -287,11 +289,11 @@ requestedLesson); //if it is schedule gate, we need to initialize the sheduler for it. if(activity.getActivityTypeId().intValue()==Activity.SCHEDULE_GATE_ACTIVITY_TYPE) - runGateScheduler((ScheduleGateActivity)activity); + runGateScheduler((ScheduleGateActivity)activity,lessonStartTime); } //update lesson status requestedLesson.setLessonStateId(Lesson.STARTED_STATE); - + requestedLesson.setStartDateTime(lessonStartTime); lessonDAO.updateLesson(requestedLesson); if(log.isDebugEnabled()) @@ -742,7 +744,8 @@ * * @param scheduleGate the gate that needs to be scheduled. */ - private void runGateScheduler(ScheduleGateActivity scheduleGate) + private void runGateScheduler(ScheduleGateActivity scheduleGate, + Date lessonStartTime) { if(log.isDebugEnabled()) log.debug("Running scheduler for gate "+scheduleGate.getActivityId()+"..."); @@ -756,10 +759,10 @@ //create customized triggers Trigger openGateTrigger = new SimpleTrigger("openGateTrigger", Scheduler.DEFAULT_GROUP, - scheduleGate.getRealGateOpenTime()); + scheduleGate.getLessonGateOpenTime(lessonStartTime)); Trigger closeGateTrigger = new SimpleTrigger("closeGateTrigger", Scheduler.DEFAULT_GROUP, - scheduleGate.getRealGateCloseTime()); + scheduleGate.getLessonGateCloseTime(lessonStartTime)); //start the scheduling job try { @@ -771,6 +774,9 @@ throw new MonitoringServiceException("Error occurred at " + "[runGateScheduler]- fail to start scheduling",e); } + //update the gate because the start time might be setup + activityDAO.update(scheduleGate); + if(log.isDebugEnabled()) log.debug("Scheduler for Gate "+scheduleGate.getActivityId()+" started..."); } Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GateAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GateAction.java,v diff -u -r1.3 -r1.4 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GateAction.java 19 Apr 2005 07:46:46 -0000 1.3 +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GateAction.java 20 Apr 2005 02:13:00 -0000 1.4 @@ -261,8 +261,8 @@ { gateForm.set("gate",scheduleGate); gateForm.set("waitingLearners",new Integer(scheduleGate.getWaitingLearners().size())); - gateForm.set("startingTime",scheduleGate.getRealGateOpenTime()); - gateForm.set("endingTime",scheduleGate.getRealGateCloseTime()); + gateForm.set("startingTime",scheduleGate.getGateStartDateTime()); + gateForm.set("endingTime",scheduleGate.getGateEndDateTime()); return mapping.findForward(VIEW_SCHEDULE_GATE); } Index: lams_monitoring/web/WEB-INF/lib/lams.jar =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/web/WEB-INF/lib/Attic/lams.jar,v diff -u -r1.3 -r1.4 Binary files differ Index: lams_monitoring/web/gate/scheduleGateContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/web/gate/scheduleGateContent.jsp,v diff -u -r1.2 -r1.3 --- lams_monitoring/web/gate/scheduleGateContent.jsp 19 Apr 2005 07:46:46 -0000 1.2 +++ lams_monitoring/web/gate/scheduleGateContent.jsp 20 Apr 2005 02:13:00 -0000 1.3 @@ -40,13 +40,13 @@