123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <%
- # Copyright (C) 2012 - present Instructure, Inc.
- #
- # This file is part of Canvas.
- #
- # Canvas is free software: you can redistribute it and/or modify it under
- # the terms of the GNU Affero General Public License as published by the Free
- # Software Foundation, version 3 of the License.
- #
- # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
- # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
- # details.
- #
- # You should have received a copy of the GNU Affero General Public License along
- # with this program. If not, see <http://www.gnu.org/licenses/>.
- %>
- <div>
- <%= external_tools_menu_items(@course_settings_sub_navigation_tools, {link_class: "Button Button--link Button--link--has-divider Button--course-settings course-settings-sub-navigation-lti", settings_key: :course_settings_sub_navigation}) %>
- <% if can_do(@context, @current_user, :use_student_view) %>
- <%= link_to course_student_view_path(@context), :method => :post, :class => 'Button Button--link Button--link--has-divider Button--course-settings student_view_button' do %>
- <i class="icon-student-view"></i>{{#t}}Student View{{/t}}
- <% end %>
- <% end %>
- <% if can_do(@context, @current_user, :read_reports) %>
- <%= link_to context_url(@context, :context_statistics_url), :class => ' Button Button--link Button--link--has-divider Button--course-settings' do %>
- <i class="icon-stats"></i>{{#t}}Course Statistics{{/t}}
- <% end %>
- <% end %>
- <% if can_do(@context, @current_user, :read) %>
- <%= link_to calendar_url_for(@context), :class => 'Button Button--link Button--link--has-divider Button--course-settings', :id => 'course_calendar_link' do %>
- <i class="icon-calendar-day"></i>{{#t}}Course Calendar{{/t}}
- <% end %>
- <% end %>
- <% if can_do(@context, @current_user, :change_course_state) %>
- <% if @context.completed? %>
- <%= form_tag context_url(@context, :context_unconclude_url) do %>
- <button class="Button Button--link Button--link--has-divider Button--course-settings" type="submit">
- <i class="icon-add"></i>{{#t}}Un-Conclude Course{{/t}}
- </button>
- <% end %>
- <% elsif !@context.soft_concluded? %>
- <%= link_to context_url(@context, :context_confirm_action_url, :event => 'conclude'), :class => 'Button Button--link Button--link--has-divider Button--course-settings' do %>
- <i class="icon-lock"></i>{{#t}}Conclude this Course{{/t}}
- <% end %>
- <% end %>
- <% end %>
- <% if can_do(@context, @current_user, :delete) && !@context.deleted? %>
- <%= link_to context_url(@context, :context_confirm_action_url, :event => 'delete'), :class => 'Button Button--link Button--link--has-divider Button--course-settings' do %>
- <i class="icon-trash"></i>{{#t}}Delete this Course{{/t}}
- <% end %>
- <% end %>
- <% if can_do(@context, @current_user, :read) && show_user_create_course_button(@current_user, @context.account) %>
- <%= link_to context_url(@context, :context_start_copy_url), :class => 'Button Button--link Button--link--has-divider Button--course-settings copy_course_link' do %>
- <i class="icon-copy-course"></i>{{#t}}Copy this Course{{/t}}
- <% end %>
- <% end %>
- <% if can_do(@context, @current_user, :manage_content, :manage_files, :manage_quizzes) %>
- <%= link_to context_url(@context, :context_content_migrations_url), :class => 'Button Button--link Button--link--has-divider Button--course-settings import_content' do %>
- <i class="icon-upload"></i>{{#t}}Import Course Content{{/t}}
- <% end %>
- <% end %>
- <% if can_do(@context, @current_user, :read) %>
- <%= link_to context_url(@context, :course_content_exports_url), :class => 'Button Button--link Button--link--has-divider Button--course-settings' do %>
- <i class="icon-download"></i>{{#t}}Export Course Content{{/t}}
- <% end %>
- <% end %>
- <% if can_do(@context, @current_user, :reset_content) %>
- <%= link_to context_url(@context, :course_reset_url), :class => ' Button Button--link Button--link--has-divider Button--course-settings reset_course_content_button' do %>
- <i class="icon-reset"></i>{{#t}}Reset Course Content{{/t}}
- <% end %>
- <div <%= hidden(true) %> id="reset_course_content_dialog">
- <p><%= mt('help.reset_course_content', 'Resetting course content will permanently delete all associated assignments, discussions, quizzes, modules, rubrics, pages, files, learning outcomes, question banks, collaborations, conferences, or any other content. This action is irreversible, and the data *cannot* be recovered. Are you sure you wish to continue?') %></p>
- <%= form_for @context, :url => context_url(@context, :course_reset_url), :html => { :method => :post } do %>
- <div class="button-container">
- <button type="button" class="btn cancel_button">
- {{#t}}Cancel{{/t}}
- </button>
- <button type="submit" class="btn btn-danger submit_button">
- {{#t}}Reset Course Content{{/t}}
- </button>
- </div>
- <% end %>
- </div>
- <% end %>
- <% if can_do(@context, @current_user, :manage_content) %>
- <%= link_to context_url(@context, :course_link_validator_url), :class => 'Button Button--link Button--link--has-divider Button--course-settings validator_link' do %>
- <i class="icon-link"></i>{{#t}}Validate Links in Content{{/t}}
- <% end %>
- <% end %>
- <table class="summary">
- <caption>
- <h3>{{#t}}Current Users{{/t}}</h3>
- </caption>
- <tbody>
- <% @all_roles.each do |base_role| %>
- <tr>
- <td><%= base_role[:plural_label] %>:</td>
- <td><%= n(user_count(base_role[:count])) %></td>
- </tr>
- <% base_role[:custom_roles].each do |cr|
- next if skip_custom_role?(cr)
- %>
- <tr>
- <td>
- <%= cr[:label] %><% if cr[:workflow_state] == 'inactive' %> ({{#t}}inactive{{/t}})<% end %>:
- </td>
- <td><%= n(user_count(cr[:count])) %></td>
- </tr>
- <% end %>
- <% end %>
- </tbody>
- </table>
- </div>
|