Skip to content

Commit

Permalink
SAK-32671 - Filter out the non-launch tools from Site Info (sakaiproj…
Browse files Browse the repository at this point in the history
  • Loading branch information
csev authored Jul 10, 2017
1 parent 89fecd1 commit 9c3b5ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Binary file modified basiclti/basiclti-docs/resources/docs/BLTI_TestPlan.xls
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3944,13 +3944,13 @@ private void buildLTIToolContextForTemplate(Context context,
SessionState state, Site site, boolean updateToolRegistration) {
List<Map<String, Object>> visibleTools, allTools;
String siteId = site == null? UUID.randomUUID().toString(): site.getId();
// get the visible and all (including stealthed) list of lti tools
visibleTools = m_ltiService.getTools(null,null,0,0, siteId);
// get the list of launchable tools - visible and including stealthed
visibleTools = m_ltiService.getToolsLaunch(siteId);
if (site == null) {
allTools = visibleTools;
} else {
// Get tools specfic for this site or that are available in all sites.
allTools = m_ltiService.getToolsDao(null, null, 0, 0, site.getId());
allTools = m_ltiService.getToolsLaunch(site.getId());
}
if (visibleTools != null && !visibleTools.isEmpty()) {
HashMap<String, Map<String, Object>> ltiTools = new HashMap<>();
Expand Down Expand Up @@ -6462,14 +6462,16 @@ private List getLtiToolGroup(String groupName, File moreInfoDir, Site site) {
List ltiTools = new ArrayList();
List<Map<String, Object>> allTools;
String siteId = "";
if ( site == null )
if ( site == null ) {
// We dont' have a site yet so just ask for all the available ones.
allTools = m_ltiService.getTools(null,null,0,0, UUID.randomUUID().toString());
allTools = m_ltiService.getToolsLaunch(siteId);
}
else
{
siteId = Objects.toString(site.getId(), "");
allTools = m_ltiService.getToolsDao(null,null,0,0,siteId);
allTools = m_ltiService.getToolsLaunch(siteId);
}

if (allTools != null && !allTools.isEmpty()) {
for (Map<String, Object> tool : allTools) {
Set keySet = tool.keySet();
Expand Down

0 comments on commit 9c3b5ae

Please sign in to comment.