Index: lams_tool_forum/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/build.properties,v diff -u -r1.24 -r1.25 --- lams_tool_forum/build.properties 9 Dec 2008 05:40:32 -0000 1.24 +++ lams_tool_forum/build.properties 23 Mar 2010 15:30:02 -0000 1.25 @@ -9,7 +9,7 @@ ### project properties ### signature=lafrum11 project.displayname = lams forum tool -tool.version=20081118 +tool.version=20100303 # hide tool option hideTool=false Index: lams_tool_forum/conf/hibernate/mappings/org/lamsfoundation/lams/tool/forum/persistence/Message.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/conf/hibernate/mappings/org/lamsfoundation/lams/tool/forum/persistence/Attic/Message.hbm.xml,v diff -u -r1.15 -r1.16 --- lams_tool_forum/conf/hibernate/mappings/org/lamsfoundation/lams/tool/forum/persistence/Message.hbm.xml 20 Feb 2008 04:07:34 -0000 1.15 +++ lams_tool_forum/conf/hibernate/mappings/org/lamsfoundation/lams/tool/forum/persistence/Message.hbm.xml 23 Mar 2010 15:30:01 -0000 1.16 @@ -86,6 +86,14 @@ /> + + - - - - + + + + + + + + This method DOES NOT deep clone Forum to avoid dead loop in clone. - */ - public Object clone(){ - - Message msg = null; - try{ - msg = (Message) super.clone(); - msg.setUid(null); + private Date created; + private Date updated; + private Date lastReplyDate; + private int replyNumber; + private boolean hideFlag; + + private Message parent; + private ForumToolSession toolSession; + private Forum forum; + private ForumUser createdBy; + private ForumUser modifiedBy; + private Set attachments; + private ForumReport report; + private Set sessionClones; + + private ForumToolContentHandler toolContentHandler; + + public Message() { + attachments = new TreeSet(); + sessionClones = new HashSet(); + } + + // ********************************************************** + // Function method for Message + // ********************************************************** + public static Message newInstance(Message fromMsg, ForumToolContentHandler toolContentHandler) { + Message toMsg = new Message(); + fromMsg.toolContentHandler = toolContentHandler; + toMsg = (Message) fromMsg.clone(); + return toMsg; + } + + /** + * This method DOES NOT deep clone Forum to avoid dead loop in clone. + */ + public Object clone() { + + Message msg = null; + try { + msg = (Message) super.clone(); + msg.setUid(null); //it is not necessary to deep clone following comment fields. //don't deep clone forum to avoid dead loop in clone // if(parent != null){ @@ -106,302 +109,315 @@ // } // if(modifiedBy != null) // msg.modifiedBy = (ForumUser) modifiedBy.clone(); - //clone attachment - if(attachments != null){ - Iterator iter = attachments.iterator(); - Set set = new TreeSet(); - while(iter.hasNext()){ - Attachment file = (Attachment)iter.next(); - Attachment newFile = (Attachment) file.clone(); - // use common file node in repository - set.add(newFile); - } - msg.attachments = set; - } - // do not clone the tool session data as cloning should be creating a "fresh" copy - msg.sessionClones = new HashSet(); - } catch (CloneNotSupportedException e) { - log.error("When clone " + Forum.class + " failed"); + // clone attachment + if (attachments != null) { + Iterator iter = attachments.iterator(); + Set set = new TreeSet(); + while (iter.hasNext()) { + Attachment file = (Attachment) iter.next(); + Attachment newFile = (Attachment) file.clone(); + // use common file node in repository + set.add(newFile); } - - return msg; - } + msg.attachments = set; + } + // do not clone the tool session data as cloning should be creating a "fresh" copy + msg.sessionClones = new HashSet(); + } catch (CloneNotSupportedException e) { + log.error("When clone " + Forum.class + " failed"); + } + + return msg; + } - public Object updateClone(Message clone){ - - clone.setBody(this.getBody()); - clone.setForum(this.getForum()); - clone.setHideFlag(this.isHideFlag()); - clone.setIsAnonymous(this.isAnonymous); - clone.setIsAuthored(this.getIsAuthored()); - clone.setLastReplyDate(this.getLastReplyDate()); - clone.setModifiedBy(clone.getModifiedBy()); - clone.setReplyNumber(this.getReplyNumber()); - clone.setReport(this.getReport()); - clone.setSubject(this.getSubject()); - clone.setToolContentHandler(this.getToolContentHandler()); - clone.setUpdated(clone.getUpdated()); - - // Update the attachments. Easiest way is to recopy them - which does NOT copy them in the content repository. - clone.getAttachments().clear(); - if(attachments != null){ - Iterator iter = attachments.iterator(); - while(iter.hasNext()){ - Attachment file = (Attachment)iter.next(); - Attachment newFile = (Attachment) file.clone(); - clone.getAttachments().add(newFile); - } - } - - return clone; - } + public Object updateClone(Message clone) { - /** - * Updates the modification data for this entity. - */ - public void updateModificationData() { - long now = System.currentTimeMillis(); - if (created == null) { - this.setCreated(new Date(now)); - } - this.setUpdated(new Date(now)); + clone.setBody(this.getBody()); + clone.setForum(this.getForum()); + clone.setSequenceId(this.getSequenceId()); + clone.setHideFlag(this.isHideFlag()); + clone.setIsAnonymous(this.isAnonymous); + clone.setIsAuthored(this.getIsAuthored()); + clone.setLastReplyDate(this.getLastReplyDate()); + clone.setModifiedBy(clone.getModifiedBy()); + clone.setReplyNumber(this.getReplyNumber()); + clone.setReport(this.getReport()); + clone.setSubject(this.getSubject()); + clone.setToolContentHandler(this.getToolContentHandler()); + clone.setUpdated(clone.getUpdated()); + + // Update the attachments. Easiest way is to recopy them - which does NOT copy them in the content repository. + clone.getAttachments().clear(); + if (attachments != null) { + Iterator iter = attachments.iterator(); + while (iter.hasNext()) { + Attachment file = (Attachment) iter.next(); + Attachment newFile = (Attachment) file.clone(); + clone.getAttachments().add(newFile); + } } - - public boolean equals(Object o) { - if (this == o) - return true; - if (!(o instanceof Message)) - return false; - - Message genericEntity = (Message) o; - // uses same attributes to determine equality as - // ConditionTopicComparator.compare() - return new EqualsBuilder() - //.append(this.uid,genericEntity.getUid()) - .append(this.subject,genericEntity.getSubject()) - .append(this.body,genericEntity.getBody()) - .append(this.replyNumber,genericEntity.getReplyNumber()) - //.append(this.lastReplyDate,genericEntity.lastReplyDate) - //.append(this.created,genericEntity.created) - //.append(this.updated,genericEntity.updated) - .append(this.createdBy,genericEntity.getCreatedBy()) - .append(this.modifiedBy,genericEntity.getModifiedBy()) - .isEquals(); - } + return clone; + } - public int hashCode() { - return new HashCodeBuilder().append(uid) - .append(subject).append(body) - .append(created) - .append(updated).append(createdBy) - .append(modifiedBy) - .toHashCode(); + /** + * Updates the modification data for this entity. + */ + public void updateModificationData() { + long now = System.currentTimeMillis(); + if (created == null) { + this.setCreated(new Date(now)); } + this.setUpdated(new Date(now)); + } -// ********************************************************** - // get/set methods -// ********************************************************** - /** - * Returns the object's creation date - * - * @return date - * @hibernate.property column="create_date" - */ - public Date getCreated() { - return created; - } + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof Message)) + return false; - /** - * Sets the object's creation date - * - * @param created - */ - public void setCreated(Date created) { - this.created = created; - } - /** - * Returns this topic last reply date - * - * @return date - * @hibernate.property column="last_reply_date" - */ - public Date getLastReplyDate() { - return lastReplyDate; - } + Message genericEntity = (Message) o; - public void setLastReplyDate(Date lastPostDate) { - this.lastReplyDate = lastPostDate; - } - /** - * Returns the object's date of last update - * - * @return date updated - * @hibernate.property column="update_date" - */ - public Date getUpdated() { - return updated; - } + // uses same attributes to determine equality as + // ConditionTopicComparator.compare() + return new EqualsBuilder() + // .append(this.uid,genericEntity.getUid()) + .append(this.subject, genericEntity.getSubject()) + .append(this.body,genericEntity.getBody()) + .append(this.replyNumber,genericEntity.getReplyNumber()) + //.append(this.lastReplyDate,genericEntity.lastReplyDate) + //.append(this.created,genericEntity.created) + //.append(this.updated,genericEntity.updated) + .append(this.createdBy,genericEntity.getCreatedBy()) + .append(this.modifiedBy,genericEntity.getModifiedBy()) + .isEquals(); + } - /** - * Sets the object's date of last update - * - * @param updated - */ - public void setUpdated(Date updated) { - this.updated = updated; - } + public int hashCode() { + return new HashCodeBuilder().append(uid).append(subject).append(body).append(created).append(updated).append( + createdBy).append(modifiedBy).toHashCode(); + } + // ********************************************************** + // get/set methods + // ********************************************************** /** + * Returns the object's creation date + * + * @return date + * @hibernate.property column="create_date" + */ + public Date getCreated() { + return created; + } + + /** + * Sets the object's creation date + * + * @param created + */ + public void setCreated(Date created) { + this.created = created; + } + + /** + * Returns this topic last reply date + * + * @return date + * @hibernate.property column="last_reply_date" + */ + public Date getLastReplyDate() { + return lastReplyDate; + } + + public void setLastReplyDate(Date lastPostDate) { + this.lastReplyDate = lastPostDate; + } + + /** + * Returns the object's date of last update + * + * @return date updated + * @hibernate.property column="update_date" + */ + public Date getUpdated() { + return updated; + } + + /** + * Sets the object's date of last update + * + * @param updated + */ + public void setUpdated(Date updated) { + this.updated = updated; + } + + /** * @return Returns the userid of the user who created the Forum. - * - * @hibernate.many-to-one - * column="create_by" - * cascade="none" - * + * + * @hibernate.many-to-one column="create_by" cascade="none" + * */ public ForumUser getCreatedBy() { - return createdBy; + return createdBy; } /** - * @param createdBy The userid of the user who created this Forum. + * @param createdBy + * The userid of the user who created this Forum. */ public void setCreatedBy(ForumUser createdBy) { - this.createdBy = createdBy; + this.createdBy = createdBy; } - /** - * @hibernate.many-to-one - * column="modified_by" - * cascade="none" + * @hibernate.many-to-one column="modified_by" cascade="none" * * @return Returns the userid of the user who modified the posting. */ public ForumUser getModifiedBy() { - return modifiedBy; + return modifiedBy; } /** - * @param modifiedBy The userid of the user who modified the posting. + * @param modifiedBy + * The userid of the user who modified the posting. */ public void setModifiedBy(ForumUser modifiedBy) { - this.modifiedBy = modifiedBy; + this.modifiedBy = modifiedBy; } /** * @hibernate.id column="uid" generator-class="native" */ - public Long getUid() { - return uid; - } + public Long getUid() { + return uid; + } - public void setUid(Long uuid) { - this.uid = uuid; - } + public void setUid(Long uuid) { + this.uid = uuid; + } /** * @return Returns the subject of the Message. - * - * @hibernate.property - * column="subject" - * + * + * @hibernate.property column="subject" + * */ public String getSubject() { - return subject; + return subject; } /** - * @param subject The subject of the Message to be set. + * @param subject + * The subject of the Message to be set. */ public void setSubject(String subject) { - this.subject = subject; + this.subject = subject; } - /** - * @return Returns the body of the Message. - * - * @hibernate.property - * column="body" - * type="text" - * - */ - public String getBody() { - return body; - } - - /** - * @param body The body of the Message to set. - */ - public void setBody(String body) { - this.body = body; - } + /** + * @return Returns the body of the Message. + * + * @hibernate.property column="body" type="text" + * + */ + public String getBody() { + return body; + } - /** - * @return Returns true if the Message was an Authored Message. - * - * @hibernate.property - * column="is_authored" - * - */ - public boolean getIsAuthored() { - return isAuthored; - } + /** + * @param body + * The body of the Message to set. + */ + public void setBody(String body) { + this.body = body; + } - /** - * @param isAuthored Set isAuthored to true if Message was authored - * otherwise set to false. - */ - public void setIsAuthored(boolean isAuthored) { - this.isAuthored = isAuthored; - } + /** + * Returns Message sequence number. + * + * @return Message sequence number + * + * @hibernate.property column="sequence_id" + */ + public int getSequenceId() { + return sequenceId; + } - /** - * @return Returns whether the Message should be shown as an - * Annonymous message. - * - * @hibernate.property - * column="is_anonymous" - * - */ - public boolean getIsAnonymous() { - return isAnonymous; - } - - /** - * @param isAnonymous Indicates that the Message is to be shown - * as an Annonymous message when set to true. - */ - public void setIsAnonymous(boolean isAnonymous) { - this.isAnonymous = isAnonymous; - } + /** + * Sets Message sequence number. + * + * @param sequenceId + * Message sequence number + */ + public void setSequenceId(int sequenceId) { + this.sequenceId = sequenceId; + } /** - * Gets the toolSession - * - * @hibernate.many-to-one cascade="none" - * class="org.lamsfoundation.lams.tool.forum.persistence.ForumToolSession" - * column="forum_session_uid" - * - */ - public ForumToolSession getToolSession() { - return toolSession; - } + * @return Returns true if the Message was an Authored Message. + * + * @hibernate.property column="is_authored" + * + */ + public boolean getIsAuthored() { + return isAuthored; + } + /** + * @param isAuthored + * Set isAuthored to true if Message was authored otherwise set to false. + */ + public void setIsAuthored(boolean isAuthored) { + this.isAuthored = isAuthored; + } - /** - * @param toolSession The toolSession that this Message belongs to + /** + * @return Returns whether the Message should be shown as an Annonymous message. + * + * @hibernate.property column="is_anonymous" + * */ + public boolean getIsAnonymous() { + return isAnonymous; + } + + /** + * @param isAnonymous + * Indicates that the Message is to be shown as an Annonymous message when set to true. + */ + public void setIsAnonymous(boolean isAnonymous) { + this.isAnonymous = isAnonymous; + } + + /** + * Gets the toolSession + * + * @hibernate.many-to-one cascade="none" class="org.lamsfoundation.lams.tool.forum.persistence.ForumToolSession" + * column="forum_session_uid" + * + */ + public ForumToolSession getToolSession() { + return toolSession; + } + + /** + * @param toolSession + * The toolSession that this Message belongs to + */ public void setToolSession(ForumToolSession session) { - this.toolSession = session; - } + this.toolSession = session; + } - /** - * @param parent The parent of this Message + /** + * @param parent + * The parent of this Message */ public void setParent(Message parent) { - this.parent = parent; + this.parent = parent; } /** * @hibernate.many-to-one column="parent_uid" @@ -413,106 +429,100 @@ /** * @return a set of Attachments to this Message. - * - * @hibernate.set table="ATTACHMENT" - * inverse="false" - * lazy="false" - * cascade="all-delete-orphan" + * + * @hibernate.set table="ATTACHMENT" inverse="false" lazy="false" cascade="all-delete-orphan" * @hibernate.collection-key column="message_uid" - * @hibernate.collection-one-to-many - * class="org.lamsfoundation.lams.tool.forum.persistence.Attachment" - * + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.forum.persistence.Attachment" + * */ - public Set getAttachments() { - return attachments; - } + public Set getAttachments() { + return attachments; + } /* - * @param attachments The attachments to set. + * @param attachments The attachments to set. */ public void setAttachments(Set attachments) { - this.attachments = attachments; - } - - /** - * @hibernate.many-to-one column="forum_uid" - * cascade="none" - * @return - */ - public Forum getForum() { - return forum; - } + this.attachments = attachments; + } - public void setForum(Forum forum) { - this.forum = forum; - } - - /** - * @hibernate.property column="reply_number" - * @return - */ - public int getReplyNumber() { - return replyNumber; - } + /** + * @hibernate.many-to-one column="forum_uid" cascade="none" + * @return + */ + public Forum getForum() { + return forum; + } - public void setReplyNumber(int replyNumber) { - this.replyNumber = replyNumber; - } - /** - * @hibernate.property column="hide_flag" - * @return - */ - public boolean isHideFlag() { - return hideFlag; - } + public void setForum(Forum forum) { + this.forum = forum; + } - public void setHideFlag(boolean hideFlag) { - this.hideFlag = hideFlag; - } - /** - * @hibernate.many-to-one column="report_id" - * cascade="all" - * @return - */ - public ForumReport getReport() { - return report; - } - public void setReport(ForumReport report) { - this.report = report; - } - - /** + /** + * @hibernate.property column="reply_number" + * @return + */ + public int getReplyNumber() { + return replyNumber; + } + + public void setReplyNumber(int replyNumber) { + this.replyNumber = replyNumber; + } + + /** + * @hibernate.property column="hide_flag" + * @return + */ + public boolean isHideFlag() { + return hideFlag; + } + + public void setHideFlag(boolean hideFlag) { + this.hideFlag = hideFlag; + } + + /** + * @hibernate.many-to-one column="report_id" cascade="all" + * @return + */ + public ForumReport getReport() { + return report; + } + + public void setReport(ForumReport report) { + this.report = report; + } + + /** * @return the set of all messages cloned from this message. See getAuthoredParent(). - * + * * @hibernate.set cascade="all-delete-orphan" inverse="false" * @hibernate.collection-key column="authored_parent_uid" * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.forum.persistence.Message" - * + * */ - public Set getSessionClones() { - return sessionClones; - } + public Set getSessionClones() { + return sessionClones; + } /* - * @param sessionClones The sessionClones to set. + * @param sessionClones The sessionClones to set. */ public void setSessionClones(Set sessionClones) { - this.sessionClones = sessionClones; - } + this.sessionClones = sessionClones; + } - - public String toString() { - return new ToStringBuilder(this). - append("uid",uid). - append("subject",subject). - append("body",body).toString(); - } - public ForumToolContentHandler getToolContentHandler() { - return toolContentHandler; - } - public void setToolContentHandler(ForumToolContentHandler toolContentHandler) { - this.toolContentHandler = toolContentHandler; - } + return new ToStringBuilder(this).append("uid", uid).append("subject", subject).append("body", body).toString(); + } + public ForumToolContentHandler getToolContentHandler() { + return toolContentHandler; + } + + public void setToolContentHandler(ForumToolContentHandler toolContentHandler) { + this.toolContentHandler = toolContentHandler; + } + } 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.103 -r1.104 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java 2 Aug 2009 20:15:08 -0000 1.103 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java 23 Mar 2010 15:30:01 -0000 1.104 @@ -38,6 +38,7 @@ import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; +import java.util.TreeSet; import java.util.Vector; import java.util.Map.Entry; @@ -95,6 +96,7 @@ import org.lamsfoundation.lams.tool.forum.util.DateComparator; import org.lamsfoundation.lams.tool.forum.util.ForumConstants; import org.lamsfoundation.lams.tool.forum.util.ForumToolContentHandler; +import org.lamsfoundation.lams.tool.forum.util.MessageDtoComparator; import org.lamsfoundation.lams.tool.forum.util.TopicComparator; import org.lamsfoundation.lams.tool.service.ILamsToolService; import org.lamsfoundation.lams.usermanagement.User; @@ -405,28 +407,23 @@ return getSortedMessageDTO(map); } - public List getRootTopics(Long sessionId) { - List topicsBySession = messageDao.getRootTopics(sessionId); + public List getRootTopics(Long sessionId) { ForumToolSession session = getSessionBySessionId(sessionId); if (session == null || session.getForum() == null) { ForumService.log.error("Failed on getting session by given sessionID:" + sessionId); throw new ForumException("Failed on getting session by given sessionID:" + sessionId); } - // sorted by last post date - Message msg; - SortedMap map = new TreeMap(new DateComparator()); - Iterator iter = topicsBySession.iterator(); - while (iter.hasNext()) { - msg = (Message) iter.next(); - if (ForumConstants.OLD_FORUM_STYLE) { - map.put(msg.getCreated(), msg); - } else { - map.put(msg.getLastReplyDate(), msg); - } - } - return MessageDTO.getMessageDTO(new ArrayList(map.values())); + List topicsBySession = messageDao.getRootTopics(sessionId); + List messageDTOs = MessageDTO.getMessageDTO(topicsBySession); + // sort by sequence id + Set topicSet = new TreeSet(new MessageDtoComparator()); + topicSet.addAll(messageDTOs); + + topicsBySession.clear(); + topicsBySession.addAll(topicSet); + return topicsBySession; } public int getTopicsNum(Long userID, Long 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.45 -r1.46 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/IForumService.java 2 Jul 2009 08:19:35 -0000 1.45 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/IForumService.java 23 Mar 2010 15:30:01 -0000 1.46 @@ -232,7 +232,7 @@ * @param sessionId * @return List of MessageDTO */ - public List getRootTopics(Long sessionId); + public List getRootTopics(Long sessionId); /** * Get topics posted by author role. Note that the return type is DTO. Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/MessageComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/MessageComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/MessageComparator.java 23 Mar 2010 15:30:02 -0000 1.1 @@ -0,0 +1,51 @@ +/**************************************************************** + * 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: MessageComparator.java,v 1.1 2010/03/23 15:30:02 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.forum.util; + +import java.util.Comparator; + +import org.lamsfoundation.lams.tool.forum.persistence.Message; + + +/** + * Message comparator by sequence ID. + * + * @author Andrey Balan + */ +public class MessageComparator implements Comparator { + + /** + * {@inheritDoc} + */ + public int compare(Message o1, Message o2) { + if (o1 != null && o2 != null) { + return o1.getSequenceId() - o2.getSequenceId(); + } else if (o1 != null) { + return 1; + } else { + return -1; + } + } + +} \ No newline at end of file Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/MessageDtoComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/MessageDtoComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/MessageDtoComparator.java 23 Mar 2010 15:30:02 -0000 1.1 @@ -0,0 +1,51 @@ +/**************************************************************** + * 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: MessageDtoComparator.java,v 1.1 2010/03/23 15:30:02 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.forum.util; + +import java.util.Comparator; + +import org.lamsfoundation.lams.tool.forum.dto.MessageDTO; +import org.lamsfoundation.lams.tool.forum.persistence.Message; + +/** + * Root topics comparator. + * + * @author Andrey Balan + */ +public class MessageDtoComparator implements Comparator { + + /** + * {@inheritDoc} + */ + public int compare(MessageDTO o1, MessageDTO o2) { + if (o1 != null && o2 != null) { + return o1.getMessage().getSequenceId() - o2.getMessage().getSequenceId(); + } else if (o1 != null) { + return 1; + } else { + return -1; + } + } + +} Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java,v diff -u -r1.72 -r1.73 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java 2 Jul 2009 08:19:35 -0000 1.72 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java 23 Mar 2010 15:30:01 -0000 1.73 @@ -71,6 +71,8 @@ import org.lamsfoundation.lams.tool.forum.util.DateComparator; import org.lamsfoundation.lams.tool.forum.util.ForumConstants; import org.lamsfoundation.lams.tool.forum.util.ForumWebUtils; +import org.lamsfoundation.lams.tool.forum.util.MessageComparator; +import org.lamsfoundation.lams.tool.forum.util.MessageDtoComparator; import org.lamsfoundation.lams.tool.forum.web.forms.ForumForm; import org.lamsfoundation.lams.tool.forum.web.forms.ForumPedagogicalPlannerForm; import org.lamsfoundation.lams.tool.forum.web.forms.MessageForm; @@ -151,15 +153,18 @@ if (param.equals("updateTopic")) { return updateTopic(mapping, form, request, response); } - if (param.equals("viewTopic")) { - return viewTopic(mapping, form, request, response); - } if (param.equals("deleteTopic")) { return deleteTopic(mapping, form, request, response); } if (param.equals("deleteAttachment")) { return deleteAttachment(mapping, form, request, response); } + if (param.equals("upTopic")) { + return upTopic(mapping, form, request, response); + } + if (param.equals("downTopic")) { + return downTopic(mapping, form, request, response); + } if (param.equals("initPedagogicalPlannerForm")) { return initPedagogicalPlannerForm(mapping, form, request, response); } @@ -209,7 +214,7 @@ if (forum == null) { forum = forumService.getDefaultContent(contentId); if (forum.getMessages() != null) { - TreeMap map = new TreeMap(new DateComparator()); + List list = new ArrayList(); // sorted by create date Iterator iter = forum.getMessages().iterator(); while (iter.hasNext()) { @@ -223,9 +228,9 @@ ForumUser fuser = new ForumUser(user, null); topic.setCreatedBy(fuser); } - map.put(topic.getCreated(), topic); + list.add(topic); } - topics = MessageDTO.getMessageDTO(new ArrayList(map.values())); + topics = MessageDTO.getMessageDTO(list); } else { topics = null; } @@ -263,7 +268,9 @@ topics = new ArrayList(); } - sessionMap.put(ForumConstants.AUTHORING_TOPICS_LIST, topics); + Set topicSet = new TreeSet(new MessageDtoComparator()); + topicSet.addAll(topics); + sessionMap.put(ForumConstants.AUTHORING_TOPICS_LIST, topicSet); // init condition set SortedSet conditionSet = getForumConditionSet(sessionMap); @@ -396,7 +403,7 @@ } // Handle message - List topics = getTopicList(sessionMap); + Set topics = getTopics(sessionMap); iter = topics.iterator(); while (iter.hasNext()) { MessageDTO dto = (MessageDTO) iter.next(); @@ -638,7 +645,7 @@ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(messageForm.getSessionMapID()); request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, messageForm.getSessionMapID()); - List topics = getTopicList(sessionMap); + SortedSet topics = getTopics(sessionMap); // get login user (author) HttpSession ss = SessionManager.getSession(); // get back login user DTO @@ -651,6 +658,13 @@ message.setCreated(new Date()); message.setUpdated(new Date()); message.setLastReplyDate(new Date()); + + int maxSeq = 1; + if (topics.size() > 0) { + MessageDTO last = (MessageDTO) topics.last(); + maxSeq = last.getMessage().getSequenceId() + 1; + } + message.setSequenceId(maxSeq); // check whether this user exist or not ForumUser forumUser = forumService.getUserByID(new Long(user.getUserID().intValue())); @@ -676,57 +690,12 @@ } message.setAttachments(attSet); - // save the new message into HttpSession - if (ForumConstants.OLD_FORUM_STYLE) { - topics.add(MessageDTO.getMessageDTO(message)); - } else { - topics.add(0, MessageDTO.getMessageDTO(message)); - } + topics.add(MessageDTO.getMessageDTO(message)); return mapping.findForward("success"); } /** - * Diplay a special topic information. Only display author created root message content, even this topic already has - * some reply messages from learner in some cases. - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws PersistenceException - */ - public ActionForward viewTopic(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws PersistenceException { - - // get SessionMAP - String sessionMapID = WebUtil.readStrParam(request, ForumConstants.ATTR_SESSION_MAP_ID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); - request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, sessionMapID); - - List topics = getTopicList(sessionMap); - String topicIndex = request.getParameter(ForumConstants.AUTHORING_TOPICS_INDEX); - int topicIdx = NumberUtils.stringToInt(topicIndex, -1); - - // if topicIndex is empty, try to get it from Request Attribute again. - // This may be caused by reresh this page, back from edit page etc. - if (topicIdx == -1) { - topicIndex = (String) request.getAttribute(ForumConstants.AUTHORING_TOPICS_INDEX); - topicIdx = NumberUtils.stringToInt(topicIndex, -1); - } - - if (topicIdx != -1) { - MessageDTO topic = (MessageDTO) topics.get(topicIdx); - request.setAttribute(ForumConstants.AUTHORING_TOPICS_INDEX, topicIndex); - request.setAttribute(ForumConstants.AUTHORING_TOPIC, topic); - } - - return mapping.findForward("success"); - - } - - /** * Delete a topic form current topic list. But database record will be deleted only when user save whole authoring * page. * @@ -743,12 +712,16 @@ String sessionMapID = WebUtil.readStrParam(request, ForumConstants.ATTR_SESSION_MAP_ID); SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, sessionMapID); - List topics = getTopicList(sessionMap); String topicIndex = request.getParameter(ForumConstants.AUTHORING_TOPICS_INDEX); int topicIdx = NumberUtils.stringToInt(topicIndex, -1); if (topicIdx != -1) { - Object obj = topics.remove(topicIdx); + Set topics = getTopics(sessionMap); + List rList = new ArrayList(topics); + Object obj = rList.remove(topicIdx); + topics.clear(); + topics.addAll(rList); + // add to delList List delList = getDeletedTopicList(sessionMap); delList.add(obj); @@ -793,11 +766,12 @@ MessageForm msgForm = (MessageForm) form; msgForm.setSessionMapID(sessionMapID); - List topics = getTopicList(sessionMap); String topicIndex = request.getParameter(ForumConstants.AUTHORING_TOPICS_INDEX); int topicIdx = NumberUtils.stringToInt(topicIndex, -1); if (topicIdx != -1) { - MessageDTO topic = (MessageDTO) topics.get(topicIdx); + Set topics = getTopics(sessionMap); + List rList = new ArrayList(topics); + MessageDTO topic = rList.get(topicIdx); if (topic != null) { // check whehter the edit topic and the current user are same person, if not, forbidden to edit topic if (topic.getMessage() != null && topic.getMessage().getCreatedBy() != null) { @@ -838,16 +812,16 @@ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(messageForm.getSessionMapID()); request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, messageForm.getSessionMapID()); - // get value from HttpSession - List topics = getTopicList(sessionMap); // get param from HttpServletRequest String topicIndex = request.getParameter(ForumConstants.AUTHORING_TOPICS_INDEX); int topicIdx = NumberUtils.stringToInt(topicIndex, -1); if (topicIdx != -1) { Message message = messageForm.getMessage(); - MessageDTO newMsg = (MessageDTO) topics.get(topicIdx); + Set topics = getTopics(sessionMap); + List rList = new ArrayList(topics); + MessageDTO newMsg = rList.get(topicIdx); if (newMsg.getMessage() == null) { newMsg.setMessage(new Message()); } @@ -894,7 +868,67 @@ request.setAttribute("itemAttachment", null); return mapping.findForward("success"); } + + /** + * Move up current topic. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward upTopic(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return switchTopic(mapping, request, true); + } + /** + * Move down current topic. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward downTopic(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return switchTopic(mapping, request, false); + } + + private ActionForward switchTopic(ActionMapping mapping, HttpServletRequest request, boolean up) { + // get back sessionMAP + String sessionMapID = WebUtil.readStrParam(request, ForumConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + + int itemIdx = NumberUtils.stringToInt(request.getParameter(ForumConstants.AUTHORING_TOPICS_INDEX), -1); + if (itemIdx != -1) { + Set topics = getTopics(sessionMap); + List rList = new ArrayList(topics); + MessageDTO newMsg = rList.get(itemIdx); + + // get current and the target item, and switch their sequence + MessageDTO item = (MessageDTO) rList.get(itemIdx); + MessageDTO repItem; + if (up) { + repItem = rList.get(--itemIdx); + } else { + repItem = rList.get(++itemIdx); + } + int upSeqId = repItem.getMessage().getSequenceId(); + repItem.getMessage().setSequenceId(item.getMessage().getSequenceId()); + item.getMessage().setSequenceId(upSeqId); + + // put back list, it will be sorted again + topics.clear(); + topics.addAll(rList); + } + + request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, sessionMapID); + return mapping.findForward("success"); + } + // ****************************************************************************************************************** // Private method for internal functions // ****************************************************************************************************************** @@ -927,8 +961,13 @@ * @param request * @return */ - private List getTopicList(SessionMap sessionMap) { - return getListFromSession(sessionMap, ForumConstants.AUTHORING_TOPICS_LIST); + private SortedSet getTopics(SessionMap sessionMap) { + SortedSet topics = (SortedSet) sessionMap.get(ForumConstants.AUTHORING_TOPICS_LIST); + if (topics == null) { + topics = new TreeSet(new MessageDtoComparator()); + sessionMap.put(ForumConstants.AUTHORING_TOPICS_LIST, topics); + } + return topics; } /** @@ -1010,7 +1049,7 @@ } } if (!allowNewTopic) { - List topics = getTopicList(sessionMap); + Set topics = getTopics(sessionMap); if (topics.size() == 0) { ActionMessage error = new ActionMessage("error.must.have.topic"); errors.add(ActionMessages.GLOBAL_MESSAGE, error); @@ -1116,7 +1155,9 @@ String subject = null; Message message = null; List newTopics = new LinkedList(); - Iterator forumTopicIterator = forum.getMessages().iterator(); + Set forumTopics = new TreeSet(new MessageComparator()); + forumTopics.addAll(forum.getMessages()); + Iterator forumTopicIterator = forumTopics.iterator(); Pattern regexPattern = Pattern.compile(ForumConstants.WORD_REGEX, ForumConstants.PATTERN_MATCHING_OPTIONS); Matcher matcher = null; @@ -1166,6 +1207,16 @@ message.setSubject(subject); message.setBody(topic); + int maxSeq = 1; + SortedSet allTopics = new TreeSet(new MessageComparator()); + allTopics.addAll(forum.getMessages()); + allTopics.addAll(newTopics); + if (allTopics.size() > 0) { + Message last = allTopics.last(); + maxSeq = last.getSequenceId() + 1; + } + message.setSequenceId(maxSeq); + newTopics.add(message); message.setForum(forum); getForumManager().createRootTopic(forum.getUid(), null, message); Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringConditionAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringConditionAction.java,v diff -u -r1.1 -r1.2 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringConditionAction.java 27 Oct 2008 00:53:02 -0000 1.1 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringConditionAction.java 23 Mar 2010 15:30:01 -0000 1.2 @@ -51,6 +51,7 @@ import org.lamsfoundation.lams.tool.forum.service.IForumService; import org.lamsfoundation.lams.tool.forum.util.ConditionTopicComparator; import org.lamsfoundation.lams.tool.forum.util.ForumConstants; +import org.lamsfoundation.lams.tool.forum.util.MessageDtoComparator; import org.lamsfoundation.lams.tool.forum.web.forms.ForumConditionForm; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.util.SessionMap; @@ -306,8 +307,13 @@ return list; } - private List getMessageDTOList(SessionMap sessionMap) { - return getListFromSession(sessionMap, ForumConstants.AUTHORING_TOPICS_LIST); + private SortedSet getMessageDTOList(SessionMap sessionMap) { + SortedSet topics = (SortedSet) sessionMap.get(ForumConstants.AUTHORING_TOPICS_LIST); + if (topics == null) { + topics = new TreeSet(new MessageDtoComparator()); + sessionMap.put(ForumConstants.AUTHORING_TOPICS_LIST, topics); + } + return topics; } /** @@ -366,7 +372,7 @@ String sessionMapID = conditionForm.getSessionMapID(); SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); - List messageDTOs = getMessageDTOList(sessionMap); + Set messageDTOs = getMessageDTOList(sessionMap); // Initialise the LabelValueBeans in the possibleOptions array. @@ -413,7 +419,7 @@ Long[] selectedItems = form.getSelectedItems(); Set conditionTopics = new TreeSet(new ConditionTopicComparator()); - List messageDTOs = getMessageDTOList(sessionMap); + Set messageDTOs = getMessageDTOList(sessionMap); for (Long selectedItem : selectedItems) { for (MessageDTO messageDTO : messageDTOs) { Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java,v diff -u -r1.66 -r1.67 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java 2 Jul 2009 08:19:35 -0000 1.66 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java 23 Mar 2010 15:30:01 -0000 1.67 @@ -547,12 +547,19 @@ SessionMap sessionMap = getSessionMap(request, messageForm); Long forumId = (Long) sessionMap.get(ForumConstants.FORUM_ID); Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + List rootTopics = forumService.getRootTopics(sessionId); Message message = messageForm.getMessage(); message.setIsAuthored(false); message.setCreated(new Date()); message.setUpdated(new Date()); message.setLastReplyDate(new Date()); + int maxSeq = 1; + if (rootTopics.size() > 0) { + MessageDTO last = rootTopics.get(rootTopics.size() - 1); + maxSeq = last.getMessage().getSequenceId() + 1; + } + message.setSequenceId(maxSeq); ForumUser forumUser = getCurrentUser(request, sessionId); message.setCreatedBy(forumUser); message.setModifiedBy(forumUser); @@ -562,15 +569,14 @@ forumService = getForumManager(); forumService.createRootTopic(forumId, sessionId, message); + rootTopics.add(MessageDTO.getMessageDTO(message)); // echo back current root topic to forum init page - List rootTopics = forumService.getRootTopics(sessionId); request.setAttribute(ForumConstants.AUTHORING_TOPICS_LIST, rootTopics); request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, messageForm.getSessionMapID()); saveUserTimestamp(message.getUid(), forumUser); - for (Iterator iterator = rootTopics.iterator(); iterator.hasNext();) { - MessageDTO messageDTO = (MessageDTO) iterator.next(); + for (MessageDTO messageDTO : rootTopics) { int numOfNewPosts = forumService.getNewMessagesNum(messageDTO.getMessage().getUid(), forumUser.getUid()); if (numOfNewPosts == -1) { messageDTO.setNewPostingsNum(messageDTO.getMessage().getReplyNumber() + 1); Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/forms/ForumPedagogicalPlannerForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/forms/ForumPedagogicalPlannerForm.java,v diff -u -r1.4 -r1.5 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/forms/ForumPedagogicalPlannerForm.java 2 Jul 2009 08:19:36 -0000 1.4 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/forms/ForumPedagogicalPlannerForm.java 23 Mar 2010 15:30:02 -0000 1.5 @@ -26,12 +26,14 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; +import java.util.TreeSet; import org.apache.commons.lang.StringUtils; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; import org.lamsfoundation.lams.tool.forum.persistence.Forum; import org.lamsfoundation.lams.tool.forum.persistence.Message; +import org.lamsfoundation.lams.tool.forum.util.MessageComparator; import org.lamsfoundation.lams.web.planner.PedagogicalPlannerActivityForm; /** @@ -72,7 +74,8 @@ setInstructions(forum.getInstructions()); topic = new ArrayList(); - Set messages = forum.getMessages(); + Set messages = new TreeSet(new MessageComparator()); + messages.addAll(forum.getMessages()); if (messages != null) { int topicIndex = 0; for (Message message : (Set) messages) { Index: lams_tool_forum/web/jsps/authoring/basic.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/authoring/basic.jsp,v diff -u -r1.33 -r1.34 --- lams_tool_forum/web/jsps/authoring/basic.jsp 3 Nov 2006 04:56:54 -0000 1.33 +++ lams_tool_forum/web/jsps/authoring/basic.jsp 23 Mar 2010 15:30:02 -0000 1.34 @@ -1,7 +1,5 @@ <%@ include file="/includes/taglibs.jsp"%> - + @@ -39,6 +37,74 @@ elem.style.display="block"; } } + + function editTopic(topicIndex, sessionMapID){ + var reqIDVar = new Date(); + var url = "" + topicIndex +"&reqID="+reqIDVar.getTime()+"&sessionMapID="+sessionMapID;; + showMessage(url); + } + //The panel of taskList list panel + var topicListTargetDiv = "messageListArea"; + function deleteTopic(topicIndex, sessionMapID){ + var deletionConfirmed = confirm(""); + + if (deletionConfirmed) { + var url = ""; + var reqIDVar = new Date(); + var param = "topicIndex=" + topicIndex +"&reqID="+reqIDVar.getTime()+"&sessionMapID="+sessionMapID;; + deleteItemLoading(); + var myAjax = new Ajax.Updater( + topicListTargetDiv, + url, + { + method:'get', + parameters:param, + onComplete:deleteItemComplete, + evalScripts:true + } + ); + } + + } + function deleteItemLoading(){ + showBusy(topicListTargetDiv); + } + function deleteItemComplete(){ + hideBusy(topicListTargetDiv); + } + + function upTopic(topicIndex, sessionMapID){ + var url = ""; + var reqIDVar = new Date(); + var param = "topicIndex=" + topicIndex +"&reqID="+reqIDVar.getTime()+"&sessionMapID="+sessionMapID;; + deleteItemLoading(); + var myAjax = new Ajax.Updater( + topicListTargetDiv, + url, + { + method:'get', + parameters:param, + onComplete:deleteItemComplete, + evalScripts:true + } + ); + } + function downTopic(topicIndex, sessionMapID){ + var url = ""; + var reqIDVar = new Date(); + var param = "topicIndex=" + topicIndex +"&reqID="+reqIDVar.getTime()+"&sessionMapID="+sessionMapID;; + deleteItemLoading(); + var myAjax = new Ajax.Updater( + topicListTargetDiv, + url, + { + method:'get', + parameters:param, + onComplete:deleteItemComplete, + evalScripts:true + } + ); + } Index: lams_tool_forum/web/jsps/authoring/message/edit.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/authoring/message/edit.jsp,v diff -u -r1.22 -r1.23 --- lams_tool_forum/web/jsps/authoring/message/edit.jsp 23 May 2008 06:54:40 -0000 1.22 +++ lams_tool_forum/web/jsps/authoring/message/edit.jsp 23 Mar 2010 15:30:02 -0000 1.23 @@ -24,8 +24,7 @@ value=""> + value="<%=request.getAttribute(org.apache.struts.taglib.html.Constants.BEAN_KEY)%>" /> @@ -43,8 +42,7 @@ * + value="<%=request.getAttribute(org.apache.struts.taglib.html.Constants.BEAN_KEY)%>" />
+ value="<%=request.getAttribute(org.apache.struts.taglib.html.Constants.BEAN_KEY)%>" />
<%@ include file="/jsps/authoring/parts/msgattachment.jsp"%> Index: lams_tool_forum/web/jsps/authoring/message/topiclist.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/authoring/message/topiclist.jsp,v diff -u -r1.11 -r1.12 --- lams_tool_forum/web/jsps/authoring/message/topiclist.jsp 5 May 2008 06:51:21 -0000 1.11 +++ lams_tool_forum/web/jsps/authoring/message/topiclist.jsp 23 Mar 2010 15:30:01 -0000 1.12 @@ -5,7 +5,7 @@
- + @@ -14,13 +14,50 @@ - - - + + + "> + + + + + +
+ + " + onclick="upTopic(${status.index},'${sessionMapID}')"> + + "> + + + + + + "> + + + " + onclick="downTopic(${status.index},'${sessionMapID}')"> + + + " + onclick="editTopic(${status.index},'${sessionMapID}')" /> + + " + onclick="deleteTopic(${status.index},'${sessionMapID}')" /> +
Fisheye: Tag 1.20 refers to a dead (removed) revision in file `lams_tool_forum/web/jsps/authoring/message/view.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_forum/web/jsps/authoring/parts/msgattachment.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/authoring/parts/msgattachment.jsp,v diff -u -r1.3 -r1.4 --- lams_tool_forum/web/jsps/authoring/parts/msgattachment.jsp 19 Oct 2006 03:15:53 -0000 1.3 +++ lams_tool_forum/web/jsps/authoring/parts/msgattachment.jsp 23 Mar 2010 15:30:02 -0000 1.4 @@ -1,19 +1,24 @@ <%@ include file="/common/taglibs.jsp"%> - - + +