Skip to content

Commit

Permalink
SAK-26313 - Add a message to the admin panel (sakaiproject#4604)
Browse files Browse the repository at this point in the history
  • Loading branch information
csev authored Jul 13, 2017
1 parent d97b5e8 commit 1134d2c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions basiclti/basiclti-tool/src/bundle/ltitool.properties
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ error.tool.not.found=Tool not found
error.missing.return=Called as helper without return URL
error.need.key.secret=This tool will not function without a key and secret.
error.link.placement.update=Error updating placement information in configuration item
error.tool.no.encryption.key=This server does not have basiclti.encryption.key set in its sakai.properties. Until you set this value, LTI secrets will be unencrypted in the database.
need.tool.info=<p>Note: This tool was imported and needs a key and secret before it will function.</p>
need.tool.secret=Tool secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,11 @@ public String buildToolSystemPanelContext(VelocityPortlet portlet, Context conte
context.put("ltiService", ltiService);
context.put("isAdmin",new Boolean(ltiService.isAdmin(getSiteId(state))) );
context.put("doEndHelper", BUTTON + "doEndHelper");
if (ltiService.isAdmin(getSiteId(state)) &&
serverConfigurationService.getString(SakaiBLTIUtil.BASICLTI_ENCRYPTION_KEY, null) == null) {
context.put("configMessage",rb.getString("error.tool.no.encryption.key"));
}

state.removeAttribute(STATE_POST);
state.removeAttribute(STATE_SUCCESS);

Expand Down
1 change: 1 addition & 0 deletions basiclti/basiclti-tool/src/webapp/vm/lti_tool_system.vm
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ ${includeLatestJQuery}
</ul>
#if ($messageSuccess)<div class="messageSuccess">$tlang.getString("gen.success") $validator.escapeHtml($messageSuccess)</div><div class="clear"></div>#end
#if ($alertMessage)<div class="alertMessage">$tlang.getString("gen.alert") $validator.escapeHtml($alertMessage)</div><div class="clear"></div>#end
#if ($configMessage)<div class="alertMessage">$tlang.getString("gen.alert") $validator.escapeHtml($configMessage)</div><div class="clear"></div>#end
#if ($isAdmin || $allowMaintainerAddSystemTool)<div align="right"><a href="" title="$tlang.getString("add.to.system")" onclick="location = '$sakai_ActionURL.setPanel("ToolInsert")';return false;"> $tlang.getString("add.to.system")</a></a></div>#end
<br/>
#if ($!ltiTools && $ltiTools.size() > 0 )
Expand Down

0 comments on commit 1134d2c

Please sign in to comment.