Index: lams_tool_task/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r13b1409e4ba0fde34b29afd6a6908f3f02b9d375 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 13b1409e4ba0fde34b29afd6a6908f3f02b9d375) +++ lams_tool_task/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -113,6 +113,12 @@ monitoring.label.group =Group label.monitoring.heading.access =Learners list label.monitoring.edit.activity.edit =Edit +label.monitoring.summary.lock.when.finished =Lock when finished: +label.monitoring.summary.sequential.order =Sequential order: +label.monitoring.summary.min.number.tasks =Minimum number of tasks to complete: +label.monitoring.summary.allowed.contribute.tasks =Participants are allowed to contribute tasks: +label.monitoring.summary.monitor.verification =Monitor verification: +label.monitoring.summary.notebook.reflection =Notebook Reflection: label.monitoring.summary.overall.summary =Overall Summary label.monitoring.summary.confirm.completion =Confirm Completion label.monitoring.summary.title.reflection =Notebook Entry Index: lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -r13b1409e4ba0fde34b29afd6a6908f3f02b9d375 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 13b1409e4ba0fde34b29afd6a6908f3f02b9d375) +++ lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -113,6 +113,12 @@ monitoring.label.group =Group label.monitoring.heading.access =Learners list label.monitoring.edit.activity.edit =Edit +label.monitoring.summary.lock.when.finished =Lock when finished: +label.monitoring.summary.sequential.order =Sequential order: +label.monitoring.summary.min.number.tasks =Minimum number of tasks to complete: +label.monitoring.summary.allowed.contribute.tasks =Participants are allowed to contribute tasks: +label.monitoring.summary.monitor.verification =Monitor verification: +label.monitoring.summary.notebook.reflection =Notebook Reflection: label.monitoring.summary.overall.summary =Overall Summary label.monitoring.summary.confirm.completion =Confirm Completion label.monitoring.summary.title.reflection =Notebook Entry Index: lams_tool_task/conf/language/rams/ApplicationResources.properties =================================================================== diff -u -r32ec7720d0f823e86af21ffbb817cd096e80f655 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/conf/language/rams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 32ec7720d0f823e86af21ffbb817cd096e80f655) +++ lams_tool_task/conf/language/rams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -114,6 +114,12 @@ monitoring.label.group =Group label.monitoring.heading.access =Learners list label.monitoring.edit.activity.edit =Edit +label.monitoring.summary.lock.when.finished =Lock when finished: +label.monitoring.summary.sequential.order =Sequential order: +label.monitoring.summary.min.number.tasks =Minimum number of tasks to complete: +label.monitoring.summary.allowed.contribute.tasks =Participants are allowed to contribute tasks: +label.monitoring.summary.monitor.verification =Monitor verification: +label.monitoring.summary.notebook.reflection =Notebook Reflection: label.monitoring.summary.overall.summary =Overall Summary label.monitoring.summary.user =User label.monitoring.summary.confirm.completion =Confirm Completion Index: lams_tool_task/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== diff -u -r32ec7720d0f823e86af21ffbb817cd096e80f655 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/conf/language/rams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 32ec7720d0f823e86af21ffbb817cd096e80f655) +++ lams_tool_task/conf/language/rams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -114,6 +114,12 @@ monitoring.label.group =Group label.monitoring.heading.access =Learners list label.monitoring.edit.activity.edit =Edit +label.monitoring.summary.lock.when.finished =Lock when finished: +label.monitoring.summary.sequential.order =Sequential order: +label.monitoring.summary.min.number.tasks =Minimum number of tasks to complete: +label.monitoring.summary.allowed.contribute.tasks =Participants are allowed to contribute tasks: +label.monitoring.summary.monitor.verification =Monitor verification: +label.monitoring.summary.notebook.reflection =Notebook Reflection: label.monitoring.summary.overall.summary =Overall Summary label.monitoring.summary.user =User label.monitoring.summary.confirm.completion =Confirm Completion Index: lams_tool_task/db/model/taskList.clay =================================================================== diff -u -rac170eba5ee70135e473b3a5525d1743d0098bc8 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/db/model/taskList.clay (.../taskList.clay) (revision ac170eba5ee70135e473b3a5525d1743d0098bc8) +++ lams_tool_task/db/model/taskList.clay (.../taskList.clay) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -560,8 +560,8 @@ - + @@ -1052,6 +1052,12 @@ + + + + + + Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/TaskListConstants.java =================================================================== diff -u -reb556ddb82142fad802b26f79504f90d507f4fb3 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/TaskListConstants.java (.../TaskListConstants.java) (revision eb556ddb82142fad802b26f79504f90d507f4fb3) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/TaskListConstants.java (.../TaskListConstants.java) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -65,7 +65,7 @@ public static final String ATTR_RESOURCE_ITEM_UID = "itemUid"; public static final String ATTR_NEXT_ACTIVITY_URL = "nextActivityUrl"; public static final String ATTR_SUMMARY_LIST = "summaryList"; - public static final String ATTR_GROUP_SUMMARY_LIST = "groupSummaryList"; + public static final String ATTR_ITEM_SUMMARY = "itemSummary"; public static final String ATTR_ITEM_SUMMARY_LIST = "itemSummaryList"; public static final String ATTR_USER_LIST = "userList"; public static final String ATTR_FINISH_LOCK = "finishedLock"; Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/GroupSummary.java =================================================================== diff -u -reb556ddb82142fad802b26f79504f90d507f4fb3 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/GroupSummary.java (.../GroupSummary.java) (revision eb556ddb82142fad802b26f79504f90d507f4fb3) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/GroupSummary.java (.../GroupSummary.java) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -29,7 +29,7 @@ import org.lamsfoundation.lams.tool.taskList.model.TaskListItem; /** - * DTO object which is used in a monitoring. Contains information describing current group. + * DTO object used in a monitoring. Contains information for group. * * @author Andrey Balan */ @@ -38,13 +38,10 @@ //Group information. private String sessionName; - private List itemSummaries; + private List taskListItemVisitLogSummaries; - //only for export - private TaskListItem taskListItem; - public GroupSummary() { - itemSummaries = new ArrayList(); + taskListItemVisitLogSummaries = new ArrayList(); } public String getSessionName() { @@ -54,19 +51,12 @@ this.sessionName = sessionName; } - public List getItemSummaries() { - return itemSummaries; + public List getTaskListItemVisitLogSummaries() { + return taskListItemVisitLogSummaries; } - public void setItemSummaries(List itemSummaries) { - this.itemSummaries = itemSummaries; + public void setTaskListItemVisitLogSummaries(List taskListItemVisitLogSummaries) { + this.taskListItemVisitLogSummaries = taskListItemVisitLogSummaries; } - public TaskListItem getTaskListItem() { - return taskListItem; - } - public void setTaskListItem(TaskListItem taskListItem) { - this.taskListItem = taskListItem; - } - } \ No newline at end of file Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/ItemSummary.java =================================================================== diff -u -r39444d1719a438cb33f7201ba98d4b3292ee9fc2 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/ItemSummary.java (.../ItemSummary.java) (revision 39444d1719a438cb33f7201ba98d4b3292ee9fc2) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/ItemSummary.java (.../ItemSummary.java) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -24,142 +24,38 @@ package org.lamsfoundation.lams.tool.taskList.dto; import java.util.ArrayList; -import java.util.Date; import java.util.List; -import org.lamsfoundation.lams.tool.taskList.model.TaskListItemAttachment; -import org.lamsfoundation.lams.tool.taskList.model.TaskListItemComment; -import org.lamsfoundation.lams.tool.taskList.model.TaskListUser; - +import org.lamsfoundation.lams.tool.taskList.model.TaskListItem; + /** - * DTO object which is used in a task summary page in monitoring. Contains - * partial information for TaskSummary object specific for - * current user and TaskLIstItem object. + * DTO object used in a monitoring. Contains information for TaskListItem. * * @author Andrey Balan */ public class ItemSummary { + + private TaskListItem taskListItem; - private TaskListUser user; - private boolean completed; - private Date date; + private List groupSummaries; - private List comments; - private List attachments; - - //using only during export - private ReflectDTO reflectDTO; - public ItemSummary() { - comments = new ArrayList(); - attachments = new ArrayList(); + groupSummaries = new ArrayList(); } - // ********************************************************** - // Get/Set methods - // ********************************************************** - - /** - * Returns user whom created this TaskListItem. - * - * @return user whom created this TaskListItem - */ - public TaskListUser getUser() { - return user; + public List getGroupSummaries() { + return groupSummaries; } - /** - * Returns user whom created this TaskListItem. - * - * @param user user whom created this TaskListItem - */ - public void setUser(TaskListUser user) { - this.user = user; + public void setGroupSummaries(List groupSummaries) { + this.groupSummaries = groupSummaries; } - /** - * Returns whether this TaskListItem was completed. - * - * @return boolean showing whether this TaskListItem was completed or not - */ - public boolean getCompleted() { - return completed; + public TaskListItem getTaskListItem() { + return taskListItem; } - /** - * Sets whether this TaskListItem was completed. - * - * @param completed true if this TaskListItem was completed, false otherwise - */ - public void setCompleted(boolean completed) { - this.completed = completed; + public void setTaskListItem(TaskListItem taskListItem) { + this.taskListItem = taskListItem; } - - /** - * 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; - } - - /** - * Returns ReflectDTO. - * - * @return ReflectDTO - */ - public ReflectDTO getReflectDTO() { - return reflectDTO; - } - /** - * Sets ReflectDTO. - * - * @param reflectDTO ReflectDTO - */ - public void setReflectDTO(ReflectDTO reflectDTO) { - this.reflectDTO = reflectDTO; - } - + } \ No newline at end of file Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/TaskListItemVisitLogSummary.java =================================================================== diff -u --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/TaskListItemVisitLogSummary.java (revision 0) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dto/TaskListItemVisitLogSummary.java (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -0,0 +1,165 @@ +/**************************************************************** + * 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$ */ +package org.lamsfoundation.lams.tool.taskList.dto; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.lamsfoundation.lams.tool.taskList.model.TaskListItemAttachment; +import org.lamsfoundation.lams.tool.taskList.model.TaskListItemComment; +import org.lamsfoundation.lams.tool.taskList.model.TaskListUser; + +/** + * DTO object which is used in a task summary page in monitoring. Contains + * partial information for TaskSummary object specific for + * current user and TaskLIstItem object. + * + * @author Andrey Balan + */ +public class TaskListItemVisitLogSummary { + + private TaskListUser user; + private boolean completed; + private Date date; + + private List comments; + private List attachments; + + //using only during export + private ReflectDTO reflectDTO; + + public TaskListItemVisitLogSummary() { + comments = new ArrayList(); + attachments = new ArrayList(); + } + + // ********************************************************** + // Get/Set methods + // ********************************************************** + + /** + * 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; + } + + /** + * Returns ReflectDTO. + * + * @return ReflectDTO + */ + public ReflectDTO getReflectDTO() { + return reflectDTO; + } + /** + * Sets ReflectDTO. + * + * @param reflectDTO ReflectDTO + */ + public void setReflectDTO(ReflectDTO reflectDTO) { + this.reflectDTO = reflectDTO; + } + +} + \ No newline at end of file Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/ITaskListService.java =================================================================== diff -u -r39444d1719a438cb33f7201ba98d4b3292ee9fc2 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/ITaskListService.java (.../ITaskListService.java) (revision 39444d1719a438cb33f7201ba98d4b3292ee9fc2) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/ITaskListService.java (.../ITaskListService.java) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -35,8 +35,9 @@ import org.lamsfoundation.lams.tool.ToolOutputDefinition; import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.taskList.dto.GroupSummary; -import org.lamsfoundation.lams.tool.taskList.dto.ReflectDTO; import org.lamsfoundation.lams.tool.taskList.dto.ItemSummary; +import org.lamsfoundation.lams.tool.taskList.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.taskList.dto.TaskListItemVisitLogSummary; import org.lamsfoundation.lams.tool.taskList.dto.Summary; import org.lamsfoundation.lams.tool.taskList.model.TaskList; import org.lamsfoundation.lams.tool.taskList.model.TaskListAttachment; @@ -332,15 +333,15 @@ * * @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. @@ -358,7 +359,7 @@ * @param isExportProcessing true if this method called for export, false otherwise * @return */ - List getItemSummary(Long contentId, Long taskListItemUid, boolean isExportProcessing); + ItemSummary getItemSummary(Long contentId, Long taskListItemUid, boolean isExportProcessing); } Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java =================================================================== diff -u -ra3077b21311eada2fc8f2a67ce86e3326e0e367a -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java (.../TaskListServiceImpl.java) (revision a3077b21311eada2fc8f2a67ce86e3326e0e367a) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java (.../TaskListServiceImpl.java) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -85,9 +85,10 @@ import org.lamsfoundation.lams.tool.taskList.dao.TaskListSessionDAO; import org.lamsfoundation.lams.tool.taskList.dao.TaskListUserDAO; import org.lamsfoundation.lams.tool.taskList.dto.GroupSummary; +import org.lamsfoundation.lams.tool.taskList.dto.ItemSummary; import org.lamsfoundation.lams.tool.taskList.dto.ReflectDTO; import org.lamsfoundation.lams.tool.taskList.dto.Summary; -import org.lamsfoundation.lams.tool.taskList.dto.ItemSummary; +import org.lamsfoundation.lams.tool.taskList.dto.TaskListItemVisitLogSummary; import org.lamsfoundation.lams.tool.taskList.model.TaskList; import org.lamsfoundation.lams.tool.taskList.model.TaskListAttachment; import org.lamsfoundation.lams.tool.taskList.model.TaskListCondition; @@ -457,11 +458,13 @@ /** * {@inheritDoc} */ - public List getItemSummary(Long contentId, Long taskListItemUid, boolean isExportProcessing) { + public ItemSummary getItemSummary(Long contentId, Long taskListItemUid, boolean isExportProcessing) { TaskListItem taskListItem = taskListItemDao.getByUid(taskListItemUid); - List groupSummaries = new ArrayList(); + ItemSummary itemSummary = new ItemSummary(); + itemSummary.setTaskListItem(taskListItem); + List groupSummaries = itemSummary.getGroupSummaries(); //create sessionList depending on if taskListItem created be author or created during learning List sessionList = new ArrayList(); @@ -477,32 +480,31 @@ GroupSummary groupSummary = new GroupSummary(); groupSummary.setSessionName(session.getSessionName()); - groupSummary.setTaskListItem(taskListItem); List usersBelongToGroup = taskListUserDao.getBySessionID(session.getSessionId()); for(TaskListUser user : usersBelongToGroup) { - ItemSummary userItemSummary = new ItemSummary(); - userItemSummary.setUser(user); + TaskListItemVisitLogSummary taskListItemVisitLogSummary = new TaskListItemVisitLogSummary(); + taskListItemVisitLogSummary.setUser(user); 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()); + taskListItemVisitLogSummary.setCompleted(visitLog.isComplete()); + if (visitLog.isComplete()) taskListItemVisitLogSummary.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); + if (user.getUserId().equals(comment.getCreateBy().getUserId())) taskListItemVisitLogSummary.getComments().add(comment); } Set itemAttachments = taskListItem.getAttachments(); for(TaskListItemAttachment attachment : itemAttachments) { - if (user.getUserId().equals(attachment.getCreateBy().getUserId())) userItemSummary.getAttachments().add(attachment); + if (user.getUserId().equals(attachment.getCreateBy().getUserId())) taskListItemVisitLogSummary.getAttachments().add(attachment); } } else { - userItemSummary.setCompleted(false); + taskListItemVisitLogSummary.setCompleted(false); } //if we're doing export then fill up all itemSummaries with reflection information @@ -521,22 +523,22 @@ } reflectDTO.setReflectInstructions(session.getTaskList().getReflectInstructions()); - userItemSummary.setReflectDTO(reflectDTO); + taskListItemVisitLogSummary.setReflectDTO(reflectDTO); } - groupSummary.getItemSummaries().add(userItemSummary); + groupSummary.getTaskListItemVisitLogSummaries().add(taskListItemVisitLogSummary); } groupSummaries.add(groupSummary); } - return groupSummaries; + return itemSummary; } /** * {@inheritDoc} */ - public List> exportForTeacher(Long contentId) { + public List exportForTeacher(Long contentId) { TaskList taskList = taskListDao.getByContentId(contentId); ArrayList itemList = new ArrayList(); itemList.addAll(taskList.getTaskListItems()); @@ -551,49 +553,48 @@ } } - List> taskSummaries = new ArrayList>(); + List itemSummaries = new ArrayList(); for(TaskListItem item:itemList) { - taskSummaries.add(getItemSummary(contentId, item.getUid(), true)); + itemSummaries.add(getItemSummary(contentId, item.getUid(), true)); } - return taskSummaries; + return itemSummaries; } /** * {@inheritDoc} */ - public List> exportForLearner(Long sessionId, TaskListUser learner) { + public List exportForLearner(Long sessionId, TaskListUser learner) { Long contentId = getTaskListBySessionId(sessionId).getContentId(); TaskList taskList = taskListDao.getByContentId(contentId); List itemList = getItemListForGroup(contentId, sessionId); - List> eachItemOverallSummaries = new ArrayList>(); + List itemSummaries = new ArrayList(); for(TaskListItem item:itemList) { - eachItemOverallSummaries.add(getItemSummary(contentId, item.getUid(), true)); + itemSummaries.add(getItemSummary(contentId, item.getUid(), true)); } //get rid of information that doesn't belong to the current user - for(List itemOverallSummary:eachItemOverallSummaries) { + for(ItemSummary itemSummary:itemSummaries) { //get rid of groups that user doesn't belong to GroupSummary newGroupSummary = new GroupSummary(); - for(GroupSummary groupSummary:itemOverallSummary) { + for(GroupSummary groupSummary:itemSummary.getGroupSummaries()) { - for(ItemSummary itemSummary:groupSummary.getItemSummaries()) { - if (learner.equals(itemSummary.getUser())) { + for(TaskListItemVisitLogSummary taskListItemVisitLogSummary:groupSummary.getTaskListItemVisitLogSummaries()) { + if (learner.equals(taskListItemVisitLogSummary.getUser())) { newGroupSummary.setSessionName(groupSummary.getSessionName()); - newGroupSummary.setTaskListItem(groupSummary.getTaskListItem()); - newGroupSummary.getItemSummaries().add(itemSummary); + newGroupSummary.getTaskListItemVisitLogSummaries().add(taskListItemVisitLogSummary); } } } - itemOverallSummary.clear(); - itemOverallSummary.add(newGroupSummary); + itemSummary.getGroupSummaries().clear(); + itemSummary.getGroupSummaries().add(newGroupSummary); } - return eachItemOverallSummaries; + return itemSummaries; } /** Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/MonitoringAction.java =================================================================== diff -u -r39444d1719a438cb33f7201ba98d4b3292ee9fc2 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/MonitoringAction.java (.../MonitoringAction.java) (revision 39444d1719a438cb33f7201ba98d4b3292ee9fc2) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/MonitoringAction.java (.../MonitoringAction.java) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -41,8 +41,9 @@ import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.tool.taskList.TaskListConstants; import org.lamsfoundation.lams.tool.taskList.dto.GroupSummary; -import org.lamsfoundation.lams.tool.taskList.dto.ReflectDTO; import org.lamsfoundation.lams.tool.taskList.dto.ItemSummary; +import org.lamsfoundation.lams.tool.taskList.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.taskList.dto.TaskListItemVisitLogSummary; import org.lamsfoundation.lams.tool.taskList.dto.Summary; import org.lamsfoundation.lams.tool.taskList.model.TaskList; import org.lamsfoundation.lams.tool.taskList.model.TaskListSession; @@ -111,11 +112,9 @@ 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, service.getTaskListItemByUid(taskListItemId)); + ItemSummary ItemSummary = service.getItemSummary(contentId, taskListItemId, false); - List groupSummaryList = service.getItemSummary(contentId, taskListItemId, false); - request.setAttribute(TaskListConstants.ATTR_GROUP_SUMMARY_LIST, groupSummaryList); - + request.setAttribute(TaskListConstants.ATTR_ITEM_SUMMARY, ItemSummary); return mapping.findForward(TaskListConstants.SUCCESS); } Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/servlet/ExportServlet.java =================================================================== diff -u -r39444d1719a438cb33f7201ba98d4b3292ee9fc2 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/servlet/ExportServlet.java (.../ExportServlet.java) (revision 39444d1719a438cb33f7201ba98d4b3292ee9fc2) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/servlet/ExportServlet.java (.../ExportServlet.java) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -48,9 +48,10 @@ import org.lamsfoundation.lams.tool.ToolAccessMode; import org.lamsfoundation.lams.tool.taskList.TaskListConstants; import org.lamsfoundation.lams.tool.taskList.dto.GroupSummary; +import org.lamsfoundation.lams.tool.taskList.dto.ItemSummary; import org.lamsfoundation.lams.tool.taskList.dto.ReflectDTO; import org.lamsfoundation.lams.tool.taskList.dto.Summary; -import org.lamsfoundation.lams.tool.taskList.dto.ItemSummary; +import org.lamsfoundation.lams.tool.taskList.dto.TaskListItemVisitLogSummary; import org.lamsfoundation.lams.tool.taskList.model.TaskList; import org.lamsfoundation.lams.tool.taskList.model.TaskListItemAttachment; import org.lamsfoundation.lams.tool.taskList.model.TaskListSession; @@ -172,7 +173,7 @@ throw new TaskListException(error); } - List> itemSummaries = service.exportForLearner(toolSessionID, learner); + List itemSummaries = service.exportForLearner(toolSessionID, learner); saveFileToLocal(itemSummaries, directoryName); @@ -210,7 +211,7 @@ throw new TaskListException(error); } - List> itemSummaries = service.exportForTeacher(toolContentID); + List itemSummaries = service.exportForTeacher(toolContentID); @@ -229,15 +230,15 @@ * @param directoryName * @throws IOException */ - private void saveFileToLocal(List> eachItemOverallSummaries, String directoryName) { + private void saveFileToLocal(List itemSummaries, String directoryName) { handler = getToolContentHandler(); //save all the attachments - for (List itemOverallSummary : eachItemOverallSummaries) { - for (GroupSummary groupSummary : itemOverallSummary) { - for (ItemSummary itemSummary : groupSummary.getItemSummaries()) { + for (ItemSummary itemSummary : itemSummaries) { + for (GroupSummary groupSummary : itemSummary.getGroupSummaries()) { + for (TaskListItemVisitLogSummary taskListItemVisitLogSummary : groupSummary.getTaskListItemVisitLogSummaries()) { - for (TaskListItemAttachment attachment : itemSummary.getAttachments()) { + for (TaskListItemAttachment attachment : taskListItemVisitLogSummary.getAttachments()) { try{ int idx= 1; String userName = attachment.getCreateBy().getLoginName(); Index: lams_tool_task/web/pages/export/itemsummary.jsp =================================================================== diff -u -r39444d1719a438cb33f7201ba98d4b3292ee9fc2 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/web/pages/export/itemsummary.jsp (.../itemsummary.jsp) (revision 39444d1719a438cb33f7201ba98d4b3292ee9fc2) +++ lams_tool_task/web/pages/export/itemsummary.jsp (.../itemsummary.jsp) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -1,4 +1,4 @@ - +

@@ -57,7 +57,7 @@

- +

${groupSummary.sessionName}

@@ -79,16 +79,16 @@ - +
- ${itemSummary.user.loginName} + ${visitLogSummary.user.loginName} - + @@ -99,19 +99,19 @@ - +
    - +
  • - +
  • @@ -134,8 +134,8 @@ - - + +

    ${reflectDTO.fullName}

    Index: lams_tool_task/web/pages/monitoring/itemsummary.jsp =================================================================== diff -u -rac170eba5ee70135e473b3a5525d1743d0098bc8 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/web/pages/monitoring/itemsummary.jsp (.../itemsummary.jsp) (revision ac170eba5ee70135e473b3a5525d1743d0098bc8) +++ lams_tool_task/web/pages/monitoring/itemsummary.jsp (.../itemsummary.jsp) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -7,7 +7,7 @@ <fmt:message key="label.learning.title" /> <%@ include file="/common/header.jsp"%> - + @@ -74,7 +74,7 @@
    - +

    ${groupSummary.sessionName}

    @@ -98,16 +98,16 @@ - +
    - ${itemSummary.user.loginName} + ${visitLogSummary.user.loginName} - + @@ -118,20 +118,20 @@ - +
      - +
    • - +
    • Index: lams_tool_task/web/pages/monitoring/summary.jsp =================================================================== diff -u -rac170eba5ee70135e473b3a5525d1743d0098bc8 -r3f118a66718ff89ec94041602e7e60db6ee06722 --- lams_tool_task/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision ac170eba5ee70135e473b3a5525d1743d0098bc8) +++ lams_tool_task/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 3f118a66718ff89ec94041602e7e60db6ee06722) @@ -1,6 +1,7 @@ <%@ include file="/common/taglibs.jsp"%> + +<%-- Overall TaskList information --%> +
      + + + + On + + + Off + + +
      + + + + + On + + + Off + + +
      + + + + + ${taskList.minimumNumberTasks} + + + Off + + +
      + + + + + On + + + Off + + +
      + + + + + On + + + Off + + +
      + + + + + On + + + Off + + +
      +
      + +<%-- Summary list --%> +
      - -

      ${summary.sessionName}

      +

      ${summary.sessionName}

      @@ -128,8 +199,5 @@
      - - - + -