%
# 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 .
%>
<% @responsive_misc = @domain_root_account.feature_enabled?(:responsive_misc) %>
<%= enrollment.long_name(@current_user) %>
<% if enrollment.course.created? || enrollment.course.claimed? %>
">
<% end %>
<% unless enrollment.course.enrollment_term.default_term? %>
<%= enrollment.course.enrollment_term.name %>
<% end %>
<%= Enrollment.workflow_readable_type(enrollment.readable_state_based_on_date) %>,
<%=
case enrollment.class.to_s
when 'TeacherEnrollment'
t('roles_teacher', "Enrolled as a Teacher.")
when 'StudentEnrollment'
t('roles_student', "Enrolled as a Student.")
when 'TaEnrollment'
t('roles_ta', "Enrolled as a TA.")
when 'ObserverEnrollment'
t('roles_observer', "Enrolled as an Observer.")
when 'DesignerEnrollment'
t('roles_designer', "Enrolled as a Designer.")
else
t('roles_student', "Enrolled as a Student.")
end
%>
<% if enrollment.associated_user %>
<%= t('linked_to_user', '(Linked to %{user_name})', :user_name => enrollment.associated_user.name) %>
<% end %>
<% if enrollment.can_be_deleted_by(@current_user, enrollment.course, session) %>
" class="unenroll_link" role="button">
<%= t(:unenrollr, "Unenroll") %>
<% end %>
<% if enrollment.admin? && can_do(enrollment.user, @current_user, :read_reports) %>
<%= link_to(t('links.teacher_activity', 'See Student Interactions Report'), user_course_teacher_activity_url(enrollment.user_id, enrollment.course_id)) %>
<% end %>