Index: lams_build/lib/lams/lams.jar =================================================================== diff -u -r260f167585ffb5b4db7b021294782607437aed4a -r5b6e51b5d96619f619209830fdab0ed1ef572c05 Binary files differ Index: lams_central/web/images/icons/exclamation.png =================================================================== diff -u -r38d257ae9ba914964511a4a8fa1f51d5ace5af2e -r5b6e51b5d96619f619209830fdab0ed1ef572c05 Binary files differ Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/ContributionTypes.java =================================================================== diff -u -rc135649b64e98c9233da20bdcfb7689598116314 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_common/src/java/org/lamsfoundation/lams/learningdesign/ContributionTypes.java (.../ContributionTypes.java) (revision c135649b64e98c9233da20bdcfb7689598116314) +++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/ContributionTypes.java (.../ContributionTypes.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -40,4 +40,6 @@ public static final Integer SYSTEM_GATE = new Integer(8); public static final Integer CHOSEN_BRANCHING = new Integer(9); public static final Integer CONDITION_GATE = new Integer(10); + // Tool activity was opened for editing but not closed properly + public static final Integer CONTENT_EDITED = new Integer(11); } Index: lams_common/src/java/org/lamsfoundation/lams/tool/ToolContentManager.java =================================================================== diff -u -r15045d0b9b0dbb930f42a9da7757207e7a325341 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_common/src/java/org/lamsfoundation/lams/tool/ToolContentManager.java (.../ToolContentManager.java) (revision 15045d0b9b0dbb930f42a9da7757207e7a325341) +++ lams_common/src/java/org/lamsfoundation/lams/tool/ToolContentManager.java (.../ToolContentManager.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -120,4 +120,9 @@ * Finds title entered in the tool content. */ public String getToolContentTitle(Long toolContentId); + + /** + * Is an activity being edited by Monitor? + */ + public boolean isContentEdited(Long toolContentId); } \ No newline at end of file Index: lams_common/src/java/org/lamsfoundation/lams/tool/service/ILamsCoreToolService.java =================================================================== diff -u -rda9d623352f3964daa5fe12f81a683b9377d286a -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_common/src/java/org/lamsfoundation/lams/tool/service/ILamsCoreToolService.java (.../ILamsCoreToolService.java) (revision da9d623352f3964daa5fe12f81a683b9377d286a) +++ lams_common/src/java/org/lamsfoundation/lams/tool/service/ILamsCoreToolService.java (.../ILamsCoreToolService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -31,6 +31,7 @@ import org.lamsfoundation.lams.learningdesign.ToolActivity; import org.lamsfoundation.lams.lesson.Lesson; import org.lamsfoundation.lams.tool.Tool; +import org.lamsfoundation.lams.tool.ToolAccessMode; import org.lamsfoundation.lams.tool.ToolOutput; import org.lamsfoundation.lams.tool.ToolOutputDefinition; import org.lamsfoundation.lams.tool.ToolSession; @@ -343,6 +344,8 @@ */ String getToolContributionURL(Long lessonID, Activity activity) throws LamsToolServiceException; + boolean isContentEdited(Activity activity); + /** * Return the moderate url for monitoring. * @@ -351,7 +354,9 @@ * @return the tool access url with tool content id */ String getToolModerateURL(ToolActivity activity) throws LamsToolServiceException; - + + String getToolAuthorURL(Long lessonID, ToolActivity activity, ToolAccessMode mode); + /** * Get all the tool sessions for a lesson. The resulting list is not sorted. * Index: lams_common/src/java/org/lamsfoundation/lams/tool/service/LamsCoreToolService.java =================================================================== diff -u -rda9d623352f3964daa5fe12f81a683b9377d286a -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_common/src/java/org/lamsfoundation/lams/tool/service/LamsCoreToolService.java (.../LamsCoreToolService.java) (revision da9d623352f3964daa5fe12f81a683b9377d286a) +++ lams_common/src/java/org/lamsfoundation/lams/tool/service/LamsCoreToolService.java (.../LamsCoreToolService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -36,6 +36,7 @@ import org.lamsfoundation.lams.lesson.Lesson; import org.lamsfoundation.lams.tool.SystemTool; import org.lamsfoundation.lams.tool.Tool; +import org.lamsfoundation.lams.tool.ToolAccessMode; import org.lamsfoundation.lams.tool.ToolAdapterContentManager; import org.lamsfoundation.lams.tool.ToolContent; import org.lamsfoundation.lams.tool.ToolContentIDGenerator; @@ -613,6 +614,20 @@ return null; } + @Override + public String getToolAuthorURL(Long lessonID, ToolActivity activity, ToolAccessMode mode) { + String url = activity.getTool().getAuthorUrl(); + url = WebUtil.appendParameterToURL(url, AttributeNames.PARAM_TOOL_CONTENT_ID, activity.getToolContentId() + .toString()); + // should have used LessonService, but reusing existing tools is just easier + Lesson lesson = (Lesson) toolContentDAO.find(Lesson.class, lessonID); + url = WebUtil.appendParameterToURL(url, AttributeNames.PARAM_CONTENT_FOLDER_ID, lesson.getLearningDesign() + .getContentFolderID()); + + url = WebUtil.appendParameterToURL(url, AttributeNames.PARAM_MODE, mode.toString()); + return url; + } + /** * Add the user id to the url */ @@ -668,4 +683,13 @@ return context.getBean(tool.getServiceName()); } + @Override + public boolean isContentEdited(Activity activity) { + if (activity.isToolActivity()) { + ToolActivity toolActivity = (ToolActivity) activity; + ToolContentManager toolService = (ToolContentManager) findToolService(toolActivity.getTool()); + return toolService.isContentEdited(toolActivity.getToolContentId()); + } + return false; + } } Index: lams_monitoring/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -rc08a7a63990c6885343e526466ffb36d760bbe9e -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_monitoring/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision c08a7a63990c6885343e526466ffb36d760bbe9e) +++ lams_monitoring/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -234,8 +234,10 @@ lesson.task.gate =Permission Gate lesson.task.grouping =Choose Grouping lesson.task.branching =Instructor Chosen Branching +lesson.task.content.edited =Content being edited button.task.go =Go button.task.go.tooltip =Complete this task now +lesson.task.attention =This activity requires attention lesson.monitors =Monitors lesson.remove.alert =You have selected to remove this lesson. Removed lessons can not be retrieved again. Continue? lesson.remove.doublecheck.alert =WARNING: This lesson is about to be removed! Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/ContributeDTOFactory.java =================================================================== diff -u -rc135649b64e98c9233da20bdcfb7689598116314 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/ContributeDTOFactory.java (.../ContributeDTOFactory.java) (revision c135649b64e98c9233da20bdcfb7689598116314) +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/ContributeDTOFactory.java (.../ContributeDTOFactory.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -24,17 +24,22 @@ /* $Id$ */ package org.lamsfoundation.lams.monitoring; +import java.util.Collections; +import java.util.LinkedList; import java.util.Vector; import org.lamsfoundation.lams.learningdesign.Activity; import org.lamsfoundation.lams.learningdesign.ComplexActivity; import org.lamsfoundation.lams.learningdesign.ContributionTypes; +import org.lamsfoundation.lams.learningdesign.GateActivity; import org.lamsfoundation.lams.learningdesign.SimpleActivity; import org.lamsfoundation.lams.learningdesign.ToolActivity; import org.lamsfoundation.lams.learningdesign.strategy.ComplexActivityStrategy; import org.lamsfoundation.lams.learningdesign.strategy.IContributionTypeStrategy; import org.lamsfoundation.lams.learningdesign.strategy.SimpleActivityStrategy; import org.lamsfoundation.lams.monitoring.dto.ContributeActivityDTO; +import org.lamsfoundation.lams.monitoring.dto.ContributeActivityDTO.ContributeEntry; +import org.lamsfoundation.lams.tool.ToolAccessMode; import org.lamsfoundation.lams.tool.exception.LamsToolServiceException; import org.lamsfoundation.lams.tool.service.ILamsCoreToolService; import org.lamsfoundation.lams.util.WebUtil; @@ -52,23 +57,36 @@ ContributeActivityDTO dto = null; SimpleActivityStrategy strategy = activity.getSimpleActivityStrategy(); if (strategy != null) { - dto = addContributionURLS(lessonID, activity, strategy, toolService); + dto = ContributeDTOFactory.addContributionURLS(lessonID, activity, strategy, toolService); } return dto; } private static ContributeActivityDTO addContributionURLS(Long lessonID, Activity activity, IContributionTypeStrategy strategy, ILamsCoreToolService toolService) { ContributeActivityDTO dto = null; - Integer[] contributionType = strategy.getContributionType(); - if (contributionType.length > 0) { + LinkedList contributionType = new LinkedList(); + Collections.addAll(contributionType, strategy.getContributionType()); + + // check for activities being edited by Monitor + if (toolService.isContentEdited(activity)) { + contributionType.add(ContributionTypes.CONTENT_EDITED); + } + + if (!contributionType.isEmpty()) { dto = new ContributeActivityDTO(activity); - for (int i = 0; i < contributionType.length; i++) { - Integer contributionTypeEntry = contributionType[i]; - String url = getURL(lessonID, activity, contributionTypeEntry, toolService); - dto.addContribution(contributionTypeEntry, url); + for (Integer contributionTypeEntry : contributionType) { + String url = ContributeDTOFactory.getURL(lessonID, activity, contributionTypeEntry, toolService); + ContributeEntry entry = dto.addContribution(contributionTypeEntry, url); + + // once a gate was opened, it does not require attention + if (ContributionTypes.PERMISSION_GATE.equals(contributionTypeEntry) + && ((GateActivity) activity).getGateOpen()) { + entry.setIsComplete(true); + } } } + return dto; } @@ -80,6 +98,8 @@ ToolActivity toolActivity = (ToolActivity) activity; if (contributionTypeEntry.equals(ContributionTypes.MODERATION)) { url = toolService.getToolModerateURL(toolActivity); + } else if (contributionTypeEntry.equals(ContributionTypes.CONTENT_EDITED)) { + url = toolService.getToolAuthorURL(lessonID, toolActivity, ToolAccessMode.TEACHER); } } @@ -102,8 +122,8 @@ ContributeActivityDTO dto = null; ComplexActivityStrategy strategy = activity.getComplexActivityStrategy(); if (strategy != null) { - dto = addContributionURLS(lessonID, activity, strategy, toolService); - if (childActivities != null && childActivities.size() > 0) { + dto = ContributeDTOFactory.addContributionURLS(lessonID, activity, strategy, toolService); + if ((childActivities != null) && (childActivities.size() > 0)) { if (dto == null) { dto = new ContributeActivityDTO(activity); } Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/dto/ContributeActivityDTO.java =================================================================== diff -u -rc135649b64e98c9233da20bdcfb7689598116314 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/dto/ContributeActivityDTO.java (.../ContributeActivityDTO.java) (revision c135649b64e98c9233da20bdcfb7689598116314) +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/dto/ContributeActivityDTO.java (.../ContributeActivityDTO.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -109,15 +109,18 @@ return parentActivityID; } - public void addContribution(Integer contributionType, String url) { + public ContributeEntry addContribution(Integer contributionType, String url) { ContributeEntry entry = new ContributeEntry(); entry.setContributionType(contributionType); entry.setURL(url); contributeEntries.add(entry); + return entry; } public class ContributeEntry { private Boolean isRequired; + private Boolean isComplete = false; + private Integer contributionType; private String url; @@ -130,10 +133,11 @@ public void setContributionType(Integer contributionType) { this.contributionType = contributionType; - boolean isReq = contributionType != null + boolean isReq = (contributionType != null) && (contributionType.equals(ContributionTypes.PERMISSION_GATE) - || contributionType.equals(ContributionTypes.CHOSEN_GROUPING) || contributionType - .equals(ContributionTypes.CHOSEN_BRANCHING)); + || contributionType.equals(ContributionTypes.CHOSEN_GROUPING) + || contributionType.equals(ContributionTypes.CHOSEN_BRANCHING) + || contributionType.equals(ContributionTypes.CONTENT_EDITED)); this.isRequired = new Boolean(isReq); } @@ -152,6 +156,13 @@ public void setURL(String url) { this.url = url; } - } + public Boolean getIsComplete() { + return isComplete; + } + + public void setIsComplete(Boolean isComplete) { + this.isComplete = isComplete; + } + } } Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/ContributeActivitiesProcessor.java =================================================================== diff -u -r1af4378c901cea902392d4ef17f9d990f25e16f3 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/ContributeActivitiesProcessor.java (.../ContributeActivitiesProcessor.java) (revision 1af4378c901cea902392d4ef17f9d990f25e16f3) +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/ContributeActivitiesProcessor.java (.../ContributeActivitiesProcessor.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -38,89 +38,87 @@ import org.lamsfoundation.lams.tool.exception.LamsToolServiceException; import org.lamsfoundation.lams.tool.service.ILamsCoreToolService; -/** - * Generate a hierachy of contribute activities, that can then be serialised by WDDX - * and sent to Flash. This is used to build the todo list. +/** + * Generate a hierachy of contribute activities, that can then be serialised and sent to Monitoring. This is used to + * build the todo list. * - * Works by creating a series of activity list (implemented as vectors to make WDDX happy). - * We start out with the activity list which will contain all the top level activities. - * This starts off as the "current activity list". + * Works by creating a series of activity list. We start out with the + * activity list which will contain all the top level activities. This starts off as the "current activity list". * - * When a complex activity is encountered, put the "current activity list" on the - * "activity lists stack" and create a new "current activity list". When a complex - * activity is ended, assign the "current activity list" to complex activity's DTO ( - * as this is its children) and set the "current activity list" to the top - * list on the stack (which will be either the main list or the list for the parent - * of the complex activity). + * When a complex activity is encountered, put the "current activity list" on the "activity lists stack" and create a + * new "current activity list". When a complex activity is ended, assign the "current activity list" to complex + * activity's DTO (as this is its children) and set the "current activity list" to the top list on the stack (which + * will be either the main list or the list for the parent of the complex activity). * - * When a simple actiivty is encountered, it is converted to a DTO and put in the "current - * activity list". So the activity list doesn't have to care where it is in the heirarchy - the - * "current activity list" will either be for its parent activity or the main list - * for the overall sequence. + * When a simple activity is encountered, it is converted to a DTO and put in the "current activity list". So the + * activity list doesn't have to care where it is in the heirarchy - the "current activity list" will either be for its + * parent activity or the main list for the overall sequence. * - * Once the design has been parsed, the overall tree of activities can be accessed via - * getMainActivityList(), which returns the list created right at the start of the process. - * + * Once the design has been parsed, the overall tree of activities can be accessed via getMainActivityList(), which + * returns the list created right at the start of the process. + * * Note: The collections used by this class are not synchronised. * - * @author Fiona Malikoff + * @author Fiona Malikoff, Marcin Cieslak */ public class ContributeActivitiesProcessor extends LearningDesignProcessor { - Vector mainActivityList; - ArrayStack activityListStack; - Vector currentActivityList; - ILamsCoreToolService toolService; - Long lessonID; - - public ContributeActivitiesProcessor(LearningDesign design, Long lessonID, - IActivityDAO activityDAO, ILamsCoreToolService toolService) { - super(design, activityDAO); - this.lessonID = lessonID; - this.toolService = toolService; - this.mainActivityList = new Vector(); - this.activityListStack = new ArrayStack(5); - this.currentActivityList = mainActivityList; - } + Vector mainActivityList; + ArrayStack activityListStack; + Vector currentActivityList; + ILamsCoreToolService toolService; + Long lessonID; - public Vector getMainActivityList() { - return mainActivityList; - } + public ContributeActivitiesProcessor(LearningDesign design, Long lessonID, IActivityDAO activityDAO, + ILamsCoreToolService toolService) { + super(design, activityDAO); + this.lessonID = lessonID; + this.toolService = toolService; + this.mainActivityList = new Vector(); + this.activityListStack = new ArrayStack(5); + this.currentActivityList = mainActivityList; + } - public boolean startComplexActivity(ComplexActivity activity) { - - // Create a new current activity list, putting the old current one on the stack. - activityListStack.push(currentActivityList); - currentActivityList = new Vector(); - return true; - } + public Vector getMainActivityList() { + return mainActivityList; + } - public void endComplexActivity(ComplexActivity activity) { + @Override + public boolean startComplexActivity(ComplexActivity activity) { - ContributeActivityDTO dto = null; - // always attempt to get a dto, as some branching activities require contribution. - dto = ContributeDTOFactory.getContributeActivityDTO(lessonID, activity, toolService, currentActivityList); - - currentActivityList = (Vector) activityListStack.pop(); - if ( dto != null) { - currentActivityList.add(dto); - } - } + // Create a new current activity list, putting the old current one on the stack. + activityListStack.push(currentActivityList); + currentActivityList = new Vector(); + return true; + } - public void startSimpleActivity(SimpleActivity activity) { - // nothing to do - everything done by the end - } + @Override + public void endComplexActivity(ComplexActivity activity) { - public void endSimpleActivity(SimpleActivity activity) throws LearningDesignProcessorException { - try { - ContributeActivityDTO dto = ContributeDTOFactory.getContributeActivityDTO(lessonID, activity, toolService); - if ( dto != null ) { - currentActivityList.add(dto); - } - } catch ( LamsToolServiceException e) { - throw new LearningDesignProcessorException(e); - } + ContributeActivityDTO dto = null; + // always attempt to get a dto, as some branching activities require contribution. + dto = ContributeDTOFactory.getContributeActivityDTO(lessonID, activity, toolService, currentActivityList); + + currentActivityList = (Vector) activityListStack.pop(); + if (dto != null) { + currentActivityList.add(dto); } - + } -} + @Override + public void startSimpleActivity(SimpleActivity activity) { + // nothing to do - everything done by the end + } + + @Override + public void endSimpleActivity(SimpleActivity activity) throws LearningDesignProcessorException { + try { + ContributeActivityDTO dto = ContributeDTOFactory.getContributeActivityDTO(lessonID, activity, toolService); + if (dto != null) { + currentActivityList.add(dto); + } + } catch (LamsToolServiceException e) { + throw new LearningDesignProcessorException(e); + } + } +} \ No newline at end of file Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/MonitoringAction.java =================================================================== diff -u -r284923f86a16bfc0fa2681918f532b1eb12ac8b9 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/MonitoringAction.java (.../MonitoringAction.java) (revision 284923f86a16bfc0fa2681918f532b1eb12ac8b9) +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/MonitoringAction.java (.../MonitoringAction.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Date; +import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Locale; @@ -92,6 +93,9 @@ import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + /** *

* The action servlet that provide all the monitoring functionalities. It interact with the teacher via flash and JSP @@ -704,7 +708,6 @@ return null; } - @SuppressWarnings("unchecked") public ActionForward getDictionaryXML(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { @@ -825,25 +828,7 @@ .getServletContext()); monitoringService.checkOwnerOrStaffMember(user.getUserID(), lessonId, "monitor lesson"); - List contributeActivities = monitoringService.getAllContributeActivityDTO(lessonId); - if (contributeActivities != null) { - List requiredContributeActivities = new ArrayList(); - for (ContributeActivityDTO contributeActivity : contributeActivities) { - if (contributeActivity.getContributeEntries() != null) { - for (ContributeActivityDTO.ContributeEntry contributeEntry : contributeActivity - .getContributeEntries()) { - if (contributeEntry.getIsRequired()) { - requiredContributeActivities.add(contributeActivity); - } - } - } - } - if (!requiredContributeActivities.isEmpty()) { - request.setAttribute("contributeActivities", requiredContributeActivities); - } - } - // should info box on Sequence tab be displayed? Short sequenceTabInfoShowCount = (Short) ss.getAttribute("sequenceTabInfoShowCount"); if (sequenceTabInfoShowCount == null) { @@ -862,6 +847,7 @@ lessonDTO.getOrganisationID()); request.setAttribute("notificationsAvailable", organisation.getEnableCourseNotifications()); request.setAttribute("lesson", lessonDTO); + return mapping.findForward("monitorLesson"); } @@ -998,6 +984,12 @@ indfm.format(tzStartDate) + " " + user.getTimeZone().getDisplayName(userLocale)); } + List contributeActivities = getContributeActivities(lessonId); + if (contributeActivities != null) { + Gson gson = new GsonBuilder().create(); + responseJSON.put("contributeActivities", new JSONArray(gson.toJson(contributeActivities))); + } + response.setContentType("application/json;charset=utf-8"); response.getWriter().write(responseJSON.toString()); return null; @@ -1070,6 +1062,12 @@ responseJSON.put("activities", new JSONArray(activitiesMap.values())); responseJSON.put("numberPossibleLearners", lessonDetails.getNumberPossibleLearners()); + List contributeActivities = getContributeActivities(lessonId); + if (contributeActivities != null) { + Gson gson = new GsonBuilder().create(); + responseJSON.put("contributeActivities", new JSONArray(gson.toJson(contributeActivities))); + } + response.setContentType("application/json;charset=utf-8"); response.getWriter().write(responseJSON.toString()); @@ -1342,4 +1340,32 @@ return (parentActivity != null) && (parentActivity.getParentActivity() != null) && parentActivity.getParentActivity().getActivityId().equals(branchingActivityId); } + + private List getContributeActivities(Long lessonId) { + IMonitoringService monitoringService = MonitoringServiceProxy.getMonitoringService(getServlet() + .getServletContext()); + List contributeActivities = monitoringService.getAllContributeActivityDTO(lessonId); + + if (contributeActivities != null) { + List resultContributeActivities = new ArrayList(); + for (ContributeActivityDTO contributeActivity : contributeActivities) { + if (contributeActivity.getContributeEntries() != null) { + Iterator entryIterator = contributeActivity + .getContributeEntries().iterator(); + while (entryIterator.hasNext()) { + ContributeActivityDTO.ContributeEntry contributeEntry = entryIterator.next(); + if (!contributeEntry.getIsRequired() || contributeEntry.getIsComplete()) { + entryIterator.remove(); + } + } + + if (!contributeActivity.getContributeEntries().isEmpty()) { + resultContributeActivities.add(contributeActivity); + } + } + } + return resultContributeActivities; + } + return null; + } } \ No newline at end of file Index: lams_monitoring/web/css/monitorLesson.css =================================================================== diff -u -re5ac63b3c8f4c12996668e9efa54e9aaf50d69df -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_monitoring/web/css/monitorLesson.css (.../monitorLesson.css) (revision e5ac63b3c8f4c12996668e9efa54e9aaf50d69df) +++ lams_monitoring/web/css/monitorLesson.css (.../monitorLesson.css) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -140,6 +140,10 @@ display: none; } +table#tabLessonTable #contributeHeader { + display: none; +} + table#tabLessonTable td.contributeActivityCell { padding: 0 0 0 5px; font-weight: bold; Index: lams_monitoring/web/includes/javascript/monitorLesson.js =================================================================== diff -u -r284923f86a16bfc0fa2681918f532b1eb12ac8b9 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision 284923f86a16bfc0fa2681918f532b1eb12ac8b9) +++ lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -1,40 +1,40 @@ // ********** GLOBAL VARIABLES ********** // copy of lesson/branching SVG so it does no need to be fetched every time // HTML with SVG of the lesson -var originalSequenceCanvas = null; +var originalSequenceCanvas = null, // DIV container for lesson/branching SVG // it gets accessed so many times it's worth to cache it here -var sequenceCanvas = null; + sequenceCanvas = null, // ID of currently shown branching activity; if NULL, the whole lesson is shown -var sequenceBranchingId = null; + sequenceBranchingId = null, // info box show timeout -var sequenceInfoTimeout = 10000; + sequenceInfoTimeout = 10000, // how learners in pop up lists are currently sorted -var sortOrderAsc = { - learnerGroup : false, - classLearner : false, - classMonitor : false -}; + sortOrderAsc = { + learnerGroup : false, + classLearner : false, + classMonitor : false + }, // container for learners' progress bars metadata -var bars = null; + bars = null, // placeholder for single learner's progress bar and title -var learnerProgressCellsTemplate = null; + learnerProgressCellsTemplate = null, // for synchronisation purposes -var learnersRefreshInProgress = false; -var sequenceRefreshInProgress = false; + learnersRefreshInProgress = false, + sequenceRefreshInProgress = false, // total number of learners with ongoing progress -var numberActiveLearners = 0; + numberActiveLearners = 0, // page in Learners tab -var learnerProgressCurrentPageNumber = 1; + learnerProgressCurrentPageNumber = 1, // search phrase in Learners tab -var learnersSearchPhrase = null; + learnersSearchPhrase = null, //auto refresh all tabs every 30 seconds -var autoRefreshInterval = 30 * 1000; -var autoRefreshIntervalObject = null; + autoRefreshInterval = 30 * 1000, + autoRefreshIntervalObject = null, // when user is doing something, do not auto refresh -var autoRefreshBlocked = false; + autoRefreshBlocked = false; // ********* GENERAL TABS FUNCTIONS ********* @@ -400,6 +400,8 @@ startDateField.text(response.startDate).css('display','inline'); break; } + + updateContributeActivities(response.contributeActivities); } }); @@ -513,6 +515,38 @@ $('#copyLearnerURL').show(); } +function updateContributeActivities(contributeActivities) { + $('.contributeRow').remove(); + var header = $('#contributeHeader'); + if (contributeActivities) { + var row = header; + $.each(contributeActivities, function(){ + var cell = $('').addClass('contributeActivityCell').text(this.title); + row = $('').addClass('contributeRow').insertAfter(row).append(cell); + + $.each(this.contributeEntries, function(){ + var entryContent = ''; + switch(this.contributionType) { + case 3 : entryContent = LABELS.CONTRIBUTE_GATE; break; + case 6 : entryContent = LABELS.CONTRIBUTE_GROUPING; break; + case 9 : entryContent = LABELS.CONTRIBUTE_BRANCHING; break; + case 11 : entryContent = LABELS.CONTRIBUTE_CONTENT_EDITED; break; + } + entryContent += '' + LABELS.CONTRIBUTE_BUTTON + ''; + cell = $('').addClass('contributeEntryCell').html(entryContent); + row = $('').addClass('contributeRow').insertAfter(row).append(cell); + }); + }); + } + if ($('.contributeRow').length == 0) { + header.hide(); + } else { + header.show(); + } +} + //********** SEQUENCE TAB FUNCTIONS ********** /** @@ -707,11 +741,11 @@ // if it was faded out by showBranchingSequence() .fadeIn(); - var canvasHeight = sequenceCanvas.height(); - var canvasWidth = sequenceCanvas.width(); - var svg = $('svg', sequenceCanvas); - var canvasPaddingTop = canvasHeight/2 - svg.attr('height')/2; - var canvasPaddingLeft = canvasWidth/2 - svg.attr('width')/2; + var canvasHeight = sequenceCanvas.height(), + canvasWidth = sequenceCanvas.width(), + svg = $('svg', sequenceCanvas), + canvasPaddingTop = canvasHeight/2 - svg.attr('height')/2, + canvasPaddingLeft = canvasWidth/2 - svg.attr('width')/2; if (canvasPaddingTop > 0) { sequenceCanvas.css({ @@ -752,28 +786,37 @@ // remove the loading animation $('img#sequenceCanvasLoading', sequenceTopButtonsContainer).remove(); - var learnerCount = 0; - $.each(response.activities, function(){ - if (this.learners) { - // are there any learners in this or any activity? - learnerCount += this.learners.length; - // put learner icons on each activity shape - addLearnerIcons(this); + var learnerCount = 0, + reloadSVG = false; + $.each(response.activities, function(index, activity){ + // are there any learners in this or any activity? + learnerCount += activity.learners ? activity.learners.length : 0; + if (response.contributeActivities) { + $.each(response.contributeActivities, function(){ + if (activity.id == this.activityID) { + activity.requiresAttention = true; + reloadSVG = true; + return false; + } + }); } + // put learner and attention icons on each activity shape + addActivityIcons(activity); }); - if (learnerCount > 0) { + reloadSVG |= learnerCount > 0; + if (reloadSVG) { // IMPORTANT! Reload SVG, otherwise added icons will not get displayed sequenceCanvas.html(sequenceCanvas.html()); } - var completedLearners = response.completedLearners; - var learnerTotalCount = learnerCount + (completedLearners ? completedLearners.length : 0 ); + var completedLearners = response.completedLearners, + learnerTotalCount = learnerCount + (completedLearners ? completedLearners.length : 0 ); $('#learnersStartedPossibleCell').text(learnerTotalCount + ' / ' + response.numberPossibleLearners); addCompletedLearnerIcons(completedLearners, learnerTotalCount); $.each(response.activities, function(activityIndex, activity){ - addLearnerIconsHandlers(activity); + addActivityIconsHandlers(activity); if (activity.url || activity.isBranching) { // find activity group, if it is not hidden @@ -808,11 +851,11 @@ // check all activities and "users who finished lesson" bar $('rect[id^="act"], g polygon', sequenceCanvas).add('#completedLearnersContainer').each(function(){ // find which activity learner was dropped on - var act = $(this); - var actX = act.offset().left; - var actY = act.offset().top; - var actWidth = act.width(); - var actHeight = act.height(); + var act = $(this), + actX = act.offset().left, + actY = act.offset().top, + actWidth = act.width(), + actHeight = act.height(); if (!actWidth) { actWidth = +act.attr('width'); actHeight = +act.attr('height'); @@ -823,8 +866,8 @@ actWidth = +polygonPoints[5].split(',')[0] - +polygonPoints[2].split(',')[0]; actHeight = +polygonPoints[0].split(',')[1] - +polygonPoints[3].split(',')[1]; } - var actEndX = actX + actWidth; - var actEndY = actY + actHeight; + var actEndX = actX + actWidth, + actEndY = actY + actHeight; if (x >= actX && x<= actEndX && y>= actY && y<=actEndY) { var targetActivityId = null; @@ -914,9 +957,12 @@ /** - * Draw user icons on top of activities. + * Draw user and attention icons on top of activities. */ -function addLearnerIcons(activity) { +function addActivityIcons(activity) { + if (!activity.learners && !activity.requiresAttention) { + return; + } var isGate = false, actX = null, actY = null, @@ -942,59 +988,73 @@ // add group of users icon var actRightBorder = actX + (isGate? 40 : +activityShape.attr('width')), - groupTitle = activity.learners.length + ' ' + LABELS.LEARNER_GROUP_COUNT - + ' ' + LABELS.LEARNER_GROUP_SHOW, - // if icons do not fit in shape anymore, show a group icon - element = appendXMLElement('image', { - 'id' : 'act' + activity.id + 'learnerGroup', - 'x' : actRightBorder - 19, - 'y' : actY + 1, - 'height' : 16, - 'width' : 16, - 'xlink:href' : LAMS_URL + 'images/icons/group.png' - }, null, activityGroup[0]); - appendXMLElement('title', null, groupTitle, element); - // add a small number telling how many learners are in the group - element = appendXMLElement('text', { - 'id' : 'act' + activity.id + 'learnerGroupText', - 'x' : actRightBorder - 10, - 'y' : actY + 24, - 'text-anchor': 'middle', - 'font-family': 'Verdana', - 'font-size' : 8 - }, activity.learners.length, activityGroup[0]); - appendXMLElement('title', null, groupTitle, element); + actBottomBorder = actY + (isGate? 50 : +activityShape.attr('height')); + if (activity.learners){ + var groupTitle = activity.learners.length + ' ' + LABELS.LEARNER_GROUP_COUNT + ' ' + LABELS.LEARNER_GROUP_SHOW, + // if icons do not fit in shape anymore, show a group icon + element = appendXMLElement('image', { + 'id' : 'act' + activity.id + 'learnerGroup', + 'x' : actRightBorder - 19, + 'y' : actY + 1, + 'height' : 16, + 'width' : 16, + 'xlink:href' : LAMS_URL + 'images/icons/group.png' + }, null, activityGroup[0]); + appendXMLElement('title', null, groupTitle, element); + // add a small number telling how many learners are in the group + element = appendXMLElement('text', { + 'id' : 'act' + activity.id + 'learnerGroupText', + 'x' : actRightBorder - 10, + 'y' : actY + 24, + 'text-anchor': 'middle', + 'font-family': 'Verdana', + 'font-size' : 8 + }, activity.learners.length, activityGroup[0]); + appendXMLElement('title', null, groupTitle, element); + + var actTooltip = LABELS.LEARNER_GROUP_LIST_TITLE; + // draw single user icons for the first few + if (!isGate) { + $.each(activity.learners, function(learnerIndex, learner){ + var learnerDisplayName = getLearnerDisplayName(learner); + actTooltip += '\n' + learnerDisplayName; + + if (learnerIndex < 7) { + element = appendXMLElement('image', { + 'id' : 'act' + activity.id + 'learner' + learner.id, + 'x' : actX + learnerIndex*15, + 'y' : actY, + 'height' : 16, + 'width' : 16, + 'xlink:href' : LAMS_URL + 'images/icons/user.png' + }, null, activityGroup[0]); + appendXMLElement('title', null, learnerDisplayName, element); + } + }); + } + + appendXMLElement('title', null, actTooltip, activityGroup[0]); + } - var actTooltip = LABELS.LEARNER_GROUP_LIST_TITLE; - // draw single user icons for the first few - if (!isGate) { - $.each(activity.learners, function(learnerIndex, learner){ - var learnerDisplayName = getLearnerDisplayName(learner); - actTooltip += '\n' + learnerDisplayName; - - if (learnerIndex < 7) { - element = appendXMLElement('image', { - 'id' : 'act' + activity.id + 'learner' + learner.id, - 'x' : actX + learnerIndex*15, - 'y' : actY, - 'height' : 16, - 'width' : 16, - 'xlink:href' : LAMS_URL + 'images/icons/user.png' - }, null, activityGroup[0]); - appendXMLElement('title', null, learnerDisplayName, element); - } - }); + if (activity.requiresAttention) { + var element = appendXMLElement('image', { + 'id' : 'act' + activity.id + 'attention', + 'x' : actRightBorder - 19, + 'y' : actBottomBorder - 19, + 'height' : 16, + 'width' : 16, + 'xlink:href' : LAMS_URL + 'images/icons/exclamation.png' + }, null, activityGroup[0]); + appendXMLElement('title', null, LABELS.CONTRIBUTE_ATTENTION, element); } - - appendXMLElement('title', null, actTooltip, activityGroup[0]); } /** - * After SVG refresh, add click/dblclick/drag handlers to user icons. + * After SVG refresh, add click/dblclick/drag handlers to icons. */ -function addLearnerIconsHandlers(activity) { - if (!activity.learners) { +function addActivityIconsHandlers(activity) { + if (!activity.learners && !activity.requiresAttention) { return; } @@ -1006,52 +1066,62 @@ // gate activity does not allows users' view var usersViewable = $('polygon', activityGroup).length == 0; - $.each(activity.learners, function(learnerIndex, learner){ - var learnerIcon = $('image[id="act' + activity.id + 'learner' + learner.id + '"]' - ,activityGroup); - learnerIcon .css('cursor', 'pointer') - // drag learners to force complete activities - .draggable({ - 'appendTo' : '#tabSequence', - 'containment' : '#tabSequence', - 'distance' : 20, - 'scroll' : false, - 'cursorAt' : {'left' : 10, 'top' : 15}, - 'helper' : function(event){ - // copy of the icon for dragging - return $('').attr('src', LAMS_URL + 'images/icons/user.png'); - }, - 'start' : function(){ - autoRefreshBlocked = true; - }, - 'stop' : function(event, ui) { - // jQuery droppable does not work for SVG, so this is a workaround - forceComplete(activity.id, learner.id, getLearnerDisplayName(learner, true), - ui.offset.left, ui.offset.top); + if (activity.learners){ + $.each(activity.learners, function(learnerIndex, learner){ + var learnerIcon = $('image[id="act' + activity.id + 'learner' + learner.id + '"]', activityGroup) + .css('cursor', 'pointer') + // drag learners to force complete activities + .draggable({ + 'appendTo' : '#tabSequence', + 'containment' : '#tabSequence', + 'distance' : 20, + 'scroll' : false, + 'cursorAt' : {'left' : 10, 'top' : 15}, + 'helper' : function(event){ + // copy of the icon for dragging + return $('').attr('src', LAMS_URL + 'images/icons/user.png'); + }, + 'start' : function(){ + autoRefreshBlocked = true; + }, + 'stop' : function(event, ui) { + // jQuery droppable does not work for SVG, so this is a workaround + forceComplete(activity.id, learner.id, getLearnerDisplayName(learner, true), + ui.offset.left, ui.offset.top); + } + }); + + if (usersViewable) { + learnerIcon.dblclick(function(event){ + // double click on learner icon to see activity from his perspective + event.stopPropagation(); + var url = LAMS_URL + 'monitoring/monitoring.do?method=getLearnerActivityURL&userID=' + + learner.id + '&activityID=' + activity.id + '&lessonID=' + lessonId; + openPopUp(url, "LearnActivity", 600, 800, true); + }); } }); - if (usersViewable) { - learnerIcon.dblclick(function(event){ + + var learnerGroupIcon = $('*[id^="act' + activity.id + 'learnerGroup"]', activityGroup); + // 0 is for no group icon, 2 is for icon + digits + if (learnerGroupIcon.length == 2) { + var activityName = $('text[id^="TextElement"]', activityGroup).text(); + learnerGroupIcon.dblclick(function(event){ // double click on learner icon to see activity from his perspective event.stopPropagation(); - var url = LAMS_URL + 'monitoring/monitoring.do?method=getLearnerActivityURL&userID=' - + learner.id + '&activityID=' + activity.id + '&lessonID=' + lessonId; - openPopUp(url, "LearnActivity", 600, 800, true); + showLearnerGroupDialog(activity.id, activityName, activity.learners, true, usersViewable); }); } - }); + } - - var learnerGroupIcon = $('*[id^="act' + activity.id + 'learnerGroup"]', activityGroup); - // 0 is for no group icon, 2 is for icon + digits - if (learnerGroupIcon.length == 2) { - var activityName = $('text[id^="TextElement"]', activityGroup).text(); - learnerGroupIcon.dblclick(function(event){ - // double click on learner icon to see activity from his perspective + if (activity.requiresAttention){ + var attentionIcon = $('*[id^="act' + activity.id + 'attention"]', activityGroup); + attentionIcon.click(function(event){ event.stopPropagation(); - showLearnerGroupDialog(activity.id, activityName, activity.learners, true, usersViewable); - }) + // switch to first tab where attention prompts are listed + $('#tabs').tabs('select', 0); + }); } } Index: lams_monitoring/web/monitor.jsp =================================================================== diff -u -r78c30a573fad76cfbaca06810da1ec4f5bf7e6a8 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_monitoring/web/monitor.jsp (.../monitor.jsp) (revision 78c30a573fad76cfbaca06810da1ec4f5bf7e6a8) +++ lams_monitoring/web/monitor.jsp (.../monitor.jsp) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -82,10 +82,16 @@ EXPORT_PORTFOLIO_LEARNER_TOOLTIP : '', TIME_CHART : '', TIME_CHART_TOOLTIP : '', - LIVE_EDIT_CONFIRM : '' + LIVE_EDIT_CONFIRM : '', + CONTRIBUTE_GATE : '', + CONTRIBUTE_GROUPING : '', + CONTRIBUTE_BRANCHING : '', + CONTRIBUTE_CONTENT_EDITED : '', + CONTRIBUTE_TOOLTIP : '', + CONTRIBUTE_BUTTON : '', + CONTRIBUTE_ATTENTION : '' } - $(document).ready(function(){ initTabs(); initLessonTab(); @@ -275,44 +281,42 @@ /> - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java =================================================================== diff -u -r6e5d1ff4891084bef035cb865c1a395e3eb49ab0 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java (.../AssessmentServiceImpl.java) (revision 6e5d1ff4891084bef035cb865c1a395e3eb49ab0) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java (.../AssessmentServiceImpl.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -1413,7 +1413,12 @@ public ToolOutput getToolOutput(String name, Long toolSessionId, Long learnerId) { return assessmentOutputFactory.getToolOutput(name, this, toolSessionId, learnerId); } + + public boolean isContentEdited(Long toolContentId) { + return getAssessmentByContentId(toolContentId).isDefineLater(); + } + /* ===============Methods implemented from ToolContentImport102Manager =============== */ /** Index: lams_tool_bbb/src/java/org/lamsfoundation/lams/tool/bbb/service/BbbService.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_bbb/src/java/org/lamsfoundation/lams/tool/bbb/service/BbbService.java (.../BbbService.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_bbb/src/java/org/lamsfoundation/lams/tool/bbb/service/BbbService.java (.../BbbService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -25,35 +25,20 @@ package org.lamsfoundation.lams.tool.bbb.service; import java.io.BufferedReader; -import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; import org.apache.commons.codec.digest.DigestUtils; -import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; -import org.apache.struts.upload.FormFile; -import org.lamsfoundation.lams.contentrepository.AccessDeniedException; -import org.lamsfoundation.lams.contentrepository.ICredentials; -import org.lamsfoundation.lams.contentrepository.ITicket; -import org.lamsfoundation.lams.contentrepository.InvalidParameterException; -import org.lamsfoundation.lams.contentrepository.LoginException; -import org.lamsfoundation.lams.contentrepository.NodeKey; -import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; -import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException; import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; -import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; -import org.lamsfoundation.lams.contentrepository.service.SimpleCredentials; import org.lamsfoundation.lams.learning.service.ILearnerService; import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; @@ -74,15 +59,13 @@ import org.lamsfoundation.lams.tool.bbb.model.BbbSession; import org.lamsfoundation.lams.tool.bbb.model.BbbUser; import org.lamsfoundation.lams.tool.bbb.util.BbbException; -import org.lamsfoundation.lams.tool.bbb.util.BbbToolContentHandler; import org.lamsfoundation.lams.tool.bbb.util.BbbUtil; import org.lamsfoundation.lams.tool.bbb.util.Constants; import org.lamsfoundation.lams.tool.exception.DataMissingException; import org.lamsfoundation.lams.tool.exception.SessionDataExistsException; import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.service.ILamsToolService; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; -import org.lamsfoundation.lams.util.audit.IAuditService; /** * An implementation of the IBbbService interface. @@ -311,6 +294,10 @@ return getBbbByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getBbbByContentId(toolContentId).isDefineLater(); + } + /* IBbbService Methods */ public Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry) { Index: lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/service/ChatService.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/service/ChatService.java (.../ChatService.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/service/ChatService.java (.../ChatService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -346,6 +346,10 @@ public String getToolContentTitle(Long toolContentId) { return getChatByContentId(toolContentId).getTitle(); } + + public boolean isContentEdited(Long toolContentId) { + return getChatByContentId(toolContentId).isDefineLater(); + } /* IChatService Methods */ public Long getDefaultContentIdBySignature(String toolSignature) { Index: lams_tool_daco/src/java/org/lamsfoundation/lams/tool/daco/service/DacoServiceImpl.java =================================================================== diff -u -rbb597b8155375e6ac4dfe280f630d323b6e5e575 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_daco/src/java/org/lamsfoundation/lams/tool/daco/service/DacoServiceImpl.java (.../DacoServiceImpl.java) (revision bb597b8155375e6ac4dfe280f630d323b6e5e575) +++ lams_tool_daco/src/java/org/lamsfoundation/lams/tool/daco/service/DacoServiceImpl.java (.../DacoServiceImpl.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -624,6 +624,10 @@ return getDacoByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getDacoByContentId(toolContentId).isDefineLater(); + } + public DacoUser getUser(Long uid) { return (DacoUser) dacoUserDao.getObject(DacoUser.class, uid); } Index: lams_tool_eadventure/src/java/org/eucm/lams/tool/eadventure/service/EadventureServiceImpl.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_eadventure/src/java/org/eucm/lams/tool/eadventure/service/EadventureServiceImpl.java (.../EadventureServiceImpl.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_eadventure/src/java/org/eucm/lams/tool/eadventure/service/EadventureServiceImpl.java (.../EadventureServiceImpl.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -1037,6 +1037,10 @@ return getEadventureByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getEadventureByContentId(toolContentId).isDefineLater(); + } + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException { Eadventure eadventure = eadventureDao.getByContentId(toolContentId); Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java =================================================================== diff -u -rbb597b8155375e6ac4dfe280f630d323b6e5e575 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java (.../ForumService.java) (revision bb597b8155375e6ac4dfe280f630d323b6e5e575) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java (.../ForumService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -962,6 +962,10 @@ return getForumByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getForumByContentId(toolContentId).isDefineLater(); + } + /** * @see org.lamsfoundation.lams.tool.ToolSessionManager#createToolSession(java.lang.Long, java.lang.String, * java.lang.Long) Index: lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/service/GmapService.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/service/GmapService.java (.../GmapService.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/service/GmapService.java (.../GmapService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -354,6 +354,10 @@ return getGmapByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getGmapByContentId(toolContentId).isDefineLater(); + } + /* ********** IGmapService Methods ********************************* */ public Long getDefaultContentIdBySignature(String toolSignature) { Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceImpl.java =================================================================== diff -u -rbb597b8155375e6ac4dfe280f630d323b6e5e575 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceImpl.java (.../ImageGalleryServiceImpl.java) (revision bb597b8155375e6ac4dfe280f630d323b6e5e575) +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceImpl.java (.../ImageGalleryServiceImpl.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -880,6 +880,10 @@ return getImageGalleryByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getImageGalleryByContentId(toolContentId).isDefineLater(); + } + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException { ImageGallery imageGallery = imageGalleryDao.getByContentId(toolContentId); Index: lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/service/CommonCartridgeServiceImpl.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/service/CommonCartridgeServiceImpl.java (.../CommonCartridgeServiceImpl.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/service/CommonCartridgeServiceImpl.java (.../CommonCartridgeServiceImpl.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -885,7 +885,11 @@ public String getToolContentTitle(Long toolContentId) { return getCommonCartridgeByContentId(toolContentId).getTitle(); } - + + public boolean isContentEdited(Long toolContentId) { + return getCommonCartridgeByContentId(toolContentId).isDefineLater(); + } + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException { CommonCartridge commonCartridge = commonCartridgeDao.getByContentId(toolContentId); Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaService.java =================================================================== diff -u -rab98c5d3a9e6d12e6ca524283b4e28dcc5a865f0 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaService.java (.../KalturaService.java) (revision ab98c5d3a9e6d12e6ca524283b4e28dcc5a865f0) +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaService.java (.../KalturaService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -292,6 +292,10 @@ return getKalturaByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getKalturaByContentId(toolContentId).isDefineLater(); + } + /* ********** IKalturaService Methods ********************************* */ @Override public Long createNotebookEntry(Long sessionId, Integer notebookToolType, String toolSignature, Integer userId, Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java =================================================================== diff -u -r007cc263f66ed201eb1f7585dcfc5d8f85f9329f -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java (.../McServicePOJO.java) (revision 007cc263f66ed201eb1f7585dcfc5d8f85f9329f) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java (.../McServicePOJO.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -1455,6 +1455,10 @@ return mcContentDAO.findMcContentById(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return mcContentDAO.findMcContentById(toolContentId).isDefineLater(); + } + /** * it is possible that the tool session id already exists in the tool sessions table as the users from the same * session are involved. existsSession(long toolSessionId) Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java =================================================================== diff -u -r6ac8c3a8a953aab157cb5075fba73b09da5e4cf8 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java (.../QaServicePOJO.java) (revision 6ac8c3a8a953aab157cb5075fba73b09da5e4cf8) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java (.../QaServicePOJO.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -909,6 +909,10 @@ return qaDAO.getQaByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return qaDAO.getQaByContentId(toolContentId).isContentLocked(); + } + /** * it is possible that the tool session id already exists in the tool sessions table as the users from the same * session are involved. existsSession(long toolSessionId) Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java =================================================================== diff -u -r17304a9802e428871e2bf2e6d06d35dcbbc7d778 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java (.../ResourceServiceImpl.java) (revision 17304a9802e428871e2bf2e6d06d35dcbbc7d778) +++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java (.../ResourceServiceImpl.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -942,6 +942,10 @@ return getResourceByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getResourceByContentId(toolContentId).isDefineLater(); + } + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException { Resource resource = resourceDao.getByContentId(toolContentId); Index: lams_tool_leader/src/java/org/lamsfoundation/lams/tool/leaderselection/service/LeaderselectionService.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_leader/src/java/org/lamsfoundation/lams/tool/leaderselection/service/LeaderselectionService.java (.../LeaderselectionService.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_leader/src/java/org/lamsfoundation/lams/tool/leaderselection/service/LeaderselectionService.java (.../LeaderselectionService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -270,6 +270,10 @@ return getContentByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getContentByContentId(toolContentId).isDefineLater(); + } + /* ********** ILeaderselectionService Methods ********************************* */ @Override Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapService.java =================================================================== diff -u -ra3e3ea0fe63acdf0a90f896d72c027e92e3f316c -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapService.java (.../MindmapService.java) (revision a3e3ea0fe63acdf0a90f896d72c027e92e3f316c) +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapService.java (.../MindmapService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -564,6 +564,10 @@ public String getToolContentTitle(Long toolContentId) { return getMindmapByContentId(toolContentId).getTitle(); } + + public boolean isContentEdited(Long toolContentId) { + return getMindmapByContentId(toolContentId).isDefineLater(); + } /* IMindmapService Methods */ Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/NoticeboardServicePOJO.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/NoticeboardServicePOJO.java (.../NoticeboardServicePOJO.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/NoticeboardServicePOJO.java (.../NoticeboardServicePOJO.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -770,6 +770,10 @@ return retrieveNoticeboard(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return retrieveNoticeboard(toolContentId).isDefineLater(); + } + /* ===============Methods implemented from ToolSessionManager =============== */ /** Index: lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/service/NotebookService.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/service/NotebookService.java (.../NotebookService.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/service/NotebookService.java (.../NotebookService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -291,6 +291,10 @@ public String getToolContentTitle(Long toolContentId) { return getNotebookByContentId(toolContentId).getTitle(); } + + public boolean isContentEdited(Long toolContentId) { + return getNotebookByContentId(toolContentId).isDefineLater(); + } /* ********** INotebookService Methods ********************************* */ Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrService.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrService.java (.../PixlrService.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrService.java (.../PixlrService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -413,6 +413,10 @@ public String getToolContentTitle(Long toolContentId) { return getPixlrByContentId(toolContentId).getTitle(); } + + public boolean isContentEdited(Long toolContentId) { + return getPixlrByContentId(toolContentId).isDefineLater(); + } /* ********** IPixlrService Methods ********************************* */ Index: lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/service/SubmitFilesService.java =================================================================== diff -u -r05c84228d414c007c26dbfe3afb95c23b241d043 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/service/SubmitFilesService.java (.../SubmitFilesService.java) (revision 05c84228d414c007c26dbfe3afb95c23b241d043) +++ lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/service/SubmitFilesService.java (.../SubmitFilesService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -336,6 +336,10 @@ return getSubmitFilesContent(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getSubmitFilesContent(toolContentId).isDefineLater(); + } + /* * (non-Javadoc) * Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java =================================================================== diff -u -r2163a3c910ea266fc01ec2ac9d0ea7e069b5da30 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java (.../ScratchieServiceImpl.java) (revision 2163a3c910ea266fc01ec2ac9d0ea7e069b5da30) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java (.../ScratchieServiceImpl.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -1537,6 +1537,10 @@ return getScratchieByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getScratchieByContentId(toolContentId).isDefineLater(); + } + @Override public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException { Index: lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/service/ScribeService.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/service/ScribeService.java (.../ScribeService.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/service/ScribeService.java (.../ScribeService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -333,6 +333,10 @@ public String getToolContentTitle(Long toolContentId) { return getScribeByContentId(toolContentId).getTitle(); } + + public boolean isContentEdited(Long toolContentId) { + return getScribeByContentId(toolContentId).isDefineLater(); + } /* ********** IScribeService Methods ************************************** */ Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceImpl.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceImpl.java (.../SpreadsheetServiceImpl.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceImpl.java (.../SpreadsheetServiceImpl.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -580,6 +580,10 @@ return getSpreadsheetByContentId(toolContentId).getTitle(); } + public boolean isContentEdited(Long toolContentId) { + return getSpreadsheetByContentId(toolContentId).isDefineLater(); + } + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException { Spreadsheet spreadsheet = spreadsheetDao.getByContentId(toolContentId); Index: lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/service/SurveyServiceImpl.java =================================================================== diff -u -rbb597b8155375e6ac4dfe280f630d323b6e5e575 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/service/SurveyServiceImpl.java (.../SurveyServiceImpl.java) (revision bb597b8155375e6ac4dfe280f630d323b6e5e575) +++ lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/service/SurveyServiceImpl.java (.../SurveyServiceImpl.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -723,6 +723,10 @@ public String getToolContentTitle(Long toolContentId) { return getSurveyByContentId(toolContentId).getTitle(); } + + public boolean isContentEdited(Long toolContentId) { + return getSurveyByContentId(toolContentId).isDefineLater(); + } public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException { Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java (.../TaskListServiceImpl.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java (.../TaskListServiceImpl.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -831,7 +831,11 @@ public String getToolContentTitle(Long toolContentId) { return getTaskListByContentId(toolContentId).getTitle(); } - + + public boolean isContentEdited(Long toolContentId) { + return getTaskListByContentId(toolContentId).isDefineLater(); + } + /** * {@inheritDoc} */ Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java =================================================================== diff -u -r15045d0b9b0dbb930f42a9da7757207e7a325341 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java (.../VideoRecorderService.java) (revision 15045d0b9b0dbb930f42a9da7757207e7a325341) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java (.../VideoRecorderService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -377,6 +377,10 @@ public String getToolContentTitle(Long toolContentId) { return getVideoRecorderByContentId(toolContentId).getTitle(); } + + public boolean isContentEdited(Long toolContentId) { + return getVideoRecorderByContentId(toolContentId).isDefineLater(); + } /* ********** IVideoRecorderService Methods ********************************* */ Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java =================================================================== diff -u -r43437f9c52f60b4fe545162b3ed72e6ddf911777 -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java (.../VoteServicePOJO.java) (revision 43437f9c52f60b4fe545162b3ed72e6ddf911777) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java (.../VoteServicePOJO.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -1717,6 +1717,10 @@ public String getToolContentTitle(Long toolContentId) { return retrieveVote(toolContentId).getTitle(); } + + public boolean isContentEdited(Long toolContentId) { + return retrieveVote(toolContentId).isDefineLater(); + } /** * Get the tool output for the given tool output names. Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/service/WikiService.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/service/WikiService.java (.../WikiService.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/service/WikiService.java (.../WikiService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -240,6 +240,10 @@ public String getToolContentTitle(Long toolContentId) { return getWikiByContentId(toolContentId).getTitle(); } + + public boolean isContentEdited(Long toolContentId) { + return getWikiByContentId(toolContentId).isDefineLater(); + } /* ************ Methods from ToolContentManager ************************* */ Index: lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/service/WookieService.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r5b6e51b5d96619f619209830fdab0ed1ef572c05 --- lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/service/WookieService.java (.../WookieService.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/service/WookieService.java (.../WookieService.java) (revision 5b6e51b5d96619f619209830fdab0ed1ef572c05) @@ -483,6 +483,10 @@ public String getToolContentTitle(Long toolContentId) { return getWookieByContentId(toolContentId).getTitle(); } + + public boolean isContentEdited(Long toolContentId) { + return getWookieByContentId(toolContentId).isDefineLater(); + } @SuppressWarnings("unchecked") public Class[] getSupportedToolOutputDefinitionClasses(int definitionType) {