Index: lams_admin/web/WEB-INF/tags/Comments.tag =================================================================== diff -u -r2af3df00f43a845436372dd415da5ce02f466024 -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_admin/web/WEB-INF/tags/Comments.tag (.../Comments.tag) (revision 2af3df00f43a845436372dd415da5ce02f466024) +++ lams_admin/web/WEB-INF/tags/Comments.tag (.../Comments.tag) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -3,6 +3,7 @@ <%@ taglib uri="tags-function" prefix="fn" %> <%@ attribute name="toolSessionId" required="true" rtexprvalue="true"%> +<%@ attribute name="toolItemId" required="false" rtexprvalue="true"%> <%@ attribute name="toolSignature" required="true" rtexprvalue="true"%> <%@ attribute name="height" required="false" rtexprvalue="true"%> <%@ attribute name="width" required="false" rtexprvalue="true"%> @@ -11,6 +12,8 @@ <%@ attribute name="readOnly" required="false" rtexprvalue="true"%> <%@ attribute name="pageSize" required="false" rtexprvalue="true"%> <%@ attribute name="sortBy" required="false" rtexprvalue="true"%> +<%@ attribute name="embedInAccordian" required="false" rtexprvalue="true"%> +<%@ attribute name="accordionTitle" required="false" rtexprvalue="true"%> @@ -38,10 +41,33 @@ + + + + + +
+ +
+
+ -
+<%--
@@ -94,7 +94,7 @@
-
+ --%>
@@ -116,14 +116,14 @@
- + + end panel body
- + end comment panel
- + end col-*-12
- +end row no-gutter + --> - Index: lams_central/web/comments/topicview.jsp =================================================================== diff -u -r4583983b64efe1d91fbb47cdde6a759a6a30e859 -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_central/web/comments/topicview.jsp (.../topicview.jsp) (revision 4583983b64efe1d91fbb47cdde6a759a6a30e859) +++ lams_central/web/comments/topicview.jsp (.../topicview.jsp) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -162,7 +162,7 @@ +
Index: lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/comments/CommentSession.hbm.xml =================================================================== diff -u -r9ab6da017a5180a0ee0e766740571644972ce628 -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/comments/CommentSession.hbm.xml (.../CommentSession.hbm.xml) (revision 9ab6da017a5180a0ee0e766740571644972ce628) +++ lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/comments/CommentSession.hbm.xml (.../CommentSession.hbm.xml) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -44,6 +44,15 @@ column="external_signature" /> + + + Index: lams_common/src/java/org/lamsfoundation/lams/comments/CommentSession.java =================================================================== diff -u -r51fb2a37254f24bb2a805d4ffd54482c779f43fa -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_common/src/java/org/lamsfoundation/lams/comments/CommentSession.java (.../CommentSession.java) (revision 51fb2a37254f24bb2a805d4ffd54482c779f43fa) +++ lams_common/src/java/org/lamsfoundation/lams/comments/CommentSession.java (.../CommentSession.java) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -33,6 +33,7 @@ private Long externalId; private Integer externalIdType; private String externalSignature; + private Long externalSecondaryId; public CommentSession() { } @@ -69,4 +70,12 @@ this.externalSignature = externalSignature; } + public Long getExternalSecondaryId() { + return externalSecondaryId; + } + + public void setExternalSecondaryId(Long externalSecondaryId) { + this.externalSecondaryId = externalSecondaryId; + } + } Index: lams_common/src/java/org/lamsfoundation/lams/comments/dao/ICommentDAO.java =================================================================== diff -u -r5773f84ed608838de3521ecde87c52f3c72d478c -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_common/src/java/org/lamsfoundation/lams/comments/dao/ICommentDAO.java (.../ICommentDAO.java) (revision 5773f84ed608838de3521ecde87c52f3c72d478c) +++ lams_common/src/java/org/lamsfoundation/lams/comments/dao/ICommentDAO.java (.../ICommentDAO.java) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -16,7 +16,7 @@ * @param sessionId * @return */ - public abstract Comment getRootTopic(Long externalId, Integer externalIdType, String externalSignature); + public abstract Comment getRootTopic(Long externalId, Long externalSecondaryId, Integer externalIdType, String externalSignature); public abstract SortedSet getThreadByThreadId(Long threadCommentId, Integer sortBy, Integer userId); Index: lams_common/src/java/org/lamsfoundation/lams/comments/dao/hibernate/CommentDAO.java =================================================================== diff -u -r51fb2a37254f24bb2a805d4ffd54482c779f43fa -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_common/src/java/org/lamsfoundation/lams/comments/dao/hibernate/CommentDAO.java (.../CommentDAO.java) (revision 51fb2a37254f24bb2a805d4ffd54482c779f43fa) +++ lams_common/src/java/org/lamsfoundation/lams/comments/dao/hibernate/CommentDAO.java (.../CommentDAO.java) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -62,11 +62,25 @@ + " where cs.parent is null and cs.session.externalId=:externalId and " + " cs.session.externalIdType=:externalIdType and cs.session.externalSignature=:externalSignature"; + private static final String SQL_QUERY_FIND_ROOT_TOPICS_EXTRA_ID = "from " + Comment.class.getName() + " cs " + + " where cs.parent is null and cs.session.externalId=:externalId and " + + " cs.session.externalSecondaryId=:externalSecondaryId and " + + " cs.session.externalIdType=:externalIdType and cs.session.externalSignature=:externalSignature"; + @Override - public Comment getRootTopic(Long externalId, Integer externalIdType, String externalSignature) { + public Comment getRootTopic(Long externalId, Long externalSecondaryId, Integer externalIdType, + String externalSignature) { @SuppressWarnings("rawtypes") - List list = getSession().createQuery(SQL_QUERY_FIND_ROOT_TOPICS).setLong("externalId", externalId) - .setInteger("externalIdType", externalIdType).setString("externalSignature", externalSignature).list(); + List list = null; + if (externalSecondaryId == null) + list = getSession().createQuery(SQL_QUERY_FIND_ROOT_TOPICS).setLong("externalId", externalId) + .setInteger("externalIdType", externalIdType).setString("externalSignature", externalSignature) + .list(); + else + list = getSession().createQuery(SQL_QUERY_FIND_ROOT_TOPICS_EXTRA_ID).setLong("externalId", externalId) + .setLong("externalSecondaryId", externalSecondaryId).setInteger("externalIdType", externalIdType) + .setString("externalSignature", externalSignature).list(); + if (list != null && list.size() > 0) { return (Comment) list.get(0); } Index: lams_common/src/java/org/lamsfoundation/lams/comments/service/CommentService.java =================================================================== diff -u -r5fb9d3a732e1f9c643f4c6023e29b25cd2287988 -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_common/src/java/org/lamsfoundation/lams/comments/service/CommentService.java (.../CommentService.java) (revision 5fb9d3a732e1f9c643f4c6023e29b25cd2287988) +++ lams_common/src/java/org/lamsfoundation/lams/comments/service/CommentService.java (.../CommentService.java) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -62,13 +62,14 @@ private ICommentLikeDAO commentLikeDAO; @Override - public List getTopicThread(Long externalId, Integer externalType, String externalSignature, - Long lastCommentSeqId, Integer pageSize, Integer sortBy, String extraSortParam, Integer userId) { + public List getTopicThread(Long externalId, Long externalSecondaryId, Integer externalType, + String externalSignature, Long lastCommentSeqId, Integer pageSize, Integer sortBy, String extraSortParam, + Integer userId) { long lastThreadMessageUid = lastCommentSeqId != null ? lastCommentSeqId.longValue() : 0L; // hidden root of all the threads! - Comment rootTopic = commentDAO.getRootTopic(externalId, externalType, externalSignature); + Comment rootTopic = commentDAO.getRootTopic(externalId, externalSecondaryId, externalType, externalSignature); // first time through - no root topic. if (rootTopic == null) { @@ -81,11 +82,11 @@ } @Override - public List getTopicStickyThread(Long externalId, Integer externalType, String externalSignature, + public List getTopicStickyThread(Long externalId, Long externalSecondaryId, Integer externalType, String externalSignature, Integer sortBy, String extraSortParam, Integer userId) { // hidden root of all the threads! - Comment rootTopic = commentDAO.getRootTopic(externalId, externalType, externalSignature); + Comment rootTopic = commentDAO.getRootTopic(externalId, externalSecondaryId, externalType, externalSignature); // first time through - no root topic. if (rootTopic == null) { @@ -117,20 +118,21 @@ // Do we need to synchronize this method? Would be nice but it is the equivalent of tool session creation // and we don't synchonize them! @Override - public Comment createOrGetRoot(Long externalId, Integer externalIdType, String externalSignature, User user) { - Comment rootComment = commentDAO.getRootTopic(externalId, externalIdType, externalSignature); - return (rootComment != null ? rootComment : createRoot(externalId, externalIdType, externalSignature, user)); + public Comment createOrGetRoot(Long externalId, Long externalSecondaryId, Integer externalIdType, String externalSignature, User user) { + Comment rootComment = commentDAO.getRootTopic(externalId, externalSecondaryId, externalIdType, externalSignature); + return (rootComment != null ? rootComment : createRoot(externalId, externalSecondaryId, externalIdType, externalSignature, user)); } @Override - public Comment getRoot(Long externalId, Integer externalIdType, String externalSignature) { - return commentDAO.getRootTopic(externalId, externalIdType, externalSignature); + public Comment getRoot(Long externalId, Long externalSecondaryId, Integer externalIdType, String externalSignature) { + return commentDAO.getRootTopic(externalId, externalSecondaryId, externalIdType, externalSignature); } - private Comment createRoot(Long externalId, Integer externalIdType, String externalSignature, User user) { + private Comment createRoot(Long externalId, Long externalSecondaryId, Integer externalIdType, String externalSignature, User user) { CommentSession session = new CommentSession(); session.setExternalId(externalId); + session.setExternalSecondaryId(externalSecondaryId); session.setExternalIdType(externalIdType); session.setExternalSignature(externalSignature); Index: lams_common/src/java/org/lamsfoundation/lams/comments/service/ICommentService.java =================================================================== diff -u -r5fb9d3a732e1f9c643f4c6023e29b25cd2287988 -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_common/src/java/org/lamsfoundation/lams/comments/service/ICommentService.java (.../ICommentService.java) (revision 5fb9d3a732e1f9c643f4c6023e29b25cd2287988) +++ lams_common/src/java/org/lamsfoundation/lams/comments/service/ICommentService.java (.../ICommentService.java) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -39,23 +39,25 @@ * Gets the comments for a tool, based on the tool session and the tool's id. Allows for paging. * Will not include the sticky - get them using getTopicStickyThread() */ - List getTopicThread(Long externalId, Integer externalType, String externalSignature, Long lastMsgSeqId, - Integer pageSize, Integer sortBy, String extraSortParam, Integer userId); + List getTopicThread(Long externalId, Long externalSecondaryId, Integer externalType, + String externalSignature, Long lastMsgSeqId, Integer pageSize, Integer sortBy, String extraSortParam, + Integer userId); /** Gets all the sticky comments for a tool, based on the tool session and the tool's id */ - List getTopicStickyThread(Long externalId, Integer externalType, String externalSignature, - Integer sortBy, String extraSortParam, Integer userId); + List getTopicStickyThread(Long externalId, Long externalSecondaryId, Integer externalType, + String externalSignature, Integer sortBy, String extraSortParam, Integer userId); /** Saves a comment - either creating a whole tree one if there is no parent or saving under the given parent. */ Comment createReply(Long parentId, String replyText, User user, boolean isMonitor); Comment createReply(Comment parent, String replyText, User user, boolean isMonitor); /** Gets the dummy root for the comment system and if one doesn't exist for this session then set it up! */ - Comment createOrGetRoot(Long externalId, Integer externalIdType, String externalSignature, User user); + Comment createOrGetRoot(Long externalId, Long externalSecondaryId, Integer externalIdType, String externalSignature, + User user); /** Gets the dummy root. If it doesn't exist, returns null. */ - Comment getRoot(Long externalId, Integer externalIdType, String externalSignature); + Comment getRoot(Long externalId, Long externalSecondaryId, Integer externalIdType, String externalSignature); /** * Get one complete thread within a topic Note that the return type is DTO. Index: lams_gradebook/web/WEB-INF/tags/Comments.tag =================================================================== diff -u -r6e11b20353d23ae1ef9a153af2109ec0e5c4049f -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_gradebook/web/WEB-INF/tags/Comments.tag (.../Comments.tag) (revision 6e11b20353d23ae1ef9a153af2109ec0e5c4049f) +++ lams_gradebook/web/WEB-INF/tags/Comments.tag (.../Comments.tag) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -3,6 +3,7 @@ <%@ taglib uri="tags-function" prefix="fn" %> <%@ attribute name="toolSessionId" required="true" rtexprvalue="true"%> +<%@ attribute name="toolItemId" required="false" rtexprvalue="true"%> <%@ attribute name="toolSignature" required="true" rtexprvalue="true"%> <%@ attribute name="height" required="false" rtexprvalue="true"%> <%@ attribute name="width" required="false" rtexprvalue="true"%> @@ -11,6 +12,8 @@ <%@ attribute name="readOnly" required="false" rtexprvalue="true"%> <%@ attribute name="pageSize" required="false" rtexprvalue="true"%> <%@ attribute name="sortBy" required="false" rtexprvalue="true"%> +<%@ attribute name="embedInAccordian" required="false" rtexprvalue="true"%> +<%@ attribute name="accordionTitle" required="false" rtexprvalue="true"%> @@ -38,10 +41,33 @@ + + + + + + + + + @@ -282,21 +294,52 @@
+
Index: lams_tool_forum/web/WEB-INF/tags/Comments.tag =================================================================== diff -u -r2af3df00f43a845436372dd415da5ce02f466024 -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_tool_forum/web/WEB-INF/tags/Comments.tag (.../Comments.tag) (revision 2af3df00f43a845436372dd415da5ce02f466024) +++ lams_tool_forum/web/WEB-INF/tags/Comments.tag (.../Comments.tag) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -3,6 +3,7 @@ <%@ taglib uri="tags-function" prefix="fn" %> <%@ attribute name="toolSessionId" required="true" rtexprvalue="true"%> +<%@ attribute name="toolItemId" required="false" rtexprvalue="true"%> <%@ attribute name="toolSignature" required="true" rtexprvalue="true"%> <%@ attribute name="height" required="false" rtexprvalue="true"%> <%@ attribute name="width" required="false" rtexprvalue="true"%> @@ -11,6 +12,8 @@ <%@ attribute name="readOnly" required="false" rtexprvalue="true"%> <%@ attribute name="pageSize" required="false" rtexprvalue="true"%> <%@ attribute name="sortBy" required="false" rtexprvalue="true"%> +<%@ attribute name="embedInAccordian" required="false" rtexprvalue="true"%> +<%@ attribute name="accordionTitle" required="false" rtexprvalue="true"%> @@ -38,10 +41,33 @@ + + + + + +
+ +
+
+
-
+ + +
-

- - +

- - -   -

+
@@ -152,7 +145,7 @@
-
+
Index: lams_tool_larsrc/web/pages/itemreview/mainframe.jsp =================================================================== diff -u -ref8d9a9e7303e6f5d108db3ac7f5413add6b66d2 -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_tool_larsrc/web/pages/itemreview/mainframe.jsp (.../mainframe.jsp) (revision ef8d9a9e7303e6f5d108db3ac7f5413add6b66d2) +++ lams_tool_larsrc/web/pages/itemreview/mainframe.jsp (.../mainframe.jsp) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -1,3 +1,4 @@ + <%-- Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) License Information: http://lamsfoundation.org/licensing/lams/2.0/ @@ -19,18 +20,29 @@ http://www.gnu.org/licenses/gpl.txt --%> <%@ include file="/common/taglibs.jsp" %> +<%@ page import="org.lamsfoundation.lams.tool.rsrc.ResourceConstants"%> + <%@ include file="/common/header.jsp"%> ?mode=${mode}&itemIndex=${itemIndex}&itemUid=${itemUid}&toolSessionID=${toolSessionID}&sessionMapID=${sessionMapID} + + Index: lams_tool_larsrc/web/pages/monitoring/summary.jsp =================================================================== diff -u -r8e090b3ddf269cdffececa4bc55a9333da5b0858 -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_tool_larsrc/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 8e090b3ddf269cdffececa4bc55a9333da5b0858) +++ lams_tool_larsrc/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -59,6 +59,9 @@ "", + + "", + "" ], colModel:[ @@ -71,6 +74,9 @@ {name:'rating', index:'rating', width:200, align:"center"}, + + {name:'comments', index:'comments', width:200, align:"center"}, + {name:'actions', index:'actions', width:120, align:"center"} ], // caption: "${groupSummary.sessionName}", @@ -158,6 +164,18 @@ ${ratingHTML} + + + + + ${commentButtonText} + + +   + + + + jQuery("#group${groupSummary.sessionId}").addRowData(${i.index + 1}, { id: "${i.index + 1}", itemUid: "${item.itemUid}", @@ -168,6 +186,9 @@ rating: '${ratingHTML}', + + comments: '${commentHTML}', + actions: "${changeItemVisibility}" }); Index: lams_tool_leader/web/WEB-INF/tags/Comments.tag =================================================================== diff -u -r2af3df00f43a845436372dd415da5ce02f466024 -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_tool_leader/web/WEB-INF/tags/Comments.tag (.../Comments.tag) (revision 2af3df00f43a845436372dd415da5ce02f466024) +++ lams_tool_leader/web/WEB-INF/tags/Comments.tag (.../Comments.tag) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -3,6 +3,7 @@ <%@ taglib uri="tags-function" prefix="fn" %> <%@ attribute name="toolSessionId" required="true" rtexprvalue="true"%> +<%@ attribute name="toolItemId" required="false" rtexprvalue="true"%> <%@ attribute name="toolSignature" required="true" rtexprvalue="true"%> <%@ attribute name="height" required="false" rtexprvalue="true"%> <%@ attribute name="width" required="false" rtexprvalue="true"%> @@ -11,6 +12,8 @@ <%@ attribute name="readOnly" required="false" rtexprvalue="true"%> <%@ attribute name="pageSize" required="false" rtexprvalue="true"%> <%@ attribute name="sortBy" required="false" rtexprvalue="true"%> +<%@ attribute name="embedInAccordian" required="false" rtexprvalue="true"%> +<%@ attribute name="accordionTitle" required="false" rtexprvalue="true"%> @@ -38,10 +41,33 @@ + + + + + + + + + @@ -282,21 +294,52 @@ + Index: lams_tool_sbmt/web/WEB-INF/tags/Comments.tag =================================================================== diff -u -r1b24571dc2f9958311c8508f68e20711994418bb -r1bf70a335f5b30a1907ccae506908b05374c6c8c --- lams_tool_sbmt/web/WEB-INF/tags/Comments.tag (.../Comments.tag) (revision 1b24571dc2f9958311c8508f68e20711994418bb) +++ lams_tool_sbmt/web/WEB-INF/tags/Comments.tag (.../Comments.tag) (revision 1bf70a335f5b30a1907ccae506908b05374c6c8c) @@ -3,6 +3,7 @@ <%@ taglib uri="tags-function" prefix="fn" %> <%@ attribute name="toolSessionId" required="true" rtexprvalue="true"%> +<%@ attribute name="toolItemId" required="false" rtexprvalue="true"%> <%@ attribute name="toolSignature" required="true" rtexprvalue="true"%> <%@ attribute name="height" required="false" rtexprvalue="true"%> <%@ attribute name="width" required="false" rtexprvalue="true"%> @@ -11,6 +12,8 @@ <%@ attribute name="readOnly" required="false" rtexprvalue="true"%> <%@ attribute name="pageSize" required="false" rtexprvalue="true"%> <%@ attribute name="sortBy" required="false" rtexprvalue="true"%> +<%@ attribute name="embedInAccordian" required="false" rtexprvalue="true"%> +<%@ attribute name="accordionTitle" required="false" rtexprvalue="true"%> @@ -38,10 +41,33 @@ + + + + + + + +