%
# 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 .
%>
<%= 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) %>,
<%= t("Enrolled as: %{enrollment_type}", enrollment_type: enrollment.readable_role_name) %>
<% if enrollment.temporary_enrollment? && enrollment.start_at && enrollment.end_at %>
<%= t("| %{start_at} - %{end_at}", start_at: datetime_string(enrollment.start_at), end_at: datetime_string(enrollment.end_at)) %>
<%= t("| %{provider}", provider: enrollment.temporary_enrollment_source_user.name) %>
<% 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("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 %>