<% # 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 . %> <% pending_enrollment ||= nil enrollment = pending_enrollment title_message = t :student_title, "Invited as a student, click to see the Course" case enrollment.type when 'TeacherEnrollment' title_message = t :teacher_title, "Invited as a teacher, click to see the Course" when 'TaEnrollment' title_message = t :ta_title, "Invited as a TA, click to see the Course" when 'ObserverEnrollment' title_message = t :observer_title, "Invited as an observer, click to see the Course" when 'DesignerEnrollment' title_message = t :designer_title, "Invited as a designer, click to see the Course" end %>
  • <%= case enrollment.type when 'TeacherEnrollment' t :teacher, "%{course} as a teacher.", :course => enrollment.course.name when 'TaEnrollment' t :ta, "%{course} as a TA.", :course => enrollment.course.name when 'ObserverEnrollment' t :observer, "%{course} as an observer.", :course => enrollment.course.name when 'DesignerEnrollment' t :designer, "%{course} as a designer.", :course => enrollment.course.name else t :student, "%{course} as a student.", :course => enrollment.course.name end %>