Index: lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerAction.java,v diff -u -r1.37 -r1.38 --- lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerAction.java 6 Aug 2010 12:49:37 -0000 1.37 +++ lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerAction.java 5 Dec 2010 19:44:27 -0000 1.38 @@ -95,7 +95,6 @@ import org.lamsfoundation.lams.learningdesign.exception.LearningDesignException; import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; import org.lamsfoundation.lams.learningdesign.service.ImportToolContentException; -import org.lamsfoundation.lams.lesson.LearnerProgress; import org.lamsfoundation.lams.lesson.Lesson; import org.lamsfoundation.lams.monitoring.service.IMonitoringService; import org.lamsfoundation.lams.planner.PedagogicalPlannerSequenceNode; @@ -124,8 +123,6 @@ import org.lamsfoundation.lams.web.action.LamsDispatchAction; import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; -import org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService; -import org.lamsfoundation.lams.workspace.service.WorkspaceManagementService; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; @@ -444,10 +441,16 @@ ToolActivity toolActivity = (ToolActivity) activity; // Every tool has an URL that leads to Action that returns proper tool form to use String pedagogicalPlannerUrl = toolActivity.getTool().getPedagogicalPlannerUrl(); + String authorUrl = toolActivity.getTool().getAuthorUrl() + PedagogicalPlannerAction.CHAR_QUESTION_MARK + + AttributeNames.PARAM_TOOL_CONTENT_ID + PedagogicalPlannerAction.CHAR_EQUALS + + toolActivity.getToolContentId() + PedagogicalPlannerAction.CHAR_AMPERSAND + + AttributeNames.PARAM_CONTENT_FOLDER_ID + PedagogicalPlannerAction.CHAR_EQUALS + + learningDesign.getContentFolderID(); + if (pedagogicalPlannerUrl == null) { // if there is no URL, the tool does not support the planner addedDTO = new PedagogicalPlannerActivityDTO(toolActivity.getTool().getToolDisplayName(), activity - .getTitle(), false, PedagogicalPlannerAction.PATH_ACTIVITY_NO_PLANNER_SUPPORT, activity + .getTitle(), false, authorUrl, PedagogicalPlannerAction.PATH_ACTIVITY_NO_PLANNER_SUPPORT, activity .getLibraryActivityUiImage(), null, null); } else { // add some required parameters @@ -456,10 +459,10 @@ pedagogicalPlannerUrl += AttributeNames.PARAM_TOOL_CONTENT_ID + PedagogicalPlannerAction.CHAR_EQUALS + toolActivity.getToolContentId(); // Looks heavy, but we just build URLs for DTO - see that class the meaning of constructor parameters - addedDTO = new PedagogicalPlannerActivityDTO(toolActivity.getTool().getToolDisplayName(), activity - .getTitle(), true, pedagogicalPlannerUrl + PedagogicalPlannerAction.CHAR_AMPERSAND - + AttributeNames.PARAM_CONTENT_FOLDER_ID + PedagogicalPlannerAction.CHAR_EQUALS - + learningDesign.getContentFolderID(), activity.getLibraryActivityUiImage(), + addedDTO = new PedagogicalPlannerActivityDTO(toolActivity.getTool().getToolDisplayName(), + activity.getTitle(), true, pedagogicalPlannerUrl + PedagogicalPlannerAction.CHAR_AMPERSAND + + AttributeNames.PARAM_CONTENT_FOLDER_ID + PedagogicalPlannerAction.CHAR_EQUALS + + learningDesign.getContentFolderID(), authorUrl, activity.getLibraryActivityUiImage(), pedagogicalPlannerUrl + PedagogicalPlannerAction.CHAR_AMPERSAND + AttributeNames.PARAM_COMMAND + PedagogicalPlannerAction.CHAR_EQUALS + AttributeNames.COMMAND_CHECK_EDITING_ADVICE + PedagogicalPlannerAction.CHAR_AMPERSAND + AttributeNames.PARAM_ACTIVITY_INDEX @@ -475,13 +478,14 @@ .getSystemTool().getPedagogicalPlannerUrl() + PedagogicalPlannerAction.CHAR_AMPERSAND + AttributeNames.PARAM_TOOL_CONTENT_ID - + PedagogicalPlannerAction.CHAR_EQUALS + groupingActivity.getCreateGrouping().getGroupingId(), + + PedagogicalPlannerAction.CHAR_EQUALS + + groupingActivity.getCreateGrouping().getGroupingId(), null, PedagogicalPlannerAction.IMAGE_PATH_GROUPING, null, null); activities.add(addedDTO); } else if (activity.isGateActivity()) { // gate is not supported, but takes its image from a differen spot addedDTO = new PedagogicalPlannerActivityDTO(null, activity.getTitle(), false, - PedagogicalPlannerAction.PATH_ACTIVITY_NO_PLANNER_SUPPORT, + PedagogicalPlannerAction.PATH_ACTIVITY_NO_PLANNER_SUPPORT, null, PedagogicalPlannerAction.IMAGE_PATH_GATE, null, null); activities.add(addedDTO); } else if (activity.isBranchingActivity()) { @@ -508,7 +512,7 @@ + PedagogicalPlannerAction.CHAR_QUESTION_MARK + CentralConstants.PARAM_FORM_MESSAGE + PedagogicalPlannerAction.CHAR_EQUALS + getMessageService().getMessage(CentralConstants.RESOURCE_KEY_BRANCH_EMPTY); - addedDTO = new PedagogicalPlannerActivityDTO(null, null, false, path, null, null, null); + addedDTO = new PedagogicalPlannerActivityDTO(null, null, false, path, null, null, null, null); addedDTO.setParentActivityTitle(activity.getTitle()); addedDTO.setGroup(branch); addedDTO.setDefaultBranch(defaultBranch); @@ -597,8 +601,8 @@ } else { // If unknown/unsupported activity addedDTO = new PedagogicalPlannerActivityDTO(null, activity.getTitle(), false, - PedagogicalPlannerAction.PATH_ACTIVITY_NO_PLANNER_SUPPORT, activity.getLibraryActivityUiImage(), - null, null); + PedagogicalPlannerAction.PATH_ACTIVITY_NO_PLANNER_SUPPORT, null, + activity.getLibraryActivityUiImage(), null, null); activities.add(addedDTO); } return addedDTO; Index: lams_central/web/css/pedagogicalPlanner.css =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/css/pedagogicalPlanner.css,v diff -u -r1.12 -r1.13 --- lams_central/web/css/pedagogicalPlanner.css 5 Dec 2010 16:37:27 -0000 1.12 +++ lams_central/web/css/pedagogicalPlanner.css 5 Dec 2010 19:44:27 -0000 1.13 @@ -195,4 +195,5 @@ #content a.activityButton img{ border: none; + margin: 5px; } \ No newline at end of file Index: lams_central/web/images/pedag_collapse.png =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/images/Attic/pedag_collapse.png,v diff -u -r1.1 -r1.2 Binary files differ Index: lams_central/web/includes/javascript/pedagogicalPlanner.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/pedagogicalPlanner.js,v diff -u -r1.21 -r1.22 --- lams_central/web/includes/javascript/pedagogicalPlanner.js 5 Dec 2010 17:18:04 -0000 1.21 +++ lams_central/web/includes/javascript/pedagogicalPlanner.js 5 Dec 2010 19:44:27 -0000 1.22 @@ -230,17 +230,34 @@ } } - function collapseActivity(id){ + function collapseActivity(id, action){ $('.collapsible'+id).hide(); $('#activity'+id).hide('slow', function () { - $('#activityCollapsedSpan'+id).show('slow'); + $('#activity'+action+'Span'+id).show('slow'); }); } - function expandActivity(id){ - $('#activityCollapsedSpan'+id).hide('slow', function () { + function expandActivity(id, action){ + $('#activity'+action+'Span'+id).hide('slow', function () { $('#activity'+id).show('slow', function (){ $('.collapsible'+id).show(); }); }); - } \ No newline at end of file + } + + function openActivityAuthor(id, url, title) { + collapseActivity(id, 'Edit'); + + var wd = window.open(url,title,'resizable,width=930,height=700,scrollbars'); + var watchClose = setInterval(function() { + if (wd.closed) { + clearTimeout(watchClose); + $('#activity'+id)[0].contentWindow.location.reload(true); + expandActivity(id, 'Edit'); + } + }, 500); + + if (window.focus) { + wd.window.focus(); + } + } \ No newline at end of file Index: lams_common/src/java/org/lamsfoundation/lams/planner/dto/PedagogicalPlannerActivityDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/planner/dto/PedagogicalPlannerActivityDTO.java,v diff -u -r1.2 -r1.3 --- lams_common/src/java/org/lamsfoundation/lams/planner/dto/PedagogicalPlannerActivityDTO.java 26 Feb 2009 19:19:08 -0000 1.2 +++ lams_common/src/java/org/lamsfoundation/lams/planner/dto/PedagogicalPlannerActivityDTO.java 5 Dec 2010 19:44:38 -0000 1.3 @@ -25,6 +25,15 @@ public class PedagogicalPlannerActivityDTO { private String pedagogicalPlannerUrl; + private String authorUrl; + public String getAuthorUrl() { + return authorUrl; + } + + public void setAuthorUrl(String authorUrl) { + this.authorUrl = authorUrl; + } + private String toolIconUrl; private String title; private String type; @@ -58,9 +67,11 @@ } public PedagogicalPlannerActivityDTO(String type, String title, Boolean supportsPlanner, - String pedagogicalPlannerUrl, String toolIconUrl, String checkEditingAdviceUrl, String editingAdviceUrl) { + String pedagogicalPlannerUrl, String authorUrl, String toolIconUrl, String checkEditingAdviceUrl, + String editingAdviceUrl) { this.supportsPlanner = supportsPlanner; this.pedagogicalPlannerUrl = pedagogicalPlannerUrl; + this.authorUrl = authorUrl; this.toolIconUrl = toolIconUrl; this.checkEditingAdviceUrl = checkEditingAdviceUrl; this.editingAdviceUrl = editingAdviceUrl;