Index: lams_tool_task/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r23988377bb0a1acee31a9908d19288fa2916546b -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 23988377bb0a1acee31a9908d19288fa2916546b) +++ lams_tool_task/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -129,6 +129,10 @@ label.monitoring.tasksummary.completed =Completed label.monitoring.tasksummary.time.and.date =Time and Date label.monitoring.tasksummary.comments.files =Comments/Files +label.monitoring.tasksummary.comments.allowed =Participants are allowed to add comments +label.monitoring.tasksummary.comments.required =Comments are required to complete the task +label.monitoring.tasksummary.files.allowed =Participants are allowed to add files +label.monitoring.tasksummary.files.required =Files are required to complete the task label.monitoring.instructions.attachments =Attachments message.monitoring.edit.activity.not.editable =This Activity is no longer editable export.title =Export portfolio of Task List Index: lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -r23988377bb0a1acee31a9908d19288fa2916546b -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 23988377bb0a1acee31a9908d19288fa2916546b) +++ lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -116,6 +116,10 @@ label.monitoring.tasksummary.completed =Completed label.monitoring.tasksummary.time.and.date =Time and Date label.monitoring.tasksummary.comments.files =Comments/Files +label.monitoring.tasksummary.comments.allowed =Participants are allowed to add comments +label.monitoring.tasksummary.comments.required =Comments are required to complete the task +label.monitoring.tasksummary.files.allowed =Participants are allowed to add files +label.monitoring.tasksummary.files.required =Files are required to complete the task label.monitoring.instructions.attachments =Attachments message.monitoring.edit.activity.not.editable =This Activity is no longer editable message.monitoring.summary.no.session =No Session Available Index: lams_tool_task/conf/language/rams/ApplicationResources.properties =================================================================== diff -u -r23988377bb0a1acee31a9908d19288fa2916546b -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/conf/language/rams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 23988377bb0a1acee31a9908d19288fa2916546b) +++ lams_tool_task/conf/language/rams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -129,6 +129,10 @@ label.monitoring.tasksummary.completed =Completed label.monitoring.tasksummary.time.and.date =Time and Date label.monitoring.tasksummary.comments.files =Comments/Files +label.monitoring.tasksummary.comments.allowed =Participants are allowed to add comments +label.monitoring.tasksummary.comments.required =Comments are required to complete the task +label.monitoring.tasksummary.files.allowed =Participants are allowed to add files +label.monitoring.tasksummary.files.required =Files are required to complete the task label.monitoring.instructions.attachments =Attachments message.monitoring.edit.activity.not.editable =This Activity is no longer editable export.title =Export portfolio of Task List Index: lams_tool_task/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== diff -u -r23988377bb0a1acee31a9908d19288fa2916546b -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/conf/language/rams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 23988377bb0a1acee31a9908d19288fa2916546b) +++ lams_tool_task/conf/language/rams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -129,6 +129,10 @@ label.monitoring.tasksummary.completed =Completed label.monitoring.tasksummary.time.and.date =Time and Date label.monitoring.tasksummary.comments.files =Comments/Files +label.monitoring.tasksummary.comments.allowed =Participants are allowed to add comments +label.monitoring.tasksummary.comments.required =Comments are required to complete the task +label.monitoring.tasksummary.files.allowed =Participants are allowed to add files +label.monitoring.tasksummary.files.required =Files are required to complete the task label.monitoring.instructions.attachments =Attachments message.monitoring.edit.activity.not.editable =This Activity is no longer editable export.title =Export portfolio of Task List Index: lams_tool_task/conf/xdoclet/struts-actions.xml =================================================================== diff -u -r341a816804f6b2b61a5f180479b56d8fd0d1ea29 -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 341a816804f6b2b61a5f180479b56d8fd0d1ea29) +++ lams_tool_task/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -251,10 +251,10 @@ parameter="summary" > - - + parameter="itemSummary" > + TaskSummary object specific for + * current user and TaskLIstItem object. + * + * @author Andrey Balan + */ +public class ItemSummary { + + //Group information. + private Long sessionId; + private String sessionName; + + private TaskListUser user; + private boolean completed; + private Date date; + + private List comments; + private List attachments; + + public ItemSummary() { + comments = new ArrayList(); + attachments = new ArrayList(); + } + + // ********************************************************** + // Get/Set methods + // ********************************************************** + + public Long getSessionId() { + return sessionId; + } + public void setSessionId(Long sessionId) { + this.sessionId = sessionId; + } + + public String getSessionName() { + return sessionName; + } + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + /** + * Returns user whom created this TaskListItem. + * + * @return user whom created this TaskListItem + */ + public TaskListUser getUser() { + return user; + } + /** + * Returns user whom created this TaskListItem. + * + * @param user user whom created this TaskListItem + */ + public void setUser(TaskListUser user) { + this.user = user; + } + + /** + * Returns whether this TaskListItem was completed. + * + * @return boolean showing whether this TaskListItem was completed or not + */ + public boolean getCompleted() { + return completed; + } + /** + * Sets whether this TaskListItem was completed. + * + * @param completed true if this TaskListItem was completed, false otherwise + */ + public void setCompleted(boolean completed) { + this.completed = completed; + } + + /** + * Returns the date of the completion. + * + * @return the date of the completion + */ + public Date getDate() { + return date; + } + /** + * Sets the date of the completion. + * + * @param date the date of the completion + */ + public void setDate(Date date) { + this.date = date; + } + + /** + * Returns list of the comments done by this user for this particular TaskListItem. + * + * @return list of the comments done by this user for this particular TaskListItem + */ + public List getComments() { + return comments; + } + /** + * Sets list of the comments done by this user for this particular TaskListItem. + * + * @param comments list of the comments done by this user for this particular TaskListItem + */ + public void setComments(List comments) { + this.comments = comments; + } + + /** + * Returns list of the attachments uploaded by this user for this particular TaskListItem. + * + * @return list of the attachments uploaded by this user for this particular TaskListItem + */ + public List getAttachments() { + return attachments; + } + /** + * Sets list of the attachments uploaded by this user for this particular TaskListItem. + * + * @param attachments list of the attachments uploaded by this user for this particular TaskListItem. + */ + public void setAttachments(List attachments) { + this.attachments = attachments; + } + +} + \ No newline at end of file Fisheye: Tag 51dd63725c1359785962a1c8a08382540d9e2343 refers to a dead (removed) revision in file `lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/TaskSummary.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 51dd63725c1359785962a1c8a08382540d9e2343 refers to a dead (removed) revision in file `lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/TaskSummaryItem.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/ITaskListService.java =================================================================== diff -u -r23988377bb0a1acee31a9908d19288fa2916546b -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/ITaskListService.java (.../ITaskListService.java) (revision 23988377bb0a1acee31a9908d19288fa2916546b) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/ITaskListService.java (.../ITaskListService.java) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -35,8 +35,8 @@ import org.lamsfoundation.lams.tool.ToolOutputDefinition; import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.taskList.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.taskList.dto.ItemSummary; import org.lamsfoundation.lams.tool.taskList.dto.Summary; -import org.lamsfoundation.lams.tool.taskList.dto.TaskSummary; import org.lamsfoundation.lams.tool.taskList.model.TaskList; import org.lamsfoundation.lams.tool.taskList.model.TaskListAttachment; import org.lamsfoundation.lams.tool.taskList.model.TaskListCondition; @@ -324,23 +324,23 @@ * * @return */ - List exportForLearner(Long contentUid, TaskListUser learner); + List exportForLearner(Long contentUid, TaskListUser learner); /** * Make an export for the whole TaskList. * * @param contentUid * @return */ - List exportForTeacher(Long contentUid); + List exportForTeacher(Long contentUid); /** * Return summary list for the specified TaskList. Used in monitoring. * * @param contentId specified TaskList uid * @return */ - List getSummary(Long contentId); + List getTaskListSummary(Long contentId); /** * Return task summary for the specified TaskListItem. Used in monitoring. @@ -349,7 +349,7 @@ * @param taskListItemUid specified TaskListItem uid * @return */ - TaskSummary getTaskSummary(Long contentId, Long taskListItemUid); + List> getTaskListItemSummary(Long contentId, Long taskListItemUid); } Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java =================================================================== diff -u -re65f05fe41e968ab4e1d94b9512bd2b948a91a7f -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java (.../TaskListServiceImpl.java) (revision e65f05fe41e968ab4e1d94b9512bd2b948a91a7f) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java (.../TaskListServiceImpl.java) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -84,8 +84,7 @@ import org.lamsfoundation.lams.tool.taskList.dao.TaskListUserDAO; import org.lamsfoundation.lams.tool.taskList.dto.ReflectDTO; import org.lamsfoundation.lams.tool.taskList.dto.Summary; -import org.lamsfoundation.lams.tool.taskList.dto.TaskSummary; -import org.lamsfoundation.lams.tool.taskList.dto.TaskSummaryItem; +import org.lamsfoundation.lams.tool.taskList.dto.ItemSummary; import org.lamsfoundation.lams.tool.taskList.model.TaskList; import org.lamsfoundation.lams.tool.taskList.model.TaskListAttachment; import org.lamsfoundation.lams.tool.taskList.model.TaskListCondition; @@ -423,7 +422,7 @@ /** * {@inheritDoc} */ - public List getSummary(Long contentId) { + public List getTaskListSummary(Long contentId) { List summaryList = new ArrayList(); @@ -525,134 +524,136 @@ /** * {@inheritDoc} */ - public TaskSummary getTaskSummary(Long contentId, Long taskListItemUid) { + public List> getTaskListItemSummary(Long contentId, Long taskListItemUid) { TaskListItem taskListItem = taskListItemDao.getByUid(taskListItemUid); - ArrayList userList = new ArrayList(); - + List> resultSummaryList = new ArrayList>(); + + //create the user list of all whom were started this task List sessionList = taskListSessionDao.getByContentId(contentId); - //create the user list of all whom were started this task for(TaskListSession session:sessionList) { - List newUsers = taskListUserDao.getBySessionID(session.getSessionId()); - for(TaskListUser user : newUsers) { - if (!userList.contains(user)) userList.add(user); - } - } - - List taskSummaryItems = new ArrayList(); - for (int i = 0; i < userList.size(); i++) { - TaskListUser user = userList.get(i); - TaskSummaryItem taskSummaryItem = new TaskSummaryItem(); - taskSummaryItems.add(taskSummaryItem); - taskSummaryItem.setUser(user); + List groupSummary = new ArrayList(); - TaskListItemVisitLog visitLog = taskListItemVisitDao.getTaskListItemLog(taskListItem.getUid(), user.getUserId()); - //If TaskListItemVisitLog exists then fill up taskSummaryItem otherwise put false in a completed field - if (visitLog !=null) { - taskSummaryItem.setCompleted(visitLog.isComplete()); - if (visitLog.isComplete()) taskSummaryItem.setDate(visitLog.getAccessDate()); + List grouppedUsers = taskListUserDao.getBySessionID(session.getSessionId()); + for(TaskListUser user : grouppedUsers) { - //fill up with comments and attachments made by this user - Set itemComments = taskListItem.getComments(); - for(TaskListItemComment comment : itemComments) { - if (user.equals(comment.getCreateBy())) taskSummaryItem.getComments().add(comment); - } + ItemSummary userItemSummary = new ItemSummary(); + userItemSummary.setUser(user); + userItemSummary.setSessionId(session.getSessionId()); + userItemSummary.setSessionName(session.getSessionName()); + + TaskListItemVisitLog visitLog = taskListItemVisitDao.getTaskListItemLog(taskListItem.getUid(), user.getUserId()); + //If TaskListItemVisitLog exists then fill up taskSummaryItem otherwise put false in a completed field + if (visitLog !=null) { + userItemSummary.setCompleted(visitLog.isComplete()); + if (visitLog.isComplete()) userItemSummary.setDate(visitLog.getAccessDate()); + + //fill up with comments and attachments made by this user + Set itemComments = taskListItem.getComments(); + for(TaskListItemComment comment : itemComments) { + if (user.getUserId().equals(comment.getCreateBy().getUserId())) userItemSummary.getComments().add(comment); + } - Set itemAttachments = taskListItem.getAttachments(); - for(TaskListItemAttachment attachment : itemAttachments) { - if (user.equals(attachment.getCreateBy())) taskSummaryItem.getAttachments().add(attachment); - } + Set itemAttachments = taskListItem.getAttachments(); + for(TaskListItemAttachment attachment : itemAttachments) { + if (user.getUserId().equals(attachment.getCreateBy().getUserId())) userItemSummary.getAttachments().add(attachment); + } - } else { - taskSummaryItem.setCompleted(false); + } else { + userItemSummary.setCompleted(false); + } + groupSummary.add(userItemSummary); } + resultSummaryList.add(groupSummary); } - TaskSummary taskSummary = new TaskSummary(taskListItem, taskSummaryItems); - return taskSummary; + + return resultSummaryList; } /** * {@inheritDoc} */ - public List exportForTeacher(Long contentId) { - TaskList taskList = taskListDao.getByContentId(contentId); - ArrayList itemList = new ArrayList(); - itemList.addAll(taskList.getTaskListItems()); - - //retrieve all the sessions associated with this taskList - List sessionList = taskListSessionDao.getByContentId(contentId); - //create the list containing all taskListItems - for(TaskListSession session:sessionList) { - Set newItems = session.getTaskListItems(); - for(TaskListItem item : newItems) { - if (!itemList.contains(item)) itemList.add(item); - } - } - - List taskSummaries = new ArrayList(); - for(TaskListItem item:itemList) { - taskSummaries.add(getTaskSummary(contentId, item.getUid())); - } - - return taskSummaries; + public List exportForTeacher(Long contentId) { +// TaskList taskList = taskListDao.getByContentId(contentId); +// ArrayList itemList = new ArrayList(); +// itemList.addAll(taskList.getTaskListItems()); +// +// //retrieve all the sessions associated with this taskList +// List sessionList = taskListSessionDao.getByContentId(contentId); +// //create the list containing all taskListItems +// for(TaskListSession session:sessionList) { +// Set newItems = session.getTaskListItems(); +// for(TaskListItem item : newItems) { +// if (!itemList.contains(item)) itemList.add(item); +// } +// } +// +// List taskSummaries = new ArrayList(); +// for(TaskListItem item:itemList) { +// taskSummaries.add(getTaskSummary(contentId, item.getUid())); +// } +// +// return taskSummaries; + return null; } /** * {@inheritDoc} */ - public List exportForLearner(Long sessionId, TaskListUser learner) { - Long contentId = getTaskListBySessionId(sessionId).getContentId(); - - TaskList taskList = taskListDao.getByContentId(contentId); - ArrayList itemList = new ArrayList(); - itemList.addAll(taskList.getTaskListItems()); - - //retrieve all the sessions associated with this taskList - List sessionList = taskListSessionDao.getByContentId(contentId); - //create the list containing all taskListItems - for(TaskListSession session:sessionList) { - Set newItems = session.getTaskListItems(); - for(TaskListItem item : newItems) { - if (!itemList.contains(item)) itemList.add(item); - } - } - - List taskSummaries = new ArrayList(); - for(TaskListItem item:itemList) { - taskSummaries.add(getTaskSummary(contentId, item.getUid())); - } - - //get rid of information that is not allowed to be shown to the current user - for(TaskSummary taskSummary:taskSummaries) { - - //get rid of taskSummaryItems belong to another users - List newTaskSummaryItems = new ArrayList(); - for(TaskSummaryItem taskSummaryItem:taskSummary.getTaskSummaryItems()) { - if (learner.equals(taskSummaryItem.getUser())) newTaskSummaryItems.add(taskSummaryItem); - } - taskSummary.setTaskSummaryItems(newTaskSummaryItems); - - //get rid of TaskListItemComments and TaskListItemAttachments belong to another users - if (taskSummary.getTaskListItem().isCommentsFilesAllowed() && !taskSummary.getTaskListItem().getShowCommentsToAll()) { - TaskSummaryItem taskSummaryItem = taskSummary.getTaskSummaryItems().get(0); - - List newComments = new ArrayList(); - for(TaskListItemComment comment:taskSummaryItem.getComments()) { - if (learner.equals(comment.getCreateBy())) newComments.add(comment); - } - taskSummaryItem.setComments(newComments); - - List newAttachments = new ArrayList(); - for(TaskListItemAttachment attachment:taskSummaryItem.getAttachments()) { - if (learner.equals(attachment.getCreateBy())) newAttachments.add(attachment); - } - taskSummaryItem.setAttachments(newAttachments); - } - } - - return taskSummaries; + public List exportForLearner(Long sessionId, TaskListUser learner) { +// Long contentId = getTaskListBySessionId(sessionId).getContentId(); +// +// TaskList taskList = taskListDao.getByContentId(contentId); +// ArrayList itemList = new ArrayList(); +// itemList.addAll(taskList.getTaskListItems()); +// +// //retrieve all the sessions associated with this taskList +// List sessionList = taskListSessionDao.getByContentId(contentId); +// //create the list containing all taskListItems +// for(TaskListSession session:sessionList) { +// Set newItems = session.getTaskListItems(); +// for(TaskListItem item : newItems) { +// if (!itemList.contains(item)) itemList.add(item); +// } +// } +// +// List taskSummaries = new ArrayList(); +// for(TaskListItem item:itemList) { +// taskSummaries.add(getTaskSummary(contentId, item.getUid())); +// } +// +// //get rid of information that is not allowed to be shown to the current user +// for(TaskSummary taskSummary:taskSummaries) { +// +// //get rid of taskSummaryItems belong to another users +// List newTaskSummaryItems = new ArrayList(); +// for(TaskListItemSummary taskSummaryItem:taskSummary.getTaskSummaryItems()) { +// if (learner.equals(taskSummaryItem.getUser())) newTaskSummaryItems.add(taskSummaryItem); +// } +// taskSummary.setTaskSummaryItems(newTaskSummaryItems); +// +// //get rid of TaskListItemComments and TaskListItemAttachments belong to another users +// if (taskSummary.getTaskListItem().isCommentsFilesAllowed() && !taskSummary.getTaskListItem().getShowCommentsToAll()) { +// TaskListItemSummary taskSummaryItem = taskSummary.getTaskSummaryItems().get(0); +// +// List newComments = new ArrayList(); +// for(TaskListItemComment comment:taskSummaryItem.getComments()) { +// if (learner.equals(comment.getCreateBy())) newComments.add(comment); +// } +// taskSummaryItem.setComments(newComments); +// +// List newAttachments = new ArrayList(); +// for(TaskListItemAttachment attachment:taskSummaryItem.getAttachments()) { +// if (learner.equals(attachment.getCreateBy())) newAttachments.add(attachment); +// } +// taskSummaryItem.setAttachments(newAttachments); +// } +// } +// +// return taskSummaries; + return null; } /** Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/MonitoringAction.java =================================================================== diff -u -r341a816804f6b2b61a5f180479b56d8fd0d1ea29 -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/MonitoringAction.java (.../MonitoringAction.java) (revision 341a816804f6b2b61a5f180479b56d8fd0d1ea29) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/MonitoringAction.java (.../MonitoringAction.java) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -41,8 +41,8 @@ import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.tool.taskList.TaskListConstants; import org.lamsfoundation.lams.tool.taskList.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.taskList.dto.ItemSummary; import org.lamsfoundation.lams.tool.taskList.dto.Summary; -import org.lamsfoundation.lams.tool.taskList.dto.TaskSummary; import org.lamsfoundation.lams.tool.taskList.model.TaskList; import org.lamsfoundation.lams.tool.taskList.model.TaskListSession; import org.lamsfoundation.lams.tool.taskList.model.TaskListUser; @@ -62,8 +62,8 @@ if (param.equals("summary")) { return summary(mapping, form, request, response); } - if (param.equals("summaryTask")) { - return summaryTask(mapping, form, request, response); + if (param.equals("itemSummary")) { + return itemSummary(mapping, form, request, response); } if(param.equals("setVerifiedByMonitor")){ return setVerifiedByMonitor(mapping, form, request, response); @@ -96,27 +96,26 @@ TaskList taskList = service.getTaskListByContentId(contentId); taskList.toDTO(); - List summaryList = service.getSummary(contentId); + List summaryList = service.getTaskListSummary(contentId); //cache into sessionMap - sessionMap.put(TaskListConstants.ATTR_TASK_SUMMARY_LIST, summaryList); + sessionMap.put(TaskListConstants.ATTR_SUMMARY_LIST, summaryList); sessionMap.put(TaskListConstants.PAGE_EDITABLE, taskList.isContentInUse()); sessionMap.put(TaskListConstants.ATTR_RESOURCE, taskList); sessionMap.put(TaskListConstants.ATTR_TOOL_CONTENT_ID, contentId); return mapping.findForward(TaskListConstants.SUCCESS); } - private ActionForward summaryTask(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + private ActionForward itemSummary(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { ITaskListService service = getTaskListService(); Long contentId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); Long taskListItemId = WebUtil.readLongParam(request, TaskListConstants.ATTR_TASK_LIST_ITEM_UID); -// request.setAttribute(TaskListConstants.ATTR_TASK_LIST_ITEM_UID, contentId); + request.setAttribute(TaskListConstants.ATTR_TASK_LIST_ITEM, service.getTaskListItemByUid(taskListItemId)); - TaskSummary taskSummary = service.getTaskSummary(contentId, taskListItemId); - request.setAttribute(TaskListConstants.ATTR_TASK_SUMMARY, taskSummary); - request.setAttribute("taskSummary", taskSummary); + List> itemSummaryList = service.getTaskListItemSummary(contentId, taskListItemId); + request.setAttribute(TaskListConstants.ATTR_ITEM_SUMMARY_LIST_LIST, itemSummaryList); return mapping.findForward(TaskListConstants.SUCCESS); } Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/servlet/ExportServlet.java =================================================================== diff -u -r12a0e5152335f664f19ad5b1449633f7fec6b8a9 -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/servlet/ExportServlet.java (.../ExportServlet.java) (revision 12a0e5152335f664f19ad5b1449633f7fec6b8a9) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/servlet/ExportServlet.java (.../ExportServlet.java) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -42,8 +42,8 @@ import org.apache.log4j.Logger; import org.lamsfoundation.lams.tool.ToolAccessMode; import org.lamsfoundation.lams.tool.taskList.TaskListConstants; -import org.lamsfoundation.lams.tool.taskList.dto.TaskSummary; -import org.lamsfoundation.lams.tool.taskList.dto.TaskSummaryItem; +import org.lamsfoundation.lams.tool.taskList.dto.Summary; +import org.lamsfoundation.lams.tool.taskList.dto.ItemSummary; import org.lamsfoundation.lams.tool.taskList.model.TaskList; import org.lamsfoundation.lams.tool.taskList.model.TaskListItemAttachment; import org.lamsfoundation.lams.tool.taskList.model.TaskListSession; @@ -164,12 +164,12 @@ throw new TaskListException(error); } - List taskSummaries = service.exportForLearner(toolSessionID, learner); + List taskSummaries = service.exportForLearner(toolSessionID, learner); saveFileToLocal(taskSummaries, directoryName); sessionMap.put(TaskListConstants.ATTR_TITLE, content.getTitle()); - sessionMap.put(TaskListConstants.ATTR_TASK_SUMMARY_LIST, taskSummaries); +// sessionMap.put(TaskListConstants.ATTR_TASK_SUMMARY_LIST, taskSummaries); } /** @@ -201,13 +201,13 @@ throw new TaskListException(error); } - List taskSummaries = service.exportForTeacher(toolContentID); + List taskSummaries = service.exportForTeacher(toolContentID); saveFileToLocal(taskSummaries, directoryName); // put it into HTTPSession sessionMap.put(TaskListConstants.ATTR_TITLE, content.getTitle()); - sessionMap.put(TaskListConstants.ATTR_TASK_SUMMARY_LIST, taskSummaries); +// sessionMap.put(TaskListConstants.ATTR_TASK_SUMMARY_LIST, taskSummaries); } /** @@ -217,33 +217,33 @@ * @param directoryName * @throws IOException */ - private void saveFileToLocal(List taskSummaries, String directoryName) { + private void saveFileToLocal(List taskSummaries, String directoryName) { handler = getToolContentHandler(); //save all the attachments - for (TaskSummary taskSummary : taskSummaries) { - for (TaskSummaryItem taskSummaryItem : taskSummary.getTaskSummaryItems()) { - for (TaskListItemAttachment attachment : taskSummaryItem.getAttachments()) { - try{ - int idx= 1; - String userName = attachment.getCreateBy().getLoginName(); - String localDir; - while(true){ - localDir = FileUtil.getFullPath(directoryName,userName + "/" + idx); - File local = new File(localDir); - if(!local.exists()){ - local.mkdirs(); - break; - } - idx++; - } - attachment.setAttachmentLocalUrl(userName + "/" + idx + "/" + attachment.getFileUuid() + '.' + FileUtil.getFileExtension(attachment.getFileName())); - handler.saveFile(attachment.getFileUuid(), FileUtil.getFullPath(directoryName, attachment.getAttachmentLocalUrl())); - } catch (Exception e) { - logger.error("Export forum topic attachment failed: " + e.toString()); - } - } - } + for (ItemSummary taskSummary : taskSummaries) { +// for (ItemSummary taskSummaryItem : taskSummary.getTaskSummaryItems()) { +// for (TaskListItemAttachment attachment : taskSummaryItem.getAttachments()) { +// try{ +// int idx= 1; +// String userName = attachment.getCreateBy().getLoginName(); +// String localDir; +// while(true){ +// localDir = FileUtil.getFullPath(directoryName,userName + "/" + idx); +// File local = new File(localDir); +// if(!local.exists()){ +// local.mkdirs(); +// break; +// } +// idx++; +// } +// attachment.setAttachmentLocalUrl(userName + "/" + idx + "/" + attachment.getFileUuid() + '.' + FileUtil.getFileExtension(attachment.getFileName())); +// handler.saveFile(attachment.getFileUuid(), FileUtil.getFullPath(directoryName, attachment.getAttachmentLocalUrl())); +// } catch (Exception e) { +// logger.error("Export forum topic attachment failed: " + e.toString()); +// } +// } +// } } } Index: lams_tool_task/web/pages/learning/parts/itemlist.jsp =================================================================== diff -u -re65f05fe41e968ab4e1d94b9512bd2b948a91a7f -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/web/pages/learning/parts/itemlist.jsp (.../itemlist.jsp) (revision e65f05fe41e968ab4e1d94b9512bd2b948a91a7f) +++ lams_tool_task/web/pages/learning/parts/itemlist.jsp (.../itemlist.jsp) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -91,7 +91,7 @@
- + Index: lams_tool_task/web/pages/monitoring/itemsummary.jsp =================================================================== diff -u --- lams_tool_task/web/pages/monitoring/itemsummary.jsp (revision 0) +++ lams_tool_task/web/pages/monitoring/itemsummary.jsp (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -0,0 +1,167 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + <fmt:message key="label.learning.title" /> + + <%@ include file="/common/header.jsp"%> + + + + + +
+ +

+ +

+ +
+ + + + () + +
+
+ + +
    + +
  • + (: ${item.parentTaskName}) +
  • +
    + + +
  • + +
  • +
    + + +
      +
    • + +
    • +
    +
    + + +
  • + +
  • +
    + + +
      +
    • + +
    • +
    +
    +
+
+
+
+ + + +

${itemSummaryList[0].sessionName}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + ? + + + + +
+ ${itemSummary.user.loginName} + + + + + + + + + + + + + + +
    + +
  • + +
  • +
    + + +
  • + + + + + + + + + +
  • +
    +
+
+ + +
+ + +
+ + + + + + +
Index: lams_tool_task/web/pages/monitoring/statistic.jsp =================================================================== diff -u -ra370ee2f7fe049337ac7b342e0218bdde3f3ee68 -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/web/pages/monitoring/statistic.jsp (.../statistic.jsp) (revision a370ee2f7fe049337ac7b342e0218bdde3f3ee68) +++ lams_tool_task/web/pages/monitoring/statistic.jsp (.../statistic.jsp) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -1,51 +1,58 @@ <%@ include file="/common/taglibs.jsp"%> - + - - -
- -
-
- + +
+ +
+
+ + <%-- display group name on first row--%> - - - - - +

${summary.sessionName}

+ +
- - - - - -
+ + + + + + + - + + + + + + + + + + + + + + +
+ + + + + +
+
+ +
+
+ ${item.title} + + ${item.createBy.loginName} + + ${summary.visitNumbers[status.index]} +
+ + + - - - -
- -
- - -
- - - - ${item.title} - - - ${item.createBy.loginName} - - - ${summary.visitNumbers[status.index]} - - - - - - Index: lams_tool_task/web/pages/monitoring/summary.jsp =================================================================== diff -u -r9c5284945798a4bfc0048ad1bbbd7f6c104fc179 -r51dd63725c1359785962a1c8a08382540d9e2343 --- lams_tool_task/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 9c5284945798a4bfc0048ad1bbbd7f6c104fc179) +++ lams_tool_task/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 51dd63725c1359785962a1c8a08382540d9e2343) @@ -1,10 +1,10 @@ <%@ include file="/common/taglibs.jsp"%> - + -
-

${summary.sessionName}

-

Fisheye: Tag 51dd63725c1359785962a1c8a08382540d9e2343 refers to a dead (removed) revision in file `lams_tool_task/web/pages/monitoring/summaryTask.jsp'. Fisheye: No comparison available. Pass `N' to diff?