Move post grades button to top header
Slight structural change to post grades button to make style more uniform. Test plan from original ticket where button was added is pasted below for ease of testing. Verify that change works for old and new canvas styles. Test Plan: * configure powerschool grade posting by enabling sis feature flag * /accounts/:id/settings * "post grades to sis" -> on * /courses/:id/settings * SIS ID -> random number * add an assignment, make sure that "post grades to sis" is checked * navigate to gradebook, verify that "post grades" button is visible * verify that "post grades" button is not visible when no assignments are present * click on button and verify that current powerschool modal launches * add sisapp lti launch * get local sisapp running * /accounts/1/settings/configurations * add app, by url http://<local sisapp>/post_grades/config.xml * navigate to gradebook, verify that both powerschool post and new lti post are available in drop down menu closes CNVS-22119 Change-Id: Id57bed25774e4bff2208eb8a7ec1f318a276f1c5 Reviewed-on: https://gerrit.instructure.com/60378 Tested-by: Jenkins Reviewed-by: Andrew Butterfield <abutterfield@instructure.com> QA-Review: Heath Hales <hhales@instructure.com> Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
This commit is contained in:
parent
e9e12544fa
commit
8856134c5a
|
@ -190,6 +190,12 @@ $page-dark: #ebeff2;
|
|||
padding: $ic-sp/4 $ic-sp;
|
||||
}
|
||||
}
|
||||
.post-grades-button-placeholder {
|
||||
display: inline-block;
|
||||
@if $use_new_styles == false {
|
||||
button#post-grades-button, button#post_grades, button.external-tools-dialog { padding: $ic-sp/4 $ic-sp; }
|
||||
}
|
||||
}
|
||||
.section-button-placeholder {
|
||||
display: inline-block;
|
||||
@if $use_new_styles == false {
|
||||
|
|
|
@ -28,6 +28,30 @@
|
|||
</nav>
|
||||
<% end %>
|
||||
<div class="header-buttons">
|
||||
<div class="post-grades-button-placeholder">
|
||||
<% if @post_grades_tools.count > 1 %>
|
||||
<button id="post_grades" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"><%= t('Post Grades') %></button>
|
||||
<ul style="display: none;" class="post-grades-menu ui-kyle-menu">
|
||||
<% @post_grades_tools.each do |tool| %>
|
||||
<% case tool[:type] %>
|
||||
<% when :lti %>
|
||||
<li class="external-tools-dialog"><a aria-controls="post_grades_frame_dialog" role="button" data-url="<%= tool[:data_url]%>"><%= tool[:name]%></a></li>
|
||||
<% when :post_grades %>
|
||||
<li class="post-grades-placeholder in-menu"></li>
|
||||
<% when :ellip %>
|
||||
<li class="external-tools-dialog ellip"><a>…</a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% elsif @post_grades_tools.count == 1 %>
|
||||
<% case @post_grades_tools[0][:type] %>
|
||||
<% when :lti %>
|
||||
<button class="external-tools-dialog ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" data-url="<%= @post_grades_tools[0][:data_url]%>"><%= @post_grades_tools[0][:name]%></button>
|
||||
<% when :post_grades %>
|
||||
<span class="post-grades-placeholder"></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<a href="<%= context_url(@context, :change_gradebook_version_context_gradebook_url, :version => "srgb") %>" class="Button individual-view-button" id="change_gradebook_version_link_holder" type="button"><%= t(:individual_view, "Individual View") %></a>
|
||||
<div class="section-button-placeholder"></div>
|
||||
</div>
|
||||
|
@ -49,37 +73,12 @@
|
|||
</div>
|
||||
<div class="gradebook_menu">
|
||||
<span class="ui-buttonset">
|
||||
|
||||
<% if @post_grades_tools.count > 1 %>
|
||||
<button id="post_grades" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"><%= t('Post Grades') %></button>
|
||||
<ul style="display: none;" class="post-grades-menu ui-kyle-menu">
|
||||
<% @post_grades_tools.each do |tool| %>
|
||||
<% case tool[:type] %>
|
||||
<% when :lti %>
|
||||
<li class="external-tools-dialog"><a aria-controls="post_grades_frame_dialog" role="button" data-url="<%= tool[:data_url]%>"><%= tool[:name]%></a></li>
|
||||
<% when :post_grades %>
|
||||
<li class="post-grades-placeholder in-menu"></li>
|
||||
<% when :ellip %>
|
||||
<li class="external-tools-dialog ellip"><a>…</a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% elsif @post_grades_tools.count == 1 %>
|
||||
<% case @post_grades_tools[0][:type] %>
|
||||
<% when :lti %>
|
||||
<button class="external-tools-dialog ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" data-url="<%= @post_grades_tools[0][:data_url]%>"><%= @post_grades_tools[0][:name]%></button>
|
||||
<% when :post_grades %>
|
||||
<span class="post-grades-placeholder"></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @gradebook_is_editable && @context.allows_gradebook_uploads? %>
|
||||
<%= link_to(new_course_gradebook_upload_path(@context), class: "ui-button") do %>
|
||||
<i class="icon-import"></i>
|
||||
<%= t 'Import' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<button class="ui-button" id="download_csv">
|
||||
<i class="icon-export"></i>
|
||||
<%= t('download_scores', 'Export') %>
|
||||
|
|
Loading…
Reference in New Issue