Skip to content

Commit

Permalink
SAK-32740 - Fix NPE in Site Info Plug In Tools under Oracle (sakaipro…
Browse files Browse the repository at this point in the history
  • Loading branch information
csev authored Jul 31, 2017
1 parent 6200a97 commit 6b004d4
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2905,8 +2905,8 @@ public int compare(JoinableGroup g1, JoinableGroup g2){
Map<String, Object> toolMap = entry.getValue();
String toolId = entry.getKey();
// get the configuration html for tool is post-add configuration has been requested (by Laura)
String showDialog = toolMap.get(LTIService.LTI_SITEINFOCONFIG).toString();
if ( ! "1".equals(showDialog) ) continue;
Object showDialog = toolMap.get(LTIService.LTI_SITEINFOCONFIG);
if ( showDialog == null || ! "1".equals(showDialog.toString()) ) continue;

String ltiToolId = toolMap.get("id").toString();
String[] contentToolModel=m_ltiService.getContentModel(Long.valueOf(ltiToolId), site.getId());
Expand Down Expand Up @@ -11698,14 +11698,16 @@ else if (toolId.startsWith(LTITOOL_ID_PREFIX))
if ( toolMap == null ) continue;

// Decide if any LTI tools need a configuration dialog
String showDialog = toolMap.get(LTIService.LTI_SITEINFOCONFIG).toString();
Object showDialog = toolMap.get(LTIService.LTI_SITEINFOCONFIG);
if ( showDialog == null || ! "1".equals(showDialog.toString()) ) continue;
if (existingLtiIds == null)
{
ltiToolNeedsConfig = true;
}
else
{
if (!existingLtiIds.keySet().contains(ltiToolId) && "1".equals(showDialog))
if (!existingLtiIds.keySet().contains(ltiToolId) &&
showDialog!= null && "1".equals(showDialog.toString()))
{
// there are some new lti tool(s) selected that need a configuration dialog
ltiToolNeedsConfig = true;
Expand Down

0 comments on commit 6b004d4

Please sign in to comment.