tool.setTitle((String) content.get(LTI_TITLE)); sitePage.setTitle(button_text); sitePage.setTitleCustom(true); siteService.save(site);
page.setTitle(pageTitle); ToolConfiguration tool = page.addTool(); tool.setTool(TOOL_ID, tr);
page.setTitle(pageTitle); ToolConfiguration tool = page.addTool(); tool.setTool(TOOL_ID, tr);
sitePage.setTitle(basicLTI.getPageTitle());
page.setTitle(pageTitle); ToolConfiguration tool = page.addTool(); tool.setTool(TOOL_ID, tr);
page.setTitle(pageTitle); ToolConfiguration tool = page.addTool(); tool.setTool(TOOL_ID, tr);
protected boolean updateSite(JobExecutionContext context, Site site) throws JobExecutionException { // The toolId we are wanting to add to the site. String toolId = context.getMergedJobDataMap().getString("tool"); if (toolId == null || toolId.isEmpty()) { throw new JobExecutionException("tool isn't set in job data."); } Tool tool = toolManager.getTool(toolId); if (tool == null) { throw new JobExecutionException("Failed to find tool with id: "+ toolId); } ToolConfiguration toolConfiguration = site.getToolForCommonId(toolId); if (toolConfiguration == null) { // Add the tool to the site. SitePage page = site.addPage(); page.setTitle(tool.getTitle()); page.addTool(tool); try { siteService.save(site); return true; } catch (IdUnusedException|PermissionException e) { log.warn("Failed to save site: "+ site.getId(), e); } } else { log.debug(String.format("Site: %s already has tool: %s on page: %s", site.getId(), toolId, toolConfiguration.getContainingPage().getId())); } return false; }
protected boolean updateSite(JobExecutionContext context, Site site) throws JobExecutionException { // The toolId we are wanting to add to the site. String toolId = context.getMergedJobDataMap().getString("tool"); if (toolId == null || toolId.isEmpty()) { throw new JobExecutionException("tool isn't set in job data."); } Tool tool = toolManager.getTool(toolId); if (tool == null) { throw new JobExecutionException("Failed to find tool with id: "+ toolId); } ToolConfiguration toolConfiguration = site.getToolForCommonId(toolId); if (toolConfiguration == null) { // Add the tool to the site. SitePage page = site.addPage(); page.setTitle(tool.getTitle()); page.addTool(tool); try { siteService.save(site); return true; } catch (IdUnusedException|PermissionException e) { log.warn("Failed to save site: "+ site.getId(), e); } } else { log.debug(String.format("Site: %s already has tool: %s on page: %s", site.getId(), toolId, toolConfiguration.getContainingPage().getId())); } return false; }
page.setTitle("Resources"); page.addTool("sakai.resources");