Index: lams_admin/build.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_admin/build.xml,v
diff -u -r1.20 -r1.21
--- lams_admin/build.xml 28 Jan 2009 00:05:11 -0000 1.20
+++ lams_admin/build.xml 11 Aug 2009 03:24:04 -0000 1.21
@@ -213,6 +213,18 @@
+
+
+
+
+
+
+
+
+
+
+
Index: lams_admin/conf/language/lams/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_admin/conf/language/lams/ApplicationResources.properties,v
diff -u -r1.57 -r1.58
--- lams_admin/conf/language/lams/ApplicationResources.properties 5 Jul 2009 13:32:03 -0000 1.57
+++ lams_admin/conf/language/lams/ApplicationResources.properties 11 Aug 2009 03:24:04 -0000 1.58
@@ -386,6 +386,18 @@
admin.gradebook.learner.enable =Enable Gradebook for Learners
admin.gradebook.monitor.enable =Enable Gradebook for Monitors
sysadmin.serverUrl =External Server URL
+admin.statistics.title =Server Statistics
+admin.statistics.overall =Overall Statistics
+admin.statistics.totalUsers =Total users:
+admin.statistics.groups =Total groups:
+admin.statistics.subGroups =Total sub-groups:
+admin.statistics.learningDesigns =Total learning designs:
+admin.statistics.lessons =Total lessons:
+admin.statistics.activities =Total activities:
+admin.statistics.completedActivities =Total completed activities:
+admin.statistics.title.byGroup =Statistics by Group
+admin.statistics.group.learners =Total Learners:
+admin.statistics.group.monitors =Total Monitors:
+admin.statistics.group.authors =Total Authors:
-
#======= End labels: Exported 379 labels for en AU =====
Index: lams_admin/conf/language/lams/ApplicationResources_en_AU.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_admin/conf/language/lams/ApplicationResources_en_AU.properties,v
diff -u -r1.57 -r1.58
--- lams_admin/conf/language/lams/ApplicationResources_en_AU.properties 5 Jul 2009 13:32:04 -0000 1.57
+++ lams_admin/conf/language/lams/ApplicationResources_en_AU.properties 11 Aug 2009 03:24:04 -0000 1.58
@@ -386,6 +386,18 @@
admin.gradebook.learner.enable =Enable Gradebook for Learners
admin.gradebook.monitor.enable =Enable Gradebook for Monitors
sysadmin.serverUrl =External Server URL
+admin.statistics.title =Server Statistics
+admin.statistics.overall =Overall Statistics
+admin.statistics.totalUsers =Total users:
+admin.statistics.groups =Total groups:
+admin.statistics.subGroups =Total sub-groups:
+admin.statistics.learningDesigns =Total learning designs:
+admin.statistics.lessons =Total lessons:
+admin.statistics.activities =Total activities:
+admin.statistics.completedActivities =Total completed activities:
+admin.statistics.title.byGroup =Statistics by Group
+admin.statistics.group.learners =Total Learners:
+admin.statistics.group.monitors =Total Monitors:
+admin.statistics.group.authors =Total Authors:
-
#======= End labels: Exported 379 labels for en AU =====
Index: lams_admin/src/java/org/lamsfoundation/lams/admin/service/AdminServiceProxy.java
===================================================================
RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/service/AdminServiceProxy.java,v
diff -u -r1.7 -r1.8
--- lams_admin/src/java/org/lamsfoundation/lams/admin/service/AdminServiceProxy.java 17 Mar 2009 06:10:31 -0000 1.7
+++ lams_admin/src/java/org/lamsfoundation/lams/admin/service/AdminServiceProxy.java 11 Aug 2009 03:24:04 -0000 1.8
@@ -26,6 +26,7 @@
import javax.servlet.ServletContext;
import org.lamsfoundation.lams.integration.service.IIntegrationService;
+import org.lamsfoundation.lams.statistics.service.IStatisticsService;
import org.lamsfoundation.lams.usermanagement.service.IUserManagementService;
import org.lamsfoundation.lams.usermanagement.service.LdapService;
import org.lamsfoundation.lams.util.MessageService;
@@ -46,7 +47,9 @@
private static IAuditService auditService;
private static IImportService importService;
private static LdapService ldapService;
+ private static IStatisticsService statisticsService;
+
public static final IUserManagementService getService(ServletContext servletContext) {
if (manageService == null) {
manageService = (IUserManagementService)getDomainService(servletContext, "userManagementService");
@@ -90,6 +93,13 @@
return ldapService;
}
+ public static final IStatisticsService getStatisticsService(ServletContext servletContext) {
+ if (statisticsService == null) {
+ statisticsService = (IStatisticsService)getDomainService(servletContext, "statisticsService");
+ }
+ return statisticsService;
+ }
+
private static Object getDomainService(ServletContext servletContext,String serviceName) {
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
return wac.getBean(serviceName);
Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/StatisticsAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/StatisticsAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/StatisticsAction.java 11 Aug 2009 03:24:04 -0000 1.1
@@ -0,0 +1,69 @@
+/****************************************************************
+ * Copyright (C) 2006 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ * License Information: http://lamsfoundation.org/licensing/lams/2.0/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2.0
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ****************************************************************
+ */
+package org.lamsfoundation.lams.admin.web.action;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.lamsfoundation.lams.admin.service.AdminServiceProxy;
+import org.lamsfoundation.lams.statistics.dto.StatisticsDTO;
+import org.lamsfoundation.lams.statistics.service.IStatisticsService;
+import org.lamsfoundation.lams.usermanagement.Role;
+
+/**
+ * @author Luke Foxton
+ *
+ * Gives the overall statistics for a LAMS server
+ *
+ * @struts.action path="/statistics" validate="false"
+ * @struts.action-forward name="success" path=".statistics"
+ * @struts.action-forward name="error" path=".error"
+ */
+public class StatisticsAction extends Action {
+
+ private static IStatisticsService statisticsService;
+
+ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ // check permission
+ if (!request.isUserInRole(Role.SYSADMIN)) {
+ request.setAttribute("errorName", "RegisterAction");
+ request.setAttribute("errorMessage", AdminServiceProxy.getMessageService(getServlet().getServletContext()).getMessage("error.authorisation"));
+ return mapping.findForward("error");
+ }
+
+ if (statisticsService == null) {
+ statisticsService = AdminServiceProxy.getStatisticsService(getServlet().getServletContext());
+ }
+
+ StatisticsDTO stats = statisticsService.getOverallStatistics();
+
+ request.setAttribute("statisticsDTO", stats);
+ return mapping.findForward("success");
+ }
+
+}
Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/SysAdminStartAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/SysAdminStartAction.java,v
diff -u -r1.9 -r1.10
--- lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/SysAdminStartAction.java 13 Sep 2007 08:11:58 -0000 1.9
+++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/SysAdminStartAction.java 11 Aug 2009 03:24:04 -0000 1.10
@@ -71,6 +71,7 @@
links.add(new LinkBean("serverlist.do", "sysadmin.maintain.external.servers"));
links.add(new LinkBean("register.do", "sysadmin.register.server"));
links.add(new LinkBean("libraryManage.do", "sysadmin.library.management"));
+ links.add(new LinkBean("statistics.do", "admin.statistics.title"));
} else if (request.isUserInRole(Role.AUTHOR_ADMIN)) {
LinkBean linkBean = new LinkBean("toolcontentlist.do", "sysadmin.tool.management");
links.add(linkBean);
Index: lams_admin/web/statistics.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_admin/web/statistics.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_admin/web/statistics.jsp 11 Aug 2009 03:24:04 -0000 1.1
@@ -0,0 +1,170 @@
+<%@ include file="/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ ${statisticsDTO.users}
+ |
+
+
+
+
+ |
+
+ ${statisticsDTO.sequences}
+ |
+
+
+
+
+ |
+
+ ${statisticsDTO.lessons}
+ |
+
+
+
+
+ |
+
+ ${statisticsDTO.activities}
+ |
+
+
+
+
+ |
+
+ ${statisticsDTO.completedActivities}
+ |
+
+
+
+
+ |
+
+ ${statisticsDTO.groups}
+ |
+
+
+
+
+ |
+
+ ${statisticsDTO.subGroups}
+ |
+
+
+
+
+
+
+
+ ${groupStatisticDTO.name}
+
+
+
+
+
+ |
+
+ ${groupStatisticDTO.totalUsers}
+ |
+
+
+
+
+ |
+
+ ${groupStatisticDTO.lessons}
+ |
+
+
+
+
+ |
+
+ ${groupStatisticDTO.monitors}
+ |
+
+
+
+
+ |
+
+ ${groupStatisticDTO.authors}
+ |
+
+
+
+
+ |
+
+ ${groupStatisticDTO.learners}
+ |
+
+
+
+
+
+
+
+ ${subGroupStatisticDTO.name}
+
+
+
+
+
+ |
+
+ ${subGroupStatisticDTO.totalUsers}
+ |
+
+
+
+
+ |
+
+ ${subGroupStatisticDTO.lessons}
+ |
+
+
+
+
+ |
+
+ ${subGroupStatisticDTO.monitors}
+ |
+
+
+
+
+ |
+
+ ${subGroupStatisticDTO.authors}
+ |
+
+
+
+
+ |
+
+ ${subGroupStatisticDTO.learners}
+ |
+
+
+
+
+
+
Index: lams_admin/web/WEB-INF/struts/struts-config.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_admin/web/WEB-INF/struts/Attic/struts-config.xml,v
diff -u -r1.25 -r1.26
--- lams_admin/web/WEB-INF/struts/struts-config.xml 1 Jul 2009 02:39:08 -0000 1.25
+++ lams_admin/web/WEB-INF/struts/struts-config.xml 11 Aug 2009 03:24:04 -0000 1.26
@@ -244,6 +244,23 @@
/>
+
+
+
+
+
+
+
+
+
\ No newline at end of file