<% # Copyright (C) 2011 - 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 . %> <% provide :page_title, join_title(t(:page_title, "Course Details"), @context.name) css_bundle :course_settings js_bundle :course_settings set_active_tab "settings" can_manage = can_do(@context, @current_user, :manage) can_manage_courses = can_do(@context.account, @current_user, :manage_courses) can_rename_course = can_manage_courses || (can_manage && !@context.root_account.settings[:prevent_course_renaming_by_teachers]) can_manage_master_courses = can_manage_courses && can_do(@context.account, @current_user, :manage_master_courses) has_multiple_sections = @context.course_sections.active.count > 1 can_see_users = can_do(@context, @current_user, :read_roster, :manage_students, :manage_admin_users) is_master_course = MasterCourses::MasterTemplate.is_master_course?(@context) blueprint_subscription = @context.master_course_subscriptions.active.first master_course = blueprint_subscription&.master_template&.course %> <% provide :right_side do %> <%= render :partial => 'settings_sidebar', :locals => { :blueprint_subscription => blueprint_subscription } %> <% end %>

<%= t 'course_settings_title', "Course Settings" %>

<%= t('headings.sections', %{Course Sections}) %>

<%= form_for :course_section, :url => "", :html => {:id => "edit_section_form", :method => :put, :style => "display: none;"} do |f| %> <%= f.text_field :name, :id => "course_section_name_edit", :'aria-label' => t('buttons.edit_section_name', "Edit section name") %> <% end %>
<% if can_do @context, @current_user, :update %>

<%= t('headings.navigation', %{Course Navigation}) %>

<%= t('nav_items_keyboard_drag_and_drop', 'Warning: For improved accessibility in reordering Course Navigation elements, please use the Move To Dialog option found in the menu.') %>
<%= form_tag context_url(@context, :context_update_nav_url), {:id => "nav_form", :title => t('titles.edit_navigation', "Edit Course Navigation") } do %> <% tabs = sortable_tabs %>

<%= t('help.edit_navigation', %{Drag and drop items to reorder them in the course navigation.}) %>

<% tabs.each do |tab| tab[:disabled_message] = [Course::TAB_GRADES, Course::TAB_DISCUSSIONS].include?(tab[:id]) ? t('tab_cant_disable', "This page can't be disabled, only hidden") : t('tab_disabled', "Page disabled, will redirect to course home page") tab[:disabled_message] = t("tab_hidden_if_disabled", "Page disabled, won't appear in navigation") if tab[:external] end %>

<%= t('Enabled Links') %>

<%= t('Disabled Links') %>

<% end %>
<% end %> <% if can_do @context, @current_user, :read_as_admin %>
<%= render :partial => 'external_tools/external_tools', :object => @context.context_external_tools.active %>
<% end %> <% if @publishing_enabled %>

<%= t('Grade Syncing') %>

<%= form_tag context_url(@context, :context_publish_to_sis_url), { :id => "publish_to_sis_form", :style => "display: none;" } do %><% end %> ...
<% end %> <% if @context.root_account.settings[:enable_alerts] && can_do(@context, @current_user, :manage_interaction_alerts) %>

<%= t(:alerts_title, "Alerts") %>

<%= render :partial => 'alerts/alerts' %>
<% end %> <% if can_do @context, @current_user, :view_feature_flags %>
<% end %> <% if Account.site_admin.grants_right?(@current_user, :manage_courses) %> <% end %>