<% # 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 . %> <% js_env :CAN_READ => can_do(@context, @current_user, :read) %> <% js_env :SYLLABUS_BODY => user_content(@syllabus_body || '') %> <% show_summary = @context.syllabus_course_summary? && !@context.elementary_enabled? if @context.elementary_enabled? title_text = t("Important Info") submit_btn_text = t("Update Important Info") help_text = t("You can add important information here that you want to display under the Resources tab.") else title_text = t("titles.course_syllabus", "Course Syllabus") submit_btn_text = t("buttons.update_syllabus", "Update Syllabus") help_text = mt "instructions.syllabus", <<-DOC The syllabus page shows a table-oriented view of the course schedule, and the basics of course grading. You can add any other comments, notes, or thoughts you have about the course structure, course policies or anything else. To add some comments, click the "Edit" link at the top. DOC end %> <% set_active_tab "syllabus" %> <% course_home ||= false %> <% header_content = course_home ? @context.nickname_for(@current_user) : title_text %>
<% if @context.show_announcements_on_home_page? && !@context.elementary_subject_course? %>

<%= header_content %>

<% else %>

<%= header_content %>

<% end %>
<% if show_summary %> <%= t 'links.jump_to_today', "Jump to Today" %> <% end %> <% if can_do(@context, @current_user, :manage_content, :manage_course_content_edit) %> <% end %>
<%= user_content(@syllabus_body) %>
<%= help_text %>
<%= form_for @context.class.to_s.underscore.to_sym, :url => context_url(@context, :context_url), :html => {:id => 'edit_course_syllabus_form', :style => 'display: none; margin-bottom: 10px;', :method => :put} do |f| %> <% if @context.elementary_enabled? %> <%= f.blabel :syllabus_body, :important_info_description, :en => "Important Info Description" %> <% else %> <%= f.blabel :syllabus_body, :syllabus_description, :en => "Syllabus Description" %> <% end %>
<%= f.text_area :syllabus_body, :style => "width: 100%; height: 300px;", :id => "course_syllabus_body" %> <% if !@context.elementary_enabled? %>
<%= f.check_box :syllabus_course_summary, :checked => @context.syllabus_course_summary? %> <%= f.label :syllabus_course_summary, :class => 'ic-Label', :en => "Show Course Summary" %>
<% end %>
<% end %> <% if show_summary %>

<%= before_label :assignments_summary, "Course Summary" %>

<% css_bundle("syllabus") %>
<%= t 'headers.date', "Date" %> <%= t 'headers.details', "Details" %> <%= t 'headers.due', "Due" %>
<% end %>