Index: lams_build/lib/lams/lams-monitoring.jar =================================================================== diff -u -r1454b2fd27486dd14b1ccf172b96df61a0b0d355 -rc132bb7d3199254229dac8c10845eabea365c7e3 Binary files differ Index: lams_documents/lams_monitoring/Monitoring.doc =================================================================== diff -u -r19b4886f106a3834b45102423ef5c0139adb147f -rc132bb7d3199254229dac8c10845eabea365c7e3 Binary files differ Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/IMonitoringService.java =================================================================== diff -u -r440554bb4a9a414c6e3e676a93de72de3298951c -rc132bb7d3199254229dac8c10845eabea365c7e3 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/IMonitoringService.java (.../IMonitoringService.java) (revision 440554bb4a9a414c6e3e676a93de72de3298951c) +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/IMonitoringService.java (.../IMonitoringService.java) (revision c132bb7d3199254229dac8c10845eabea365c7e3) @@ -40,9 +40,6 @@ /** - * TODO Missing methods - * archiveLesson - * * Interface defines all monitoring services needed by presentation tier. * @author Jacky Fang 2/02/2005 * @author Manpreet Minhas @@ -207,21 +204,11 @@ public GateActivity closeGate(Long gateId); /** - * This method returns a string representing a list of all lessons - * for the current user. See getAllLessons(). - * TODO Remove getAllLessonsWDDX, getAllLessons when the dummy interface is not needed - * - * @return String The requested list of Lessons in wddx format - * @throws IOException - */ - public String getAllLessonsWDDX(Integer userID) throws IOException; - - /** * This method returns a list of all available Lessons. This is all the lessons * created by the current user and all the lessons for which the user is in the * staff group. It does not return removed lessons. * - * If the data is to be sent to Flash, then use getAllLessonsWDDX() + * TODO This is to be removed when the dummy interface is no longer needed. * * @param userID The user_id of the user for whom the lessons * are being fetched. @@ -232,28 +219,16 @@ /** * This method returns the details for the given Lesson in - * WDDX format + * WDDX format. Object inside the packet is a LessonDetailsDTO. * * @param lessonID The lesson_id of the Lesson for which the details have * to be fetched * @return String The requested details in wddx format * @throws IOException */ public String getLessonDetails(Long lessonID)throws IOException; - + /** - * This method returns the data for the given Lesson in - * WDDX format - * - * @param lessonID The lesson_id of the Lesson for which the details have - * to be fetched - * @return String The requested data in wddx format - * @throws IOException - */ - public String getLessonData(Long lessonID)throws IOException; - - - /** * Returns a list of learners participating in the given Lesson * * @param lessonID The lesson_id of the Lesson Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java =================================================================== diff -u -rdf403b3f55f75d3ed5a4e53b8ac259343120ae5f -rc132bb7d3199254229dac8c10845eabea365c7e3 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java (.../MonitoringService.java) (revision df403b3f55f75d3ed5a4e53b8ac259343120ae5f) +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java (.../MonitoringService.java) (revision c132bb7d3199254229dac8c10845eabea365c7e3) @@ -61,7 +61,6 @@ import org.lamsfoundation.lams.lesson.LessonClass; import org.lamsfoundation.lams.lesson.dao.ILessonClassDAO; import org.lamsfoundation.lams.lesson.dao.ILessonDAO; -import org.lamsfoundation.lams.lesson.dto.LessonDTO; import org.lamsfoundation.lams.monitoring.MonitoringConstants; import org.lamsfoundation.lams.tool.ToolSession; import org.lamsfoundation.lams.tool.exception.DataMissingException; @@ -838,13 +837,6 @@ /** * (non-Javadoc) - * @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getAllLessonsWDDX(java.lang.Integer) - */ - public String getAllLessonsWDDX(Integer userID)throws IOException{ - return requestLessonList(getAllLessons(userID)); - } - /** - * (non-Javadoc) * @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getLessonDetails(java.lang.Long) */ public String getLessonDetails(Long lessonID)throws IOException{ @@ -861,22 +853,6 @@ /** * (non-Javadoc) - * @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getLessonDetails(java.lang.Long) - */ - public String getLessonData(Long lessonID)throws IOException{ - Lesson lesson = lessonDAO.getLesson(lessonID); - FlashMessage flashMessage; - if(lesson!=null){ - flashMessage = new FlashMessage("getLessonData",lesson.getLessonData()); - }else - flashMessage = new FlashMessage("getLessonData", - messageService.getMessage("NO.SUCH.LESSON",new Object[]{lessonID}), - FlashMessage.ERROR); - return flashMessage.serializeMessage(); - } - - /** - * (non-Javadoc) * @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getLessonLearners(java.lang.Long) */ public String getLessonLearners(Long lessonID)throws IOException{ @@ -1301,24 +1277,6 @@ } - /** - * This method returns the list of lessons in WDDX format - * - * @param lessons The list of lessons to be converted into WDDX format - * @return String The required information in WDDX format - * @throws IOException - */ - private String requestLessonList(List lessons)throws IOException{ - Vector lessonObjects = new Vector(); - Iterator lessonIterator = lessons.iterator(); - while(lessonIterator.hasNext()){ - Lesson lesson = (Lesson)lessonIterator.next(); - lessonObjects.add(lesson.getLessonData()); - } - FlashMessage flashMessage = new FlashMessage("getAllLessons",lessonObjects); - return flashMessage.serializeMessage(); - } - //--------------------------------------------------------------------- // Helper Methods - scheduling //--------------------------------------------------------------------- Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/MonitoringAction.java =================================================================== diff -u -rdf403b3f55f75d3ed5a4e53b8ac259343120ae5f -rc132bb7d3199254229dac8c10845eabea365c7e3 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/MonitoringAction.java (.../MonitoringAction.java) (revision df403b3f55f75d3ed5a4e53b8ac259343120ae5f) +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/MonitoringAction.java (.../MonitoringAction.java) (revision c132bb7d3199254229dac8c10845eabea365c7e3) @@ -522,17 +522,8 @@ return null; } - public ActionForward getAllLessons(ActionMapping mapping, - ActionForm form, - HttpServletRequest request, - HttpServletResponse response)throws IOException{ - IMonitoringService monitoringService = MonitoringServiceProxy.getMonitoringService(getServlet().getServletContext()); - String wddxPacket = monitoringService.getAllLessonsWDDX(getUserId(request)); - PrintWriter writer = response.getWriter(); - writer.println(wddxPacket); - return null; - } - public ActionForward getLessonDetails(ActionMapping mapping, + + public ActionForward getLessonDetails(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)throws IOException{ @@ -544,18 +535,6 @@ return null; } - public ActionForward getLessonData(ActionMapping mapping, - ActionForm form, - HttpServletRequest request, - HttpServletResponse response)throws IOException{ - IMonitoringService monitoringService = MonitoringServiceProxy.getMonitoringService(getServlet().getServletContext()); - Long lessonID = new Long(WebUtil.readLongParam(request,"lessonID")); - String wddxPacket = monitoringService.getLessonData(lessonID); - PrintWriter writer = response.getWriter(); - writer.println(wddxPacket); - return null; - } - public ActionForward getLessonLearners(ActionMapping mapping, ActionForm form, HttpServletRequest request, Index: lams_monitoring/test/java/org/lamsfoundation/lams/monitoring/service/TestMonitoringService.java =================================================================== diff -u -rdf403b3f55f75d3ed5a4e53b8ac259343120ae5f -rc132bb7d3199254229dac8c10845eabea365c7e3 --- lams_monitoring/test/java/org/lamsfoundation/lams/monitoring/service/TestMonitoringService.java (.../TestMonitoringService.java) (revision df403b3f55f75d3ed5a4e53b8ac259343120ae5f) +++ lams_monitoring/test/java/org/lamsfoundation/lams/monitoring/service/TestMonitoringService.java (.../TestMonitoringService.java) (revision c132bb7d3199254229dac8c10845eabea365c7e3) @@ -240,10 +240,6 @@ { } - public void testGetAllLessons()throws IOException{ - String packet = monitoringService.getAllLessonsWDDX(TEST_STAFF_ID); - System.out.print(packet); - } public void testGetLessonDetails() throws IOException{ String packet = monitoringService.getLessonDetails(TEST_LESSION_ID); System.out.print(packet);