<% # 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 . %> <% content_for :page_title, @context.name %> <% css_bundle :course_show %> <% @active_tab ||= "home" %>

<%= @context.name %>

<% content_for :auto_discovery do %> <% if @context_enrollment %> <%= auto_discovery_link_tag(:atom, feeds_course_format_path(@context_enrollment.feed_code, :atom), {:title => t("Course Atom Feed")}) %> <% elsif @context.available? %> <%= auto_discovery_link_tag(:atom, feeds_course_format_path(@context.feed_code, :atom), {:title => t("Course Atom Feed")}) %> <% end %> <% end %> <% content_for :right_side do %>
<% @can_manage = can_do(@context, @current_user, :manage) %> <% @can_create_announcements = @context.announcements.temp_record.grants_right?(@current_user, session, :create) %> <% if can_do(@context, @current_user, :change_course_state) && (@context.unpublished? || @context.unpublishable?) %>

{{#t}}_{{/t}}

<%= form_for @context, html: {id: "course_status_form"} do |f| %> <% if @context.created? || @context.claimed? %> <% else %> <% end %> <% end %>
<% end %> <% if @can_manage || @can_create_announcements || @course_home_view != 'feed' || @course_home_sub_navigation_tools.present? %>
<%= external_tools_menu_items(@course_home_sub_navigation_tools, {link_class: "btn button-sidebar-wide course-home-sub-navigation-lti", settings_key: :course_home_sub_navigation}) %> <% if @can_manage %>
<% end %> <% if @course_home_view != 'feed' %> {{#t}}_{{/t}} <% end %> <% if @can_manage && !@domain_root_account.try(:feature_enabled?, :new_user_tutorial) %> <% set_js_course_wizard_data %> <% js_bundle :course_wizard %> <% css_bundle :course_wizard %> {{#t}}_{{/t}} <% end %> <% if @can_create_announcements %> {{#t}}_{{/t}} <% end %> <% course_custom_links.each do |link| %> <%= link[:text] %> <% end %>
<% end %> <% if @context.available? && @context.self_enrollment_enabled? && @context.open_enrollment && (!@context_enrollment || !@context_enrollment.active?) %> {{#t}}_{{/t}} <% elsif @context_enrollment && @context_enrollment.self_enrolled && @context_enrollment.active? %> {{#t}}_{{/t}} <% end %> {{> to_do_list}} {{> group_list}} <%= nbsp unless @current_user %>
<% if @course_home_view == 'assignments' %> {{> assignments/assignments_list_right_side}} <% elsif @course_home_view == 'syllabus' %> {{> assignments/syllabus_right_side}} <% else %> <% locals = {:title => t("Coming Up"), :contexts_to_link_to => @context, :upcoming => true, :period => :one_week} %> <% if @current_user %> <% cache(safe_cache_key([@current_user, @contexts, 'course_upcoming_events' ])) do %> {{> shared/event_list}} <% end %> <% else %> {{> shared/event_list}} <% end %> <% end %> <% if @show_recent_feedback %> {{> shared/event_list", :object => @recent_feedback, :locals => {:title => t('titles.recent_feedback', "Recent Feedback}} <% end %> <% end %> <% css_bundle :dashboard case @course_home_view when 'wiki' css_bundle :tinymce when 'modules' js_bundle :context_modules css_bundle :context_modules2 when 'assignments' js_bundle :assignment_index css_bundle :new_assignments when 'syllabus' js_bundle :syllabus css_bundle :tinymce else js_bundle :dashboard end %> <% js_bundle 'legacy/courses_show' %> <% if @pending_enrollment %> {{> shared/dashboard_invitation}} <% end %> <% if @context.show_announcements_on_home_page? %>
<% js_bundle :announcements_on_home_page %> <% end %>
<% if @course_home_view == 'wiki' %> <% js_bundle :wiki_page_show %>
<% elsif @course_home_view == 'modules' %> {{> context_modules/content_next}} <% elsif @course_home_view == 'assignments' %> <% @body_classes << 'hide-content-while-scripts-not-loaded' @body_classes << 'with_item_groups' js_bundle :assignment_index css_bundle :new_assignments %> <% elsif @course_home_view == 'syllabus' %> {{> assignments/syllabus_content}} <% else %> {{> shared/dashboard_messages}} {{> shared/recent_activity}} <% end %>
<% if @context.public_license? %>
<%= image_tag "cc/#{@context.license}.png", :alt => @context.readable_license %> {{#t}}'license_notice', %{This course content is offered under a %{license_type} license. Content in this course can be considered under this license unless otherwise noted.}, :license_type => content_tag('b', link_to(@context.readable_license, @context.license_url)) {{/t}}
<% end %>
<% js_bundle :course %>