Index: lams_tool_forum/conf/xdoclet/struts-actions.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/conf/xdoclet/struts-actions.xml,v diff -u -r1.52 -r1.53 --- lams_tool_forum/conf/xdoclet/struts-actions.xml 17 Jan 2014 21:42:45 -0000 1.52 +++ lams_tool_forum/conf/xdoclet/struts-actions.xml 6 Jan 2015 01:09:43 -0000 1.53 @@ -294,6 +294,11 @@ type="org.lamsfoundation.lams.tool.forum.web.actions.MonitoringAction" scope="request" parameter="releaseMark" > + + - - - getByContentId(Long contentID) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_CONTENT_ID, contentID); + return list; + } + + public void delete(Long sessionId) { + ForumToolSession session = getBySessionId(sessionId); + this.getHibernateTemplate().delete(session); + } + + public void delete(ForumToolSession session) { + this.getHibernateTemplate().delete(session); + } } Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumUser.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumUser.java,v diff -u -r1.12 -r1.13 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumUser.java 24 Oct 2006 00:02:58 -0000 1.12 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumUser.java 6 Jan 2015 01:09:43 -0000 1.13 @@ -21,7 +21,7 @@ * **************************************************************** */ -/* $$Id$$ */ +/* $$Id$$ */ package org.lamsfoundation.lams.tool.forum.persistence; @@ -31,6 +31,7 @@ import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.log4j.Logger; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; + /** * * @hibernate.class table="tl_lafrum11_forum_user" @@ -39,158 +40,161 @@ * @version $Revision$ * @serialData -7043502180037866257L */ -public class ForumUser implements Serializable,Cloneable{ +public class ForumUser implements Serializable, Cloneable { - private static final long serialVersionUID = -7043502180037866257L; - private static Logger log = Logger.getLogger(ForumUser.class); - + private static final long serialVersionUID = -7043502180037866257L; + private static Logger log = Logger.getLogger(ForumUser.class); + private Long uid; - private Long userId; - private String firstName; - private String lastName; - private String loginName; - private boolean sessionFinished; - - private ForumToolSession session; - - public ForumUser(){ - } - - public ForumUser(UserDTO user, ForumToolSession session) { - this.userId = new Long(user.getUserID().intValue()); - this.firstName = user.getFirstName(); - this.lastName = user.getLastName(); - this.loginName = user.getLogin(); - this.session = session; - this.sessionFinished = false; - } - + private Long userId; + private String firstName; + private String lastName; + private String loginName; + private boolean sessionFinished; -// ********************************************************** - // Function method for ForumUser -// ********************************************************** - /* (non-Javadoc) - * @see java.lang.Object#clone() - */ - public Object clone() { - - Object obj = null; - try { - obj = super.clone(); - } catch (CloneNotSupportedException e) { - log.error("When clone " + ForumUser.class + " failed"); - } - return obj; - } + private ForumToolSession session; + public ForumUser() { + } -// ********************************************************** - // Get/Set methods -// ********************************************************** - /** - * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" - * @return Returns the uid. - */ - public Long getUid() { - return uid; - } - /** - * @param uid The uid to set. - */ - public void setUid(Long userID) { - this.uid = userID; - } + public ForumUser(UserDTO user, ForumToolSession session) { + this.userId = new Long(user.getUserID().intValue()); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.loginName = user.getLogin(); + this.session = session; + this.sessionFinished = false; + } - /** - * @hibernate.property column="user_id" length="20" - * @return Returns the userId. - */ - public Long getUserId() { - return userId; - } - /** - * @param userId - * The userId to set. - */ - public void setUserId(Long userID) { - this.userId = userID; - } + // ********************************************************** + // Function method for ForumUser + // ********************************************************** + /* + * (non-Javadoc) + * + * @see java.lang.Object#clone() + */ + public Object clone() { - /** - * @hibernate.property length="255" column="last_name" - * @return - */ - public String getLastName() { - return lastName; + Object obj = null; + try { + obj = super.clone(); + } catch (CloneNotSupportedException e) { + log.error("When clone " + ForumUser.class + " failed"); } - public void setLastName(String lastName) { - this.lastName = lastName; - } - /** - * @hibernate.property length="255" column="first_name" - * @return - */ - public String getFirstName() { - return firstName; - } - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - /** - * @hibernate.many-to-one column="session_id" - * cascade="none" - * @return - */ - public ForumToolSession getSession() { - return session; - } + return obj; + } - public void setSession(ForumToolSession session) { - this.session = session; - } + // ********************************************************** + // Get/Set methods + // ********************************************************** + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * @return Returns the uid. + */ + public Long getUid() { + return uid; + } - /** - * @hibernate.property column="login_name" - * @return - */ - public String getLoginName() { - return loginName; - } + /** + * @param uid + * The uid to set. + */ + public void setUid(Long userID) { + this.uid = userID; + } - public void setLoginName(String loginName) { - this.loginName = loginName; - } - /** - * @hibernate.property column="session_finished" - * @return - */ - public boolean isSessionFinished() { - return sessionFinished; - } + /** + * @hibernate.property column="user_id" length="20" + * @return Returns the userId. + */ + public Long getUserId() { + return userId; + } - public void setSessionFinished(boolean sessionFinished) { - this.sessionFinished = sessionFinished; - } - - public boolean equals(Object obj) { - if (this == obj) - return true; - if (!(obj instanceof ForumUser)) - return false; + /** + * @param userId + * The userId to set. + */ + public void setUserId(Long userID) { + this.userId = userID; + } - final ForumUser user = (ForumUser) obj; - - return new EqualsBuilder().append(this.uid, user.uid).append(this.firstName, user.firstName) - .append(this.lastName,user.lastName).append(this.loginName, user.loginName).isEquals(); - - } + /** + * @hibernate.property length="255" column="last_name" + * @return + */ + public String getLastName() { + return lastName; + } - public int hashCode() { - return new HashCodeBuilder().append(uid).append(firstName) - .append(lastName).append(loginName) - .toHashCode(); - } + public void setLastName(String lastName) { + this.lastName = lastName; + } + /** + * @hibernate.property length="255" column="first_name" + * @return + */ + public String getFirstName() { + return firstName; + } + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * @hibernate.many-to-one column="session_id" cascade="none" + * @return + */ + public ForumToolSession getSession() { + return session; + } + + public void setSession(ForumToolSession session) { + this.session = session; + } + + /** + * @hibernate.property column="login_name" + * @return + */ + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + /** + * @hibernate.property column="session_finished" + * @return + */ + public boolean isSessionFinished() { + return sessionFinished; + } + + public void setSessionFinished(boolean sessionFinished) { + this.sessionFinished = sessionFinished; + } + + public boolean equals(Object obj) { + if (this == obj) + return true; + if (!(obj instanceof ForumUser)) + return false; + + final ForumUser user = (ForumUser) obj; + + return new EqualsBuilder().append(this.uid, user.uid).append(this.firstName, user.firstName) + .append(this.lastName, user.lastName).append(this.loginName, user.loginName).isEquals(); + + } + + public int hashCode() { + return new HashCodeBuilder().append(uid).append(firstName).append(lastName).append(loginName).toHashCode(); + } + } Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumUserDao.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumUserDao.java,v diff -u -r1.8 -r1.9 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumUserDao.java 1 Nov 2006 06:17:53 -0000 1.8 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumUserDao.java 6 Jan 2015 01:09:42 -0000 1.9 @@ -21,60 +21,93 @@ * **************************************************************** */ -/* $$Id$$ */ +/* $$Id$$ */ package org.lamsfoundation.lams.tool.forum.persistence; import java.util.List; +import org.lamsfoundation.lams.tool.forum.util.ForumConstants; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; -public class ForumUserDao extends HibernateDaoSupport{ +public class ForumUserDao extends HibernateDaoSupport { - private static final String SQL_QUERY_FIND_BY_USER_ID_SESSION_ID = "from " + ForumUser.class.getName() + " as f" - + " where user_id=? and f.session.sessionId=?"; - - private static final String SQL_QUERY_FIND_BY_USER_ID = "from " + ForumUser.class.getName() + " as f" - + " where user_id=? and session_id is null"; - - private static final String SQL_QUERY_FIND_BY_SESSION_ID = "from " + - ForumUser.class.getName() + " as f " + - " where f.session.sessionId=?"; + private static final String SQL_QUERY_FIND_BY_USER_ID_SESSION_ID = "from " + ForumUser.class.getName() + " as f" + + " where user_id=? and f.session.sessionId=?"; + private static final String SQL_QUERY_FIND_BY_USER_ID = "from " + ForumUser.class.getName() + " as f" + + " where user_id=? and session_id is null"; - public List getBySessionId(Long sessionID) { - return this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_SESSION_ID, sessionID); - } - - public void save(ForumUser forumUser){ - this.getHibernateTemplate().save(forumUser); - } - public ForumUser getByUserIdAndSessionId(Long userId, Long sessionId) { - List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_USER_ID_SESSION_ID - , new Object[]{userId,sessionId}); - - if(list == null || list.isEmpty()) - return null; - - return (ForumUser) list.get(0); - } + private static final String SQL_QUERY_FIND_BY_SESSION_ID = "from " + ForumUser.class.getName() + " as f " + + " where f.session.sessionId=?"; - public ForumUser getByUserId(Long userId) { - List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_USER_ID, userId); - - if(list == null || list.isEmpty()) - return null; - - return (ForumUser) list.get(0); + private static final String SQL_QUERY_FIND_BY_SESSION_AND_QUESTION_LIMIT = "from user in class ForumUser " + + "where user.session.sessionId=:sessionId order by "; + + private static final String GET_COUNT_RESPONSES_FOR_SESSION_AND_QUESTION = "SELECT COUNT(*) from " + + ForumUser.class.getName() + + " as user where user.session.sessionId=?"; + + public List getBySessionId(Long sessionID) { + return this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_SESSION_ID, sessionID); + } + + public void save(ForumUser forumUser) { + this.getHibernateTemplate().save(forumUser); + } + + public ForumUser getByUserIdAndSessionId(Long userId, Long sessionId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_USER_ID_SESSION_ID, + new Object[] { userId, sessionId }); + + if (list == null || list.isEmpty()) + return null; + + return (ForumUser) list.get(0); + } + + public ForumUser getByUserId(Long userId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_USER_ID, userId); + + if (list == null || list.isEmpty()) + return null; + + return (ForumUser) list.get(0); + } + + public ForumUser getByUid(Long userUid) { + return (ForumUser) this.getHibernateTemplate().get(ForumUser.class, userUid); + } + + public List getUsersForTablesorter(final Long sessionId, int page, int size, int sorting) { + String sortingOrder = ""; + switch (sorting) { + case ForumConstants.SORT_BY_NO: + sortingOrder = "user.lastName"; + break; + case ForumConstants.SORT_BY_USER_NAME_ASC: + sortingOrder = "user.lastName ASC"; + break; + case ForumConstants.SORT_BY_USER_NAME_DESC: + sortingOrder = "user.lastName DESC"; + break; } - public ForumUser getByUid(Long userUid) { - - return (ForumUser) this.getHibernateTemplate().get(ForumUser.class,userUid); - } - public void delete(ForumUser user) { - this.getHibernateTemplate().delete(user); + return getSession().createQuery(SQL_QUERY_FIND_BY_SESSION_AND_QUESTION_LIMIT + sortingOrder) + .setLong("sessionId", sessionId.longValue()).setFirstResult(page * size).setMaxResults(size).list(); + } + + public int getCountUsersBySession(final Long sessionId) { + List list = getHibernateTemplate().find(GET_COUNT_RESPONSES_FOR_SESSION_AND_QUESTION, + new Object[] { sessionId }); + if (list == null || list.size() == 0) { + return 0; } + return ((Number) list.get(0)).intValue(); + } + public void delete(ForumUser user) { + this.getHibernateTemplate().delete(user); + } } Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java,v diff -u -r1.129 -r1.130 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java 17 Dec 2014 00:12:30 -0000 1.129 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java 6 Jan 2015 01:09:42 -0000 1.130 @@ -432,6 +432,16 @@ public ForumUser getUserByUserAndSession(Long userId, Long sessionId) { return forumUserDao.getByUserIdAndSessionId(userId, sessionId); } + + @Override + public List getUsersForTablesorter(final Long sessionId, int page, int size, int sorting) { + return forumUserDao.getUsersForTablesorter(sessionId, page, size, sorting); + } + + @Override + public int getCountUsersBySession(Long sessionId) { + return forumUserDao.getCountUsersBySession(sessionId); + } @Override public void createUser(ForumUser forumUser) { @@ -470,12 +480,12 @@ } @Override - public List getSessionsByContentId(Long contentID) { + public List getSessionsByContentId(Long contentID) { return forumToolSessionDao.getByContentId(contentID); } @Override - public List getUsersBySessionId(Long sessionID) { + public List getUsersBySessionId(Long sessionID) { return forumUserDao.getBySessionId(sessionID); } @@ -1095,6 +1105,7 @@ return content; } + @Override public List getAllTopicsFromSession(Long sessionID) { return MessageDTO.getMessageDTO(messageDao.getBySession(sessionID)); } Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/IForumService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/IForumService.java,v diff -u -r1.53 -r1.54 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/IForumService.java 19 Feb 2014 21:27:43 -0000 1.53 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/IForumService.java 6 Jan 2015 01:09:42 -0000 1.54 @@ -25,7 +25,6 @@ package org.lamsfoundation.lams.tool.forum.service; import java.util.Collection; -import java.util.Date; import java.util.List; import org.apache.struts.upload.FormFile; @@ -36,12 +35,10 @@ import org.lamsfoundation.lams.tool.forum.persistence.Attachment; import org.lamsfoundation.lams.tool.forum.persistence.Forum; import org.lamsfoundation.lams.tool.forum.persistence.ForumCondition; -import org.lamsfoundation.lams.tool.forum.persistence.ForumReport; import org.lamsfoundation.lams.tool.forum.persistence.ForumToolSession; import org.lamsfoundation.lams.tool.forum.persistence.ForumUser; import org.lamsfoundation.lams.tool.forum.persistence.Message; import org.lamsfoundation.lams.tool.forum.persistence.PersistenceException; -import org.lamsfoundation.lams.tool.forum.persistence.Timestamp; import org.lamsfoundation.lams.util.audit.IAuditService; /** @@ -86,6 +83,10 @@ * @throws PersistenceException */ Forum getForumByContentId(Long contentID) throws PersistenceException; + + List getUsersForTablesorter(final Long sessionId, int page, int size, int sorting); + + int getCountUsersBySession(Long sessionId); // ************************************************************************************ // Topic Method @@ -258,7 +259,7 @@ * @param contentID * @return List */ - List getSessionsByContentId(Long contentID); + List getSessionsByContentId(Long contentID); /** * Get all message according to the given session ID. @@ -292,7 +293,7 @@ * @param sessionID * @return */ - List getUsersBySessionId(Long sessionID); + List getUsersBySessionId(Long sessionID); /** * Get user by uid Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java,v diff -u -r1.62 -r1.63 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java 17 Dec 2014 00:12:30 -0000 1.62 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java 6 Jan 2015 01:09:43 -0000 1.63 @@ -33,6 +33,10 @@ public static final String TOOL_SIGNATURE = "lafrum11"; public static final String TOOL_CONTENT_HANDLER_NAME = "forumToolContentHandler"; + + public static final int SORT_BY_NO = 0; + public static final int SORT_BY_USER_NAME_ASC = 1; + public static final int SORT_BY_USER_NAME_DESC = 2; // See LDEV652 // For old style (Fiona's description): The oldest topic is at the top, does not depends the reply date etc. @@ -93,7 +97,7 @@ public static final String DELETED_AUTHORING_TOPICS_LIST = "deletedAuthoringTopicList"; - public static final String USER_UID = "userID"; + public static final String USER_UID = "userUid"; public static final String ATTR_FINISHED_LOCK = "finishedLock"; Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumUserComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumUserComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumUserComparator.java 6 Jan 2015 01:09:43 -0000 1.1 @@ -0,0 +1,40 @@ +/**************************************************************** + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: ForumUserComparator.java,v 1.1 2015/01/06 01:09:43 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.forum.util; + +import java.util.Comparator; + +import org.lamsfoundation.lams.tool.forum.persistence.ForumUser; + +public class ForumUserComparator implements Comparator { + public int compare(ForumUser o1, ForumUser o2) { + if (o1 != null && o2 != null) { + return o1.getLoginName().compareTo(o2.getLoginName()); + } else if (o1 != null) { + return 1; + } else { + return -1; + } + } +} Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/SessionDTOComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/SessionDTOComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/SessionDTOComparator.java 6 Jan 2015 01:09:43 -0000 1.1 @@ -0,0 +1,40 @@ +/**************************************************************** + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: SessionDTOComparator.java,v 1.1 2015/01/06 01:09:43 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.forum.util; + +import java.util.Comparator; + +import org.lamsfoundation.lams.tool.forum.dto.SessionDTO; + +public class SessionDTOComparator implements Comparator { + public int compare(SessionDTO o1, SessionDTO o2) { + if (o1 != null && o2 != null) { + return o1.getSessionName().compareTo(o2.getSessionName()); + } else if (o1 != null) { + return 1; + } else { + return -1; + } + } +} Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/UserDTOComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/Attic/UserDTOComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/UserDTOComparator.java 6 Jan 2015 01:09:43 -0000 1.1 @@ -0,0 +1,40 @@ +/**************************************************************** + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: UserDTOComparator.java,v 1.1 2015/01/06 01:09:43 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.forum.util; + +import java.util.Comparator; + +import org.lamsfoundation.lams.tool.forum.dto.UserDTO; + +public class UserDTOComparator implements Comparator { + public int compare(UserDTO o1, UserDTO o2) { + if (o1 != null && o2 != null) { + return o1.getLoginName().compareTo(o2.getLoginName()); + } else if (o1 != null) { + return 1; + } else { + return -1; + } + } +} Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java,v diff -u -r1.46 -r1.47 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java 6 Jan 2012 16:35:08 -0000 1.46 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java 6 Jan 2015 01:09:43 -0000 1.47 @@ -30,7 +30,6 @@ import java.io.PrintWriter; import java.text.DateFormat; import java.util.ArrayList; -import java.util.Comparator; import java.util.Date; import java.util.HashMap; import java.util.Iterator; @@ -41,10 +40,12 @@ import java.util.TreeMap; import java.util.TreeSet; +import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.apache.poi.hssf.usermodel.HSSFCell; @@ -59,6 +60,9 @@ import org.apache.struts.action.ActionMessages; import org.apache.struts.action.ActionRedirect; import org.apache.struts.config.ForwardConfig; +import org.apache.tomcat.util.json.JSONArray; +import org.apache.tomcat.util.json.JSONException; +import org.apache.tomcat.util.json.JSONObject; import org.lamsfoundation.lams.notebook.model.NotebookEntry; import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.tool.forum.dto.MessageDTO; @@ -71,7 +75,10 @@ import org.lamsfoundation.lams.tool.forum.persistence.Message; import org.lamsfoundation.lams.tool.forum.service.IForumService; import org.lamsfoundation.lams.tool.forum.util.ForumConstants; +import org.lamsfoundation.lams.tool.forum.util.ForumUserComparator; import org.lamsfoundation.lams.tool.forum.util.ForumWebUtils; +import org.lamsfoundation.lams.tool.forum.util.SessionDTOComparator; +import org.lamsfoundation.lams.tool.forum.util.UserDTOComparator; import org.lamsfoundation.lams.tool.forum.web.forms.ForumForm; import org.lamsfoundation.lams.tool.forum.web.forms.MarkForm; import org.lamsfoundation.lams.util.DateUtil; @@ -90,42 +97,6 @@ private IForumService forumService; - private class SessionDTOComparator implements Comparator { - public int compare(SessionDTO o1, SessionDTO o2) { - if (o1 != null && o2 != null) { - return o1.getSessionName().compareTo(o2.getSessionName()); - } else if (o1 != null) { - return 1; - } else { - return -1; - } - } - } - - private class ForumUserComparator implements Comparator { - public int compare(ForumUser o1, ForumUser o2) { - if (o1 != null && o2 != null) { - return o1.getLoginName().compareTo(o2.getLoginName()); - } else if (o1 != null) { - return 1; - } else { - return -1; - } - } - } - - private class UserDTOComparator implements Comparator { - public int compare(UserDTO o1, UserDTO o2) { - if (o1 != null && o2 != null) { - return o1.getLoginName().compareTo(o2.getLoginName()); - } else if (o1 != null) { - return 1; - } else { - return -1; - } - } - } - /** * Action method entry. */ @@ -137,10 +108,14 @@ if (param.equals("init")) { return init(mapping, form, request, response); } - //refresh statistic page by Ajax call. + // refresh statistic page by Ajax call. if (param.equals("statistic")) { return statistic(mapping, form, request, response); } + if (param.equals("getUsers")) { + return getUsers(mapping, form, request, response); + } + // ***************** Marks Functions ******************** if (param.equals("viewAllMarks")) { return viewAllMarks(mapping, form, request, response); @@ -170,10 +145,6 @@ return viewTopicTree(mapping, form, request, response); } - if (param.equals("viewReflection")) { - return viewReflection(mapping, form, request, response); - } - // **************** Date restriction ***************** if (param.equals("setSubmissionDeadline")) { return setSubmissionDeadline(mapping, form, request, response); @@ -188,7 +159,7 @@ private ActionForward init(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - //set back tool content ID + // set back tool content ID String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); request.setAttribute(AttributeNames.PARAM_CONTENT_FOLDER_ID, contentFolderID); @@ -201,14 +172,13 @@ summary(request); viewInstructions(request); viewActivity(request); - statistic(request); + // statistic(request); return mapping.findForward("load"); } /** - * The initial method for monitoring. List all users according to given - * Content ID. + * The initial method for monitoring. List all users according to given Content ID. * * @param mapping * @param form @@ -217,80 +187,113 @@ * @return */ private void summary(HttpServletRequest request) { - Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); - + Long toolContentId = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); forumService = getForumService(); - - // get session from shared session. - HttpSession ss = SessionManager.getSession(); - - List sessionsList = forumService.getSessionsByContentId(toolContentID); - // A forum clone required for listing the advanced options LDEV-1662 - Forum forumClone = null; + Forum forum = forumService.getForumByContentId(toolContentId); + request.setAttribute("forum", forum); + boolean hasReflection = forum.isReflectOnActivity(); + + List sessions = forumService.getSessionsByContentId(toolContentId); + + Set sessionDtos = new TreeSet( + new SessionDTOComparator()); + // build a map with all users in the forumSessionList + for (ForumToolSession session : sessions) { + SessionDTO sessionDto = new SessionDTO(); + + sessionDto.setSessionID(session.getSessionId()); + sessionDto.setSessionName(session.getSessionName()); + + sessionDtos.add(sessionDto); + } + request.setAttribute("sessionDtos", sessionDtos); + // check if there is submission deadline - Date submissionDeadline = forumService.getForumByContentId(toolContentID).getSubmissionDeadline(); - + Date submissionDeadline = forum.getSubmissionDeadline(); if (submissionDeadline != null) { - org.lamsfoundation.lams.usermanagement.dto.UserDTO learnerDto = (org.lamsfoundation.lams.usermanagement.dto.UserDTO) ss.getAttribute(AttributeNames.USER); - TimeZone learnerTimeZone = learnerDto.getTimeZone(); - Date tzSubmissionDeadline = DateUtil.convertToTimeZoneFromDefault(learnerTimeZone, submissionDeadline); - request.setAttribute(ForumConstants.ATTR_SUBMISSION_DEADLINE, tzSubmissionDeadline.getTime()); + HttpSession ss = SessionManager.getSession(); + org.lamsfoundation.lams.usermanagement.dto.UserDTO learnerDto = (org.lamsfoundation.lams.usermanagement.dto.UserDTO) ss + .getAttribute(AttributeNames.USER); + TimeZone learnerTimeZone = learnerDto.getTimeZone(); + Date tzSubmissionDeadline = DateUtil.convertToTimeZoneFromDefault(learnerTimeZone, submissionDeadline); + request.setAttribute(ForumConstants.ATTR_SUBMISSION_DEADLINE, tzSubmissionDeadline.getTime()); } - - - Map sessionUsersMap = new TreeMap(this.new SessionDTOComparator()); - // build a map with all users in the forumSessionList - Iterator it = sessionsList.iterator(); - while (it.hasNext()) { - SessionDTO sessionDto = new SessionDTO(); - ForumToolSession fts = (ForumToolSession) it.next(); - boolean hasReflection = fts.getForum().isReflectOnActivity(); - if (forumClone == null) { - forumClone = (Forum) fts.getForum().clone(); - request.setAttribute("forum", forumClone); - } + boolean isGroupedActivity = forumService.isGroupedActivity(toolContentId); + request.setAttribute("isGroupedActivity", isGroupedActivity); + } - sessionDto.setSessionID(fts.getSessionId()); - sessionDto.setSessionName(fts.getSessionName()); - List userList = forumService.getUsersBySessionId(fts.getSessionId()); + /** + * Refreshes user list. + */ + public ActionForward getUsers(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse res) throws IOException, ServletException, JSONException { + forumService = getForumService(); - //sort and create DTO list - List topicList = forumService.getAllTopicsFromSession(fts.getSessionId()); - Map topicsByUser = getTopicsSortedByAuthor(topicList); + Long sessionId = WebUtil.readLongParam(request, "sessionId"); + Boolean isReflectOnActivity = WebUtil.readBooleanParam(request, "isReflectOnActivity"); - Set dtoList = new TreeSet(this.new UserDTOComparator()); - Iterator iter = userList.iterator(); - while (iter.hasNext()) { - ForumUser user = (ForumUser) iter.next(); - UserDTO userDTO = new UserDTO(user); - userDTO.setHasRefection(hasReflection); + // paging parameters of tablesorter + int size = WebUtil.readIntParam(request, "size"); + int page = WebUtil.readIntParam(request, "page"); + Integer isSort1 = WebUtil.readIntParam(request, "column[0]", true); + Integer isSort2 = WebUtil.readIntParam(request, "column[1]", true); - userDTO.setAnyPostsMarked(false); - userDTO.setNoOfPosts(0); + int sorting = ForumConstants.SORT_BY_NO; + if (isSort1 != null && isSort1.equals(0)) { + sorting = ForumConstants.SORT_BY_USER_NAME_ASC; + } else if (isSort1 != null && isSort1.equals(1)) { + sorting = ForumConstants.SORT_BY_USER_NAME_DESC; + } - List messages = (List) topicsByUser.get(user); - if (messages != null && messages.size() > 0) { - userDTO.setNoOfPosts(messages.size()); - for (MessageDTO message : messages) { - if (message.getMark() != null) { - userDTO.setAnyPostsMarked(true); - break; - } + List users = forumService.getUsersForTablesorter(sessionId, page, size, sorting); + + // sort and create DTO list + List topics = forumService.getAllTopicsFromSession(sessionId); + Map> topicsByUser = getTopicsSortedByAuthor(topics); + + JSONArray rows = new JSONArray(); + + JSONObject responcedata = new JSONObject(); + responcedata.put("total_rows", forumService.getCountUsersBySession(sessionId)); + + for (ForumUser user : users) { + + JSONObject responseRow = new JSONObject(); + responseRow.put(ForumConstants.ATTR_USER_UID, user.getUid()); + responseRow.put("userName", StringEscapeUtils.escapeCsv(user.getFirstName() + " " + user.getLastName())); + + int numberOfPosts = 0; + boolean isAnyPostsMarked = false; + List messages = topicsByUser.get(user); + if (messages != null && messages.size() > 0) { + numberOfPosts = messages.size(); + for (MessageDTO message : messages) { + if (message.getMark() != null) { + isAnyPostsMarked = true; + break; } } - dtoList.add(userDTO); } + responseRow.put("anyPostsMarked", isAnyPostsMarked); + responseRow.put("numberOfPosts", numberOfPosts); - sessionUsersMap.put(sessionDto, dtoList); - } + if (isReflectOnActivity) { + NotebookEntry notebookEntry = forumService.getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + ForumConstants.TOOL_SIGNATURE, user.getUserId().intValue()); - boolean isGroupedActivity = forumService.isGroupedActivity(toolContentID); - request.setAttribute("isGroupedActivity", isGroupedActivity); - // request.setAttribute(AttributeNames.PARAM_TOOL_SESSION_ID,sessionID); - request.setAttribute("sessionUserMap", sessionUsersMap); + String reflection = (notebookEntry == null) ? null : notebookEntry.getEntry(); + responseRow.put("notebookEntry", reflection); + } + + rows.put(responseRow); + } + responcedata.put("rows", rows); + res.setContentType("application/json;charset=utf-8"); + res.getWriter().print(new String(responcedata.toString())); + return null; } /** @@ -370,7 +373,7 @@ cell.setCellValue(DateFormat.getInstance().format(dto.getMessage().getCreated())); cell = row.createCell(idx++); - + if (dto.getMessage() != null && dto.getMessage().getReport() != null && dto.getMessage().getReport().getMark() != null) { cell.setCellValue(NumberUtil.formatLocalisedNumber(dto.getMessage().getReport().getMark(), @@ -420,7 +423,7 @@ */ private void viewActivity(HttpServletRequest request) { Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); - + forumService = getForumService(); Forum forum = forumService.getForumByContentId(toolContentID); String title = forum.getTitle(); @@ -462,7 +465,7 @@ statistic(request); return mapping.findForward("success"); } - + /** * Performs all necessary actions for showing statistic page. * @@ -472,7 +475,7 @@ Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); forumService = getForumService(); - Map sessionTopicsMap = new TreeMap>(this.new SessionDTOComparator()); + Map sessionTopicsMap = new TreeMap>(new SessionDTOComparator()); Map sessionAvaMarkMap = new HashMap(); Map sessionTotalMsgMap = new HashMap(); @@ -542,32 +545,6 @@ return mapping.findForward("success"); } - private ActionForward viewReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { - - Long uid = WebUtil.readLongParam(request, ForumConstants.ATTR_USER_UID); - Long sessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); - - ForumUser user = forumService.getUser(uid); - NotebookEntry notebookEntry = forumService.getEntry(sessionID, CoreNotebookConstants.NOTEBOOK_TOOL, - ForumConstants.TOOL_SIGNATURE, user.getUserId().intValue()); - - ForumToolSession session = forumService.getSessionBySessionId(sessionID); - - UserDTO userDTO = new UserDTO(user); - if (notebookEntry == null) { - userDTO.setFinishReflection(false); - userDTO.setReflect(null); - } else { - userDTO.setFinishReflection(true); - userDTO.setReflect(notebookEntry.getEntry()); - } - userDTO.setReflectInstrctions(session.getForum().getReflectInstructions()); - - request.setAttribute("userDTO", userDTO); - return mapping.findForward("success"); - } - /** * View topic subject, content and attachement. * @@ -591,7 +568,7 @@ private ActionForward releaseMark(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - //get service then update report table + // get service then update report table forumService = getForumService(); Long sessionID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID)); forumService.releaseMarksForSession(sessionID); @@ -627,22 +604,22 @@ */ private ActionForward viewAllMarks(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - //only one param for session scope marks + // only one param for session scope marks Long sessionID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID)); - //create sessionMap + // create sessionMap SessionMap sessionMap = new SessionMap(); request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); sessionMap.put(AttributeNames.PARAM_TOOL_SESSION_ID, sessionID); sessionMap.put(ForumConstants.PARAM_UPDATE_MODE, ForumConstants.MARK_UPDATE_FROM_SESSION); request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID()); - //get tool session scope topics + // get tool session scope topics forumService = getForumService(); List topicList = forumService.getAllTopicsFromSession(sessionID); - Map topicsByUser = getTopicsSortedByAuthor(topicList); + Map> topicsByUser = getTopicsSortedByAuthor(topicList); request.setAttribute(ForumConstants.ATTR_REPORT, topicsByUser); return mapping.findForward("success"); } @@ -661,21 +638,21 @@ Long userUid = new Long(WebUtil.readLongParam(request, ForumConstants.USER_UID)); Long sessionId = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID)); - //create sessionMap + // create sessionMap SessionMap sessionMap = new SessionMap(); request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); sessionMap.put(AttributeNames.PARAM_TOOL_SESSION_ID, sessionId); sessionMap.put(ForumConstants.PARAM_UPDATE_MODE, ForumConstants.MARK_UPDATE_FROM_USER); request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID()); - //get this user's all topics + // get this user's all topics forumService = getForumService(); List messageList = forumService.getMessagesByUserUid(userUid, sessionId); ForumUser user = forumService.getUser(userUid); // each back to web page - Map> report = new TreeMap(this.new ForumUserComparator()); + Map> report = new TreeMap(new ForumUserComparator()); report.put(user, messageList); request.setAttribute(ForumConstants.ATTR_REPORT, report); @@ -696,7 +673,7 @@ MarkForm markForm = (MarkForm) form; SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(markForm.getSessionMapID()); String updateMode = (String) sessionMap.get(ForumConstants.PARAM_UPDATE_MODE); - //view forum mode + // view forum mode if (StringUtils.isBlank(updateMode)) { sessionMap.put(ForumConstants.PARAM_UPDATE_MODE, ForumConstants.MARK_UPDATE_FROM_FORUM); sessionMap.put(ForumConstants.ATTR_ROOT_TOPIC_UID, markForm.getTopicID()); @@ -724,7 +701,7 @@ // Should we show the reflection or not? We shouldn't show it when the View Forum screen is accessed // from the Monitoring Summary screen, but we should when accessed from the Learner Progress screen. // Need to constantly past this value on, rather than hiding just the once, as the View Forum - // screen has a refresh button. Need to pass it through the view topic screen and dependent screens + // screen has a refresh button. Need to pass it through the view topic screen and dependent screens // as it has a link from the view topic screen back to View Forum screen. boolean hideReflection = WebUtil.readBooleanParam(request, ForumConstants.ATTR_HIDE_REFLECTION, false); sessionMap.put(ForumConstants.ATTR_HIDE_REFLECTION, hideReflection); @@ -774,7 +751,7 @@ return mapping.getInputForward(); } - //update message report + // update message report forumService = getForumService(); ForumReport report = msg.getReport(); @@ -791,26 +768,27 @@ report.setComment(markForm.getComment()); forumService.updateContainedReport(msg); - //echo back to topic list page: it depends which screen is come from: view special user mark, or view all user marks. + // echo back to topic list page: it depends which screen is come from: view special user mark, or view all user + // marks. if (StringUtils.equals(updateMode, ForumConstants.MARK_UPDATE_FROM_SESSION)) { List topicList = forumService.getAllTopicsFromSession(sessionId); - Map topicsByUser = getTopicsSortedByAuthor(topicList); + Map> topicsByUser = getTopicsSortedByAuthor(topicList); request.setAttribute(ForumConstants.ATTR_REPORT, topicsByUser); - //listMark or listAllMark. + // listMark or listAllMark. return mapping.findForward("success"); - + } else if (StringUtils.equals(updateMode, ForumConstants.MARK_UPDATE_FROM_USER)) { List messageList = forumService.getMessagesByUserUid(user.getUid(), sessionId); - Map> topicMap = new TreeMap(this.new ForumUserComparator()); + Map> topicMap = new TreeMap(new ForumUserComparator()); topicMap.put(user, messageList); request.setAttribute(ForumConstants.ATTR_REPORT, topicMap); - //listMark or listAllMark. + // listMark or listAllMark. return mapping.findForward("success"); - - } else { //mark from view forum - //display root topic rather than leaf one + + } else { // mark from view forum + // display root topic rather than leaf one Long rootTopicId = forumService.getRootTopicId(msg.getUid()); - + ForwardConfig redirectConfig = mapping.findForwardConfig("viewTopic"); ActionRedirect redirect = new ActionRedirect(redirectConfig); redirect.addParameter(ForumConstants.ATTR_SESSION_MAP_ID, markForm.getSessionMapID()); @@ -820,7 +798,7 @@ } } - + /** * Set Submission Deadline * @@ -833,16 +811,17 @@ public ActionForward setSubmissionDeadline(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { forumService = getForumService(); - + Long contentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); Forum forum = forumService.getForumByContentId(contentID); - + Long dateParameter = WebUtil.readLongParam(request, ForumConstants.ATTR_SUBMISSION_DEADLINE, true); Date tzSubmissionDeadline = null; if (dateParameter != null) { Date submissionDeadline = new Date(dateParameter); HttpSession ss = SessionManager.getSession(); - org.lamsfoundation.lams.usermanagement.dto.UserDTO teacher = (org.lamsfoundation.lams.usermanagement.dto.UserDTO) ss.getAttribute(AttributeNames.USER); + org.lamsfoundation.lams.usermanagement.dto.UserDTO teacher = (org.lamsfoundation.lams.usermanagement.dto.UserDTO) ss + .getAttribute(AttributeNames.USER); TimeZone teacherTimeZone = teacher.getTimeZone(); tzSubmissionDeadline = DateUtil.convertFromTimeZoneToDefault(teacherTimeZone, submissionDeadline); } @@ -851,9 +830,7 @@ return null; } - - // ========================================================================================== // Utility methods // ========================================================================================== @@ -873,26 +850,25 @@ } /** - * @param topicList + * @param topics * @return */ - private Map getTopicsSortedByAuthor(List topicList) { - Map> topicsByUser = new TreeMap(this.new ForumUserComparator()); - Iterator iter = topicList.iterator(); - forumService = getForumService(); - while (iter.hasNext()) { - MessageDTO dto = (MessageDTO) iter.next(); - if (dto.getMessage().getIsAuthored()) { + private Map> getTopicsSortedByAuthor(List topics) { + Map> topicsByUser = new TreeMap>( + new ForumUserComparator()); + for (MessageDTO topic : topics) { + if (topic.getMessage().getIsAuthored()) { continue; } - dto.getMessage().getReport(); - ForumUser user = (ForumUser) dto.getMessage().getCreatedBy().clone(); - List list = topicsByUser.get(user); - if (list == null) { - list = new ArrayList(); - topicsByUser.put(user, list); + topic.getMessage().getReport(); + ForumUser user = (ForumUser) topic.getMessage().getCreatedBy().clone(); + + List topicsByUserExist = topicsByUser.get(user); + if (topicsByUserExist == null) { + topicsByUserExist = new ArrayList(); + topicsByUser.put(user, topicsByUserExist); } - list.add(dto); + topicsByUserExist.add(topic); } return topicsByUser; } Index: lams_tool_forum/web/WEB-INF/tiles-defs.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/tiles-defs.xml,v diff -u -r1.4 -r1.5 --- lams_tool_forum/web/WEB-INF/tiles-defs.xml 17 Jan 2014 21:42:45 -0000 1.4 +++ lams_tool_forum/web/WEB-INF/tiles-defs.xml 6 Jan 2015 01:09:43 -0000 1.5 @@ -102,41 +102,37 @@ - + - + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - - - Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_forum/web/jsps/monitoring/daterestriction.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_forum/web/jsps/monitoring/header.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/monitoring/header.jsp,v diff -u -r1.8 -r1.9 --- lams_tool_forum/web/jsps/monitoring/header.jsp 17 Jan 2014 21:42:44 -0000 1.8 +++ lams_tool_forum/web/jsps/monitoring/header.jsp 6 Jan 2015 01:09:42 -0000 1.9 @@ -23,8 +23,9 @@ selectTab(tabId); //for statistic page change: - if(tabId == 3) - doStatistic(); + if(tabId == 3) { + doStatistic(); + } } function doStatistic(){ Index: lams_tool_forum/web/jsps/monitoring/monitoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/monitoring/monitoring.jsp,v diff -u -r1.6 -r1.7 --- lams_tool_forum/web/jsps/monitoring/monitoring.jsp 17 Jan 2014 21:42:44 -0000 1.6 +++ lams_tool_forum/web/jsps/monitoring/monitoring.jsp 6 Jan 2015 01:09:42 -0000 1.7 @@ -1,5 +1,8 @@ <%@ include file="/common/taglibs.jsp"%> <%@ page import="org.lamsfoundation.lams.tool.forum.util.ForumConstants"%> + + +
- - - + + +

+ +

+
+ +

- : + :

- - - - - - - - - - - - + +
- - - - - -
+ - - - + + + + + - - - - - - - -
- - - - - - - - - + + + Number of posts + + + + + - - - - - - - - - - - - - - - -
- -
- - - - - + + + +
-
- - - - - - - - -
- -
- - - -
-
- - - - - - -
-
- - - - - - - -
-
+ + +
+
+ + + + + + +
+
+ +
+
+ + + + + + + + +
+
+ + + +
+
+ + + + + + +
+
+ + + + + + + +
+
- -

- -

-
+<%@include file="parts/advanceOptions.jsp"%> -

- - - - - -

-
- - - -<%@include file="daterestriction.jsp"%> +<%@include file="parts/daterestriction.jsp"%> Index: lams_tool_forum/web/jsps/monitoring/parts/advanceOptions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/monitoring/parts/advanceOptions.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_forum/web/jsps/monitoring/parts/advanceOptions.jsp 6 Jan 2015 01:09:43 -0000 1.1 @@ -0,0 +1,295 @@ +

+ + + + + +

+ + \ No newline at end of file Index: lams_tool_forum/web/jsps/monitoring/parts/daterestriction.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/monitoring/parts/daterestriction.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_forum/web/jsps/monitoring/parts/daterestriction.jsp 6 Jan 2015 01:09:43 -0000 1.1 @@ -0,0 +1,42 @@ +<%@include file="/common/taglibs.jsp"%> + +

+ + + + + +

+ + \ No newline at end of file