Index: lams_tool_larsrc/conf/language/ApplicationResources.properties
===================================================================
diff -u -r27653cd039c7a5c282fed7bb692473179a4d89ec -r7086ae4ff560703d2a2859eed9d3b4c25dfdc44e
--- lams_tool_larsrc/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 27653cd039c7a5c282fed7bb692473179a4d89ec)
+++ lams_tool_larsrc/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -34,10 +34,10 @@
#----- S: Resource ----------
label.authoring.basic.resource.list.title=Resource List
-label.authoring.basic.resource.url=URL:
-label.authoring.basic.resource.file=File:
-label.authoring.basic.resource.website=Website:
-label.authoring.basic.resource.learning.object=Learning object:
+label.authoring.basic.resource.url=URL
+label.authoring.basic.resource.file=File
+label.authoring.basic.resource.website=Website
+label.authoring.basic.resource.learning.object=Learning object
label.authoring.basic.resource.verify.url=Verify URL
label.authoring.basic.resource.preview=Preview
@@ -113,18 +113,20 @@
#------------------------------End Learner ----------------------------------#
#---------------------------------Monitoring ----------------------------------#
-page.title.monitoring.content.userlist=Summary
-page.title.monitoring.view.activity=View Activity
-page.title.monitoring.edit.activity=Edit Activity
-page.title.monitoring.view.instructions=View Instructions
-page.title.monitoring.view.topic=View topic
-page.title.monitoring.statistic=Statistic
+monitoring.tab.summary=Summary
+monitoring.tab.statistics=Statistic
-label.monitoring.edit.activity.cancel=Cancel
-label.monitoring.edit.activity.update=Update
-label.monitoring.edit.activity.edit=Edit
+monitoring.label.group=Group
+monitoring.summary.note=Note: number of learners is the number of learners who have viewed the resource.
+monitoring.label.type=Type
+monitoring.label.title=Title
+monitoring.label.suggest=Suggested By
+monitoring.label.number.learners=Number of Learners
+monitoring.label.hide=Hide
+monitoring.label.show=Show
+monitoring.label.user.loginname=Login name
+monitoring.label.user.name=Name
-
message.monitoring.edit.activity.not.editable=This Activity is no longer editable
#------------------------------End Monitoring ----------------------------------#
## errors
Index: lams_tool_larsrc/conf/xdoclet/struts-actions.xml
===================================================================
diff -u -r3511ec138a2605c2406c376e9fa061ed30ddbc3b -r7086ae4ff560703d2a2859eed9d3b4c25dfdc44e
--- lams_tool_larsrc/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 3511ec138a2605c2406c376e9fa061ed30ddbc3b)
+++ lams_tool_larsrc/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -164,4 +164,27 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ResourceConstants.java
===================================================================
diff -u -r1f1955db444fd1c243fe1904ee8cc1b48e30c8ff -r7086ae4ff560703d2a2859eed9d3b4c25dfdc44e
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ResourceConstants.java (.../ResourceConstants.java) (revision 1f1955db444fd1c243fe1904ee8cc1b48e30c8ff)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ResourceConstants.java (.../ResourceConstants.java) (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -62,6 +62,9 @@
public static final String ATTR_RUN_AUTO = "runAuto";
public static final String ATTR_RESOURCE_ITEM_UID = "itemUid";
public static final String ATTR_NEXT_ACTIVITY_URL = "nextActivityUrl";
+ public static final String ATTR_SUMMARY_LIST = "summaryList";
+ public static final String ATTR_USER_LIST = "userList";
+
//error message keys
public static final String ERROR_MSG_TITLE_BLANK = "error.resource.item.title.blank";
public static final String ERROR_MSG_URL_BLANK = "error.resource.item.url.blank";
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceItemVisitDAO.java
===================================================================
diff -u -r1f1955db444fd1c243fe1904ee8cc1b48e30c8ff -r7086ae4ff560703d2a2859eed9d3b4c25dfdc44e
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceItemVisitDAO.java (.../ResourceItemVisitDAO.java) (revision 1f1955db444fd1c243fe1904ee8cc1b48e30c8ff)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceItemVisitDAO.java (.../ResourceItemVisitDAO.java) (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -23,11 +23,35 @@
/* $$Id$$ */
package org.lamsfoundation.lams.tool.rsrc.dao;
+import java.util.List;
+
+import org.lamsfoundation.lams.tool.rsrc.dto.Summary;
import org.lamsfoundation.lams.tool.rsrc.model.ResourceItemVisitLog;
public interface ResourceItemVisitDAO extends DAO {
+
public ResourceItemVisitLog getResourceItemLog(Long itemUid,Long userId);
public int getUserViewLogCount(Long sessionId, Long userUid);
+ /**
+ * Return list which contains following element:
+ *
+ *
session_id
+ * session_name
+ * ResourceItem.uid
+ * ResourceItem.item_type
+ * ResourceItem.create_by_author
+ * ResourceItem.is_hide
+ * ResourceItem.title
+ * User.login_name
+ * count(resource_item_uid)
+ *
+ * @param contentId
+ * @return
+ */
+ public List getSummary(Long contentId);
+
+ public List getResourceItemLogBySession(Long sessionId,Long itemUid);
+
}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceItemVisitDAOHibernate.java
===================================================================
diff -u -r1f1955db444fd1c243fe1904ee8cc1b48e30c8ff -r7086ae4ff560703d2a2859eed9d3b4c25dfdc44e
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceItemVisitDAOHibernate.java (.../ResourceItemVisitDAOHibernate.java) (revision 1f1955db444fd1c243fe1904ee8cc1b48e30c8ff)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceItemVisitDAOHibernate.java (.../ResourceItemVisitDAOHibernate.java) (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -23,17 +23,36 @@
/* $$Id$$ */
package org.lamsfoundation.lams.tool.rsrc.dao.hibernate;
+import java.util.ArrayList;
import java.util.List;
import org.lamsfoundation.lams.tool.rsrc.dao.ResourceItemVisitDAO;
+import org.lamsfoundation.lams.tool.rsrc.dto.Summary;
import org.lamsfoundation.lams.tool.rsrc.model.ResourceItemVisitLog;
public class ResourceItemVisitDAOHibernate extends BaseDAOHibernate implements ResourceItemVisitDAO{
- private static final String FIND_BY_ITEM_AND_USER = "from " + ResourceItemVisitLog.class.getName() + " as r where r.user.userId = ? and r.resourceItem.uid=?";
+ private static final String FIND_BY_ITEM_AND_USER = "from " + ResourceItemVisitLog.class.getName()
+ + " as r where r.user.userId = ? and r.resourceItem.uid=?";
+
+ private static final String FIND_BY_ITEM_BYSESSION = "from " + ResourceItemVisitLog.class.getName()
+ + " as r where r.session_id = ? and r.resourceItem.uid=?";
+
private static final String FIND_VIEW_COUNT_BY_USER = "select count(*) from " + ResourceItemVisitLog.class.getName()
+ " as r where r.sessionId=? and r.user.userId =?";
+ private static final String FIND_SUMMARY = "select v.session_id, s.session_name,i.uid,i.item_type ,i.create_by_author" +
+ ", i.is_hide, i.title, u.login_name, count(v.resource_item_uid) "
+ +" from tl_larsrc11_resource_item_visit_log as v , "
+ +" tl_larsrc11_resource_item as i, "
+ +" tl_larsrc11_user as u, "
+ +" tl_larsrc11_session as s, "
+ +" tl_larsrc11_resource as r "
+ +" where i.uid = v.resource_item_uid and i.create_by = u.uid and v.session_id = s.session_id "
+ +" and s.resource_uid = r.uid "
+ +" and r.content_id =? "
+ +" group by v.session_id, .v.resource_item_uid ";
+
public ResourceItemVisitLog getResourceItemLog(Long itemUid,Long userId){
List list = getHibernateTemplate().find(FIND_BY_ITEM_AND_USER,new Object[]{userId,itemUid});
if(list == null || list.size() ==0)
@@ -48,4 +67,31 @@
return ((Integer) list.get(0)).intValue();
}
+ public List getSummary(Long contentId) {
+
+ List result = getHibernateTemplate().find(FIND_SUMMARY,contentId);
+ List summaryList = new ArrayList(result);
+ int idx=0;
+ for(Object obj : result){
+ List list = (List) obj;
+ Summary sum = new Summary();
+ sum.setSessionId((Long) list.get(idx++));
+ sum.setSessionName((String) list.get(idx++));
+ sum.setItemUid((Long) list.get(idx++));
+ sum.setItemType((Short) list.get(idx++));
+ sum.setItemCreateByAuthor((Boolean) list.get(idx++));
+ sum.setItemHide((Boolean) list.get(idx++));
+ sum.setItemTitle((String) list.get(idx++));
+ sum.setUsername((String) list.get(idx++));
+ sum.setViewNumber((Integer) list.get(idx++));
+ }
+ return summaryList;
+
+ }
+
+ public List getResourceItemLogBySession(Long sessionId, Long itemUid) {
+
+ return getHibernateTemplate().find(FIND_BY_ITEM_BYSESSION,new Object[]{sessionId,itemUid});
+ }
+
}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dto/Summary.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dto/Summary.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dto/Summary.java (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -0,0 +1,112 @@
+/****************************************************************
+ * Copyright (C) 2005 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ****************************************************************
+ */
+
+/* $Id$ */
+package org.lamsfoundation.lams.tool.rsrc.dto;
+/**
+ * List contains following element:
+ *
+ * session_id
+ * session_name
+ * ResourceItem.uid
+ * ResourceItem.item_type
+ * ResourceItem.create_by_author
+ * ResourceItem.is_hide
+ * ResourceItem.title
+ * User.login_name
+ * count(resource_item_uid)
+ * @author Steve.Ni
+ *
+ * @version $Revision$
+ */
+public class Summary {
+
+ private Long sessionId;
+ private String sessionName;
+ private Long itemUid;
+ private short itemType;
+ private boolean itemCreateByAuthor;
+ private boolean itemHide;
+ private String itemTitle;
+ private String username;
+ private int viewNumber;
+
+
+ public boolean isItemCreateByAuthor() {
+ return itemCreateByAuthor;
+ }
+ public void setItemCreateByAuthor(boolean itemCreateByAuthor) {
+ this.itemCreateByAuthor = itemCreateByAuthor;
+ }
+ public boolean isItemHide() {
+ return itemHide;
+ }
+ public void setItemHide(boolean itemHide) {
+ this.itemHide = itemHide;
+ }
+ public String getItemTitle() {
+ return itemTitle;
+ }
+ public void setItemTitle(String itemTitle) {
+ this.itemTitle = itemTitle;
+ }
+ public short getItemType() {
+ return itemType;
+ }
+ public void setItemType(short itemType) {
+ this.itemType = itemType;
+ }
+ public Long getItemUid() {
+ return itemUid;
+ }
+ public void setItemUid(Long itemUid) {
+ this.itemUid = itemUid;
+ }
+ public Long getSessionId() {
+ return sessionId;
+ }
+ public void setSessionId(Long sessionId) {
+ this.sessionId = sessionId;
+ }
+ public String getSessionName() {
+ return sessionName;
+ }
+ public void setSessionName(String sessionName) {
+ this.sessionName = sessionName;
+ }
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ public int getViewNumber() {
+ return viewNumber;
+ }
+ public void setViewNumber(int viewNumber) {
+ this.viewNumber = viewNumber;
+ }
+
+
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/rsrcApplicationContext.xml
===================================================================
diff -u -r0cd3a215c27e8fd64b488f94fe084b665ab15567 -r7086ae4ff560703d2a2859eed9d3b4c25dfdc44e
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/rsrcApplicationContext.xml (.../rsrcApplicationContext.xml) (revision 0cd3a215c27e8fd64b488f94fe084b665ab15567)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/rsrcApplicationContext.xml (.../rsrcApplicationContext.xml) (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -121,6 +121,7 @@
PROPAGATION_REQUIRED,-java.lang.Exception
PROPAGATION_REQUIRED,-java.lang.Exception
PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
PROPAGATION_REQUIRED,-java.lang.Exception
PROPAGATION_REQUIRED,-java.lang.Exception
PROPAGATION_REQUIRED,-java.lang.Exception
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/IResourceService.java
===================================================================
diff -u -r1f1955db444fd1c243fe1904ee8cc1b48e30c8ff -r7086ae4ff560703d2a2859eed9d3b4c25dfdc44e
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/IResourceService.java (.../IResourceService.java) (revision 1f1955db444fd1c243fe1904ee8cc1b48e30c8ff)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/IResourceService.java (.../IResourceService.java) (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -27,6 +27,7 @@
import org.apache.struts.upload.FormFile;
import org.lamsfoundation.lams.contentrepository.IVersionedNode;
+import org.lamsfoundation.lams.tool.rsrc.dto.Summary;
import org.lamsfoundation.lams.tool.rsrc.model.Resource;
import org.lamsfoundation.lams.tool.rsrc.model.ResourceAttachment;
import org.lamsfoundation.lams.tool.rsrc.model.ResourceItem;
@@ -97,5 +98,18 @@
String finishToolSession(Long toolSessionId, Long userId) throws ResourceApplicationException;
ResourceItem getResourceItemByUid(Long itemUid);
+
+ List getSummary(Long contentId);
+
+ List getUserListBySessionItem(Long sessionId, Long itemUid);
+
+ /**
+ * Set a resource item visible or not.
+ * @param itemUid
+ * @param visible true, item is visible. False, item is invisible.
+ */
+ void setItemVisible(Long itemUid, boolean visible);
+
+
}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java
===================================================================
diff -u -r1f1955db444fd1c243fe1904ee8cc1b48e30c8ff -r7086ae4ff560703d2a2859eed9d3b4c25dfdc44e
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java (.../ResourceServiceImpl.java) (revision 1f1955db444fd1c243fe1904ee8cc1b48e30c8ff)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java (.../ResourceServiceImpl.java) (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -63,6 +63,7 @@
import org.lamsfoundation.lams.tool.rsrc.dao.ResourceItemVisitDAO;
import org.lamsfoundation.lams.tool.rsrc.dao.ResourceSessionDAO;
import org.lamsfoundation.lams.tool.rsrc.dao.ResourceUserDAO;
+import org.lamsfoundation.lams.tool.rsrc.dto.Summary;
import org.lamsfoundation.lams.tool.rsrc.ims.IContentPackageConverter;
import org.lamsfoundation.lams.tool.rsrc.ims.IMSManifestException;
import org.lamsfoundation.lams.tool.rsrc.ims.ImscpApplicationException;
@@ -113,7 +114,7 @@
//*******************************************************************************
- // Private method
+ // Service method
//*******************************************************************************
/** Try to get the file. If forceLogin = false and an access denied exception occurs, call this method
* again to get a new ticket and retry file lookup. If forceLogin = true and it then fails
@@ -389,9 +390,26 @@
public ResourceItem getResourceItemByUid(Long itemUid) {
return resourceItemDao.getByUid(itemUid);
}
+ public List getSummary(Long contentId) {
+ return resourceItemVisitDao.getSummary(contentId);
+ }
+ public List getUserListBySessionItem(Long sessionId, Long itemUid) {
+ List logList = resourceItemVisitDao.getResourceItemLogBySession(sessionId,itemUid);
+ List userList = new ArrayList(logList.size());
+ for(ResourceItemVisitLog visit : logList){
+ userList.add(visit.getUser());
+ }
+ return userList;
+ }
+ public void setItemVisible(Long itemUid, boolean visible) {
+ ResourceItem item = resourceItemDao.getByUid(itemUid);
+ item.setHide(!visible);
+ resourceItemDao.saveObject(item);
+ }
+
//*****************************************************************************
// private methods
//*****************************************************************************
@@ -698,4 +716,5 @@
}
+
}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/MonitoringAction.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/MonitoringAction.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/MonitoringAction.java (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -0,0 +1,136 @@
+/****************************************************************
+ * Copyright (C) 2005 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ****************************************************************
+ */
+
+/* $Id$ */
+package org.lamsfoundation.lams.tool.rsrc.web.action;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.ServletException;
+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.tool.ToolAccessMode;
+import org.lamsfoundation.lams.tool.rsrc.ResourceConstants;
+import org.lamsfoundation.lams.tool.rsrc.dto.Summary;
+import org.lamsfoundation.lams.tool.rsrc.service.IResourceService;
+import org.lamsfoundation.lams.util.WebUtil;
+import org.lamsfoundation.lams.web.util.AttributeNames;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+public class MonitoringAction extends Action {
+ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws IOException, ServletException {
+ String param = mapping.getParameter();
+ // -----------------------Resource Author function
+ // ---------------------------
+ request.getSession().setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.TEACHER);
+
+ if (param.equals("summary")) {
+ return summary(mapping, form, request, response);
+ }
+
+ if (param.equals("listuser")) {
+ return listuser(mapping, form, request, response);
+ }
+ if (param.equals("showitem")) {
+ return showitem(mapping, form, request, response);
+ }
+ if (param.equals("hideitem")) {
+ return hideitem(mapping, form, request, response);
+ }
+
+ return mapping.findForward(ResourceConstants.ERROR);
+ }
+
+ private ActionForward hideitem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ Long itemUid = WebUtil.readLongParam(request, ResourceConstants.PARAM_RESOURCE_ITEM_UID);
+ IResourceService service = getResourceService();
+ service.setItemVisible(itemUid,false);
+ return mapping.findForward(ResourceConstants.SUCCESS);
+ }
+
+ private ActionForward showitem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ Long itemUid = WebUtil.readLongParam(request, ResourceConstants.PARAM_RESOURCE_ITEM_UID);
+ IResourceService service = getResourceService();
+ service.setItemVisible(itemUid,true);
+ return mapping.findForward(ResourceConstants.SUCCESS);
+ }
+
+ private ActionForward summary(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ Long contentId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID);
+ IResourceService service = getResourceService();
+ List list = service.getSummary(contentId);
+
+ // grouping the all item according to different group
+ List groupList = new ArrayList();
+ Long sId = new Long(-1);
+ List group = new ArrayList();
+ ;
+ for (Summary sum : list) {
+ if (!sId.equals(sum.getSessionId())) {
+ group = new ArrayList();
+ groupList.add(group);
+ sId = sum.getSessionId();
+ }
+ group.add(sum);
+ }
+
+ //put it into HTTPSession
+ request.getSession().setAttribute(ResourceConstants.ATTR_SUMMARY_LIST, groupList);
+ return mapping.findForward(ResourceConstants.SUCCESS);
+ }
+
+ private ActionForward listuser(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ Long sessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID);
+ Long itemUid = WebUtil.readLongParam(request, ResourceConstants.PARAM_RESOURCE_ITEM_UID);
+
+ //get user list by given item uid
+ IResourceService service = getResourceService();
+ List list = service.getUserListBySessionItem(sessionId, itemUid);
+
+ //set to request
+ request.setAttribute(ResourceConstants.ATTR_USER_LIST, list);
+ return mapping.findForward(ResourceConstants.SUCCESS);
+ }
+
+ // *************************************************************************************
+ // Private method
+ // *************************************************************************************
+ private IResourceService getResourceService() {
+ WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet()
+ .getServletContext());
+ return (IResourceService) wac.getBean(ResourceConstants.RESOURCE_SERVICE);
+ }
+}
Index: lams_tool_larsrc/web/pages/authoring/parts/itemlist.jsp
===================================================================
diff -u -r621b9ac2ae89b213fd59faef1de6a66e6edb1efc -r7086ae4ff560703d2a2859eed9d3b4c25dfdc44e
--- lams_tool_larsrc/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision 621b9ac2ae89b213fd59faef1de6a66e6edb1efc)
+++ lams_tool_larsrc/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -9,7 +9,7 @@
<%-- Resource Type:1=URL,2=File,3=Website,4=Learning Object --%>
-
+ :
|
${resource.title} |
@@ -27,7 +27,7 @@
-
+ :
|
${resource.title} |
@@ -45,7 +45,7 @@
-
+ :
|
${resource.title} |
@@ -63,7 +63,7 @@
-
+ :
|
${resource.title} |
Index: lams_tool_larsrc/web/pages/monitoring/monitoring.jsp
===================================================================
diff -u
--- lams_tool_larsrc/web/pages/monitoring/monitoring.jsp (revision 0)
+++ lams_tool_larsrc/web/pages/monitoring/monitoring.jsp (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -0,0 +1,19 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+ <%@ include file="/common/header.jsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_larsrc/web/pages/monitoring/statistic.jsp
===================================================================
diff -u
--- lams_tool_larsrc/web/pages/monitoring/statistic.jsp (revision 0)
+++ lams_tool_larsrc/web/pages/monitoring/statistic.jsp (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -0,0 +1 @@
+<%@ include file="/common/taglibs.jsp" %>
\ No newline at end of file
Index: lams_tool_larsrc/web/pages/monitoring/summary.jsp
===================================================================
diff -u
--- lams_tool_larsrc/web/pages/monitoring/summary.jsp (revision 0)
+++ lams_tool_larsrc/web/pages/monitoring/summary.jsp (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -0,0 +1,84 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+ <%-- display group name on first row--%>
+
+
+
+
+ ${item.sessionName}
+ |
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ ${item.itemTitle}
+ |
+
+ ${item.username}
+ |
+
+
+
+
+ ${item.viewNumber}
+ |
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+
Index: lams_tool_larsrc/web/pages/monitoring/userlist.jsp
===================================================================
diff -u
--- lams_tool_larsrc/web/pages/monitoring/userlist.jsp (revision 0)
+++ lams_tool_larsrc/web/pages/monitoring/userlist.jsp (revision 7086ae4ff560703d2a2859eed9d3b4c25dfdc44e)
@@ -0,0 +1,33 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+ <%@ include file="/common/header.jsp" %>
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ ${user.loginName}
+ |
+
+ ${user.firstName},${user.secondName}
+ |
+
+
+
+
+ Close
+ |
+
+
+
+ | | | |