UI for adding SIS token to canvas

fixes SIS-641

Test plan:
- generate a token in SIS App
- copy and paste the token in the 'SIS Token Authentication' field
-- you must enable the Post Grades to SIS feature to see this setting
- update the settings and confirm the sis token was saved

Change-Id: I13f2e0136809c42d7b7c7b30c330efb11f6dc29f
Reviewed-on: https://gerrit.instructure.com/44358
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Nick Houle <nhoule@instructure.com>
This commit is contained in:
Nick Houle 2014-11-12 13:38:33 -07:00
parent b43e07f83e
commit 2ef228be06
2 changed files with 19 additions and 0 deletions

View File

@ -162,6 +162,7 @@ class Account < ActiveRecord::Base
# these settings either are or could be easily added to
# the account settings page
add_setting :sis_app_token, :root_only => true
add_setting :global_includes, :root_only => true, :boolean => true, :default => false
add_setting :global_javascript, :condition => :allow_global_includes
add_setting :global_stylesheet, :condition => :allow_global_includes

View File

@ -366,6 +366,24 @@ TEXT
<% end %>
</fieldset>
<% if !@account.site_admin? &&
@account.root_account? &&
@account.feature_enabled?(:post_grades) &&
@account.grants_right?(@current_user, :manage_site_settings) %>
<fieldset id="add_sis_app_token">
<legend><%= t("SIS Token Authentication") %></legend>
<p style="font-size: 0.9em;"><%= t("This will allow you to authenticate Canvas for posting grades to SIS") %></p>
<%= f.fields_for :settings do |settings| %>
<table class="formtable">
<tr>
<td><%= settings.blabel :sis_app_token, :en => "SIS Token" %></td>
<td><%= settings.text_field :sis_app_token, :value => @account.settings[:sis_app_token] %></td>
</tr>
</table>
<% end %>
</fieldset>
<% end %>
<% if @account.root_account? && !@account.site_admin? && Setting.get("show_feedback_link", "false") == "true" %>
<fieldset>
<legend><%= t(:custom_links_to_include_in_the_help_dialog_popup, "Custom Links to include in the help dialog popup") %></legend>