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:
Jonathan Featherstone 2015-08-10 10:00:58 -06:00
parent e9e12544fa
commit 8856134c5a
2 changed files with 30 additions and 25 deletions

View File

@ -190,6 +190,12 @@ $page-dark: #ebeff2;
padding: $ic-sp/4 $ic-sp; 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 { .section-button-placeholder {
display: inline-block; display: inline-block;
@if $use_new_styles == false { @if $use_new_styles == false {

View File

@ -28,28 +28,7 @@
</nav> </nav>
<% end %> <% end %>
<div class="header-buttons"> <div class="header-buttons">
<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="post-grades-button-placeholder">
<div class="section-button-placeholder"></div>
</div>
</div>
<div class="assignment-gradebook-container hidden">
<div id="gradebook-toolbar" class="toolbar">
<div class="gradebook_dropdowns">
<% if !@context.feature_enabled?(:outcome_gradebook) && !@context.feature_enabled?(:post_grades)%>
<span class="section-button-placeholder"></span>
<% end %>
<% if multiple_grading_periods? %>
<span class="multiple-grading-periods-selector-placeholder"></span>
<% end %>
</div>
<div class="gradebook_filter">
<% placeholder = t('filter_by_student', 'Filter by student name or secondary ID') %>
<input type="text" class="search-query" placeholder="<%= placeholder %>" aria-label="<%= placeholder %>">
</div>
<div class="gradebook_menu">
<span class="ui-buttonset">
<% if @post_grades_tools.count > 1 %> <% 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> <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"> <ul style="display: none;" class="post-grades-menu ui-kyle-menu">
@ -72,14 +51,34 @@
<span class="post-grades-placeholder"></span> <span class="post-grades-placeholder"></span>
<% end %> <% end %>
<% 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>
</div>
<div class="assignment-gradebook-container hidden">
<div id="gradebook-toolbar" class="toolbar">
<div class="gradebook_dropdowns">
<% if !@context.feature_enabled?(:outcome_gradebook) && !@context.feature_enabled?(:post_grades)%>
<span class="section-button-placeholder"></span>
<% end %>
<% if multiple_grading_periods? %>
<span class="multiple-grading-periods-selector-placeholder"></span>
<% end %>
</div>
<div class="gradebook_filter">
<% placeholder = t('filter_by_student', 'Filter by student name or secondary ID') %>
<input type="text" class="search-query" placeholder="<%= placeholder %>" aria-label="<%= placeholder %>">
</div>
<div class="gradebook_menu">
<span class="ui-buttonset">
<% if @gradebook_is_editable && @context.allows_gradebook_uploads? %> <% if @gradebook_is_editable && @context.allows_gradebook_uploads? %>
<%= link_to(new_course_gradebook_upload_path(@context), class: "ui-button") do %> <%= link_to(new_course_gradebook_upload_path(@context), class: "ui-button") do %>
<i class="icon-import"></i> <i class="icon-import"></i>
<%= t 'Import' %> <%= t 'Import' %>
<% end %> <% end %>
<% end %> <% end %>
<button class="ui-button" id="download_csv"> <button class="ui-button" id="download_csv">
<i class="icon-export"></i> <i class="icon-export"></i>
<%= t('download_scores', 'Export') %> <%= t('download_scores', 'Export') %>