<% # 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, @context.nickname_for(@current_user) %> <% unless @context.elementary_subject_course? %> <% unless @course_home_view == 'wiki' || @course_home_view == 'syllabus' %>

<%= @context.nickname_for(@current_user) %>

<% end %> <% provide :right_side do %> <%= render :partial => 'courses/course_show_secondary' %> <% if @course_home_view == 'assignments' %> <%= render :partial => 'assignments/assignments_list_right_side', :locals => {:course_home => true} %> <% elsif @course_home_view == 'syllabus' && [email protected]_enabled? %> <%= render :partial => 'assignments/syllabus_right_side', :locals => {:course_home => true} %> <% elsif @context.elementary_homeroom_course? %> <% elsif !@context_enrollment&.student? %> <% locals = {:title => t("Coming Up"), :contexts_to_link_to => @context, :upcoming => true, :period => :one_week} %> <% if @current_user %> <% cache([@current_user, safe_cache_key(@contexts), 'course_upcoming_events' ].cache_key) do %> <% events = @current_user.upcoming_events(:contexts => @contexts) assignments = events.select{|e| e.is_a?(Assignment)} @current_user_submissions = Submission.where(:assignment_id => assignments, :user_id => @current_user).to_a if assignments.any? %> <%= render :partial => "shared/event_list", :object => events, :locals => locals %> <% end %> <% else %> <%= render :partial => "shared/event_list", :object => [], :locals => locals %> <% end %> <% end %> <% if @show_recent_feedback && [email protected]_homeroom_course? %> <%= render :partial => "shared/event_list", :object => @recent_feedback, :locals => {:title => t('titles.recent_feedback', "Recent Feedback"), :contexts_to_link_to => @context, :is_recent_feedback => true} %> <% end %> <% end %> <% end %> <% if @pending_enrollment %> <%= render :partial => 'shared/dashboard_invitation', :object => @pending_enrollment %> <% end %> <% if @context.show_announcements_on_home_page? && [email protected]_subject_course? %>
<% js_bundle :announcements_on_home_page %> <% end %>
<% if @course_home_view == 'wiki' %>
<% elsif @course_home_view == 'modules' %> <%= render :partial => 'context_modules/content_next', :locals => {:course_home => true} %> <% elsif @course_home_view == 'assignments' %> <% elsif @course_home_view == 'syllabus' %> <%= render :partial => 'assignments/syllabus_content', :locals => {:course_home => true} %> <% elsif @context.elementary_homeroom_course? %> <% elsif @course_home_view == 'k5_dashboard' %>
<% else %> <%= render :partial => 'shared/dashboard_messages' %> <%= render :partial => '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)) %>
<% end %>