Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/model/TaskListItem.java =================================================================== diff -u -r19d959536ea84101c37b8a6475bd9c561950b302 -r473da9f790898ea0f8b4fa15f43210882ba60dec --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/model/TaskListItem.java (.../TaskListItem.java) (revision 19d959536ea84101c37b8a6475bd9c561950b302) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/model/TaskListItem.java (.../TaskListItem.java) (revision 473da9f790898ea0f8b4fa15f43210882ba60dec) @@ -84,11 +84,6 @@ public TaskListItem(){ attachments = new HashSet(); comments = new HashSet(); - - // TODO doing this because it will be not visible on the authoring page. - // get rid of this when it'll be defined if it's needs or not finally. - isCommentsFilesAllowed = true; - showCommentsToAll = true; } // ********************************************************** @@ -166,7 +161,7 @@ //********************************************************** /** - * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" * @return Returns the uid. */ public Long getUid() { Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/AuthoringAction.java =================================================================== diff -u -r19d959536ea84101c37b8a6475bd9c561950b302 -r473da9f790898ea0f8b4fa15f43210882ba60dec --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 19d959536ea84101c37b8a6475bd9c561950b302) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 473da9f790898ea0f8b4fa15f43210882ba60dec) @@ -930,9 +930,10 @@ form.setCommentsRequired(item.isCommentsRequired()); form.setFilesAllowed(item.isFilesAllowed()); form.setFilesRequired(item.isFilesRequired()); - //commented out for now. Waiting for the final decision -- if it's gonna be used in Authoring. -// form.setCommentsFilesAllowed(item.isCommentsFilesAllowed()); -// form.setShowCommentsToAll(item.getShowCommentsToAll()); + // The next 2 options always will be true (as it set in jsp). Waiting + // for the final decision -- if this options will be needed later. + form.setCommentsFilesAllowed(item.isCommentsFilesAllowed()); + form.setShowCommentsToAll(item.getShowCommentsToAll()); form.setChildTask(item.isChildTask()); form.setParentTaskName(item.getParentTaskName()); } @@ -980,9 +981,10 @@ item.setCommentsRequired(itemForm.isCommentsRequired()); item.setFilesAllowed(itemForm.isFilesAllowed()); item.setFilesRequired(itemForm.isFilesRequired()); - //commented out for now. Waiting for the final decision -- if it's gonna be used in Authoring. -// item.setCommentsFilesAllowed(itemForm.isCommentsAllowed()); -// item.setShowCommentsToAll(itemForm.getShowCommentsToAll()); + // The next 2 options always will be true (as it set in jsp). Waiting + // for the final decision -- if this options will be needed later. + item.setCommentsFilesAllowed(itemForm.isCommentsFilesAllowed()); + item.setShowCommentsToAll(itemForm.getShowCommentsToAll()); item.setChildTask(itemForm.isChildTask()); item.setParentTaskName(itemForm.getParentTaskName()); } Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/form/TaskListItemForm.java =================================================================== diff -u -r19d959536ea84101c37b8a6475bd9c561950b302 -r473da9f790898ea0f8b4fa15f43210882ba60dec --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/form/TaskListItemForm.java (.../TaskListItemForm.java) (revision 19d959536ea84101c37b8a6475bd9c561950b302) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/form/TaskListItemForm.java (.../TaskListItemForm.java) (revision 473da9f790898ea0f8b4fa15f43210882ba60dec) @@ -51,9 +51,10 @@ private boolean isFilesRequired; private boolean isChildTask; - //commented out for now. Waiting for the final decision -- if it's gonna be used in Authoring. -// private boolean isCommentsFilesAllowed; -// private boolean showCommentsToAll; + // The next 2 options always will be true (as it set in jsp). Waiting + // for the final decision -- if this options will be needed later. + private boolean isCommentsFilesAllowed; + private boolean showCommentsToAll; private String parentTaskName; @@ -232,40 +233,41 @@ this.isFilesRequired = isFilesRequired; } - //commented out for now. Waiting for the final decision -- if it's gonna be used in Authoring. -// /** -// * Returns whether comments are allowed in this TaskLiskItem. -// * -// * @return true if comments are allowed in this TaskLiskItem, false otherwise. -// */ -// public boolean isCommentsFilesAllowed() { -// return isCommentsFilesAllowed; -// } -// /** -// * Sets whether comments are allowed in this TaskLiskItem. -// * -// * @param isCommentsAllowed true if comments are allowed in this TaskLiskItem, false otherwise. -// */ -// public void setCommentsFilesAllowed(boolean isCommentsFilesAllowed) { -// this.isCommentsFilesAllowed = isCommentsFilesAllowed; -// } -// -// /** -// * Returns whether comments are allowed to be shown to everybody for this TaskLiskItem. -// * -// * @return true if comments are allowed to be shown to everybody for this TaskLiskItem, false otherwise. -// */ -// public boolean getShowCommentsToAll() { -// return showCommentsToAll; -// } -// /** -// * Sets whether comments are allowed to be shown to everybody for this TaskLiskItem or not. -// * -// * @param showCommentsToAll true if comments are allowed to be shown to everybody for this TaskLiskItem, false otherwise. -// */ -// public void setShowCommentsToAll(boolean showCommentsToAll) { -// this.showCommentsToAll = showCommentsToAll; -// } + // The next 2 options always will be true (as it set in jsp). Waiting + // for the final decision -- if this options will be needed later. + /** + * Returns whether comments are allowed in this TaskLiskItem. + * + * @return true if comments are allowed in this TaskLiskItem, false otherwise. + */ + public boolean isCommentsFilesAllowed() { + return isCommentsFilesAllowed; + } + /** + * Sets whether comments are allowed in this TaskLiskItem. + * + * @param isCommentsAllowed true if comments are allowed in this TaskLiskItem, false otherwise. + */ + public void setCommentsFilesAllowed(boolean isCommentsFilesAllowed) { + this.isCommentsFilesAllowed = isCommentsFilesAllowed; + } + + /** + * Returns whether comments are allowed to be shown to everybody for this TaskLiskItem. + * + * @return true if comments are allowed to be shown to everybody for this TaskLiskItem, false otherwise. + */ + public boolean getShowCommentsToAll() { + return showCommentsToAll; + } + /** + * Sets whether comments are allowed to be shown to everybody for this TaskLiskItem or not. + * + * @param showCommentsToAll true if comments are allowed to be shown to everybody for this TaskLiskItem, false otherwise. + */ + public void setShowCommentsToAll(boolean showCommentsToAll) { + this.showCommentsToAll = showCommentsToAll; + } /** * Returns whether this TaskLiskItem is a child task. Index: lams_tool_task/web/pages/authoring/parts/addtask.jsp =================================================================== diff -u -r19d959536ea84101c37b8a6475bd9c561950b302 -r473da9f790898ea0f8b4fa15f43210882ba60dec --- lams_tool_task/web/pages/authoring/parts/addtask.jsp (.../addtask.jsp) (revision 19d959536ea84101c37b8a6475bd9c561950b302) +++ lams_tool_task/web/pages/authoring/parts/addtask.jsp (.../addtask.jsp) (revision 473da9f790898ea0f8b4fa15f43210882ba60dec) @@ -2,6 +2,18 @@ "http://www.w3.org/TR/html4/loose.dtd"> <%@ include file="/common/taglibs.jsp"%> + + <%@ include file="/common/header.jsp"%> @@ -15,6 +27,10 @@ + + + +

@@ -53,7 +69,7 @@
+ onclick="uncheckIsCommentsRequired(); document.taskListItemForm.commentsRequired.disabled = !document.taskListItemForm.commentsRequired.disabled;">