<% # 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 . %>
<%= t('user', 'User') %> <%= user.name %> <%= other_user.name %>
<%= t('action', 'Action') %> <%= t('will_be_deleted', 'will be deleted') %> <%= t('will_be_kept', 'will be kept') %>
<%= t('emails', 'Emails') %> <%= t('no_emails', 'no emails') %> <% emails = Canvas::ICU.collate((user.communication_channels.unretired.email + other_user.communication_channels.unretired.email).map(&:path).uniq) %> <% if emails.empty? %> <%= t('no_emails', 'no emails') %> <% else %>
    <% emails.each do |email| %>
  • <%= email %>
  • <% end %>
<% end %>
<%= t('logins', 'Logins') %> <%= t('no_logins', 'no logins') %> <% pseudonyms = Canvas::ICU.collate_by(user.pseudonyms.active + other_user.pseudonyms.active, &:unique_id) %> <% if pseudonyms.empty? %> <%= t('no_logins', 'no logins') %> <% else %> <% pseudonyms.each do |pseudonym| %> <% end %>
<%= pseudonym.unique_id %> <%= pseudonym.account.name %>
<% end %>
<%= t('enrollments', 'Enrollments') %> <%= t('no_enrollments', 'no enrollments') %> <% enrollments = (user.enrollments.current + other_user.enrollments.current).sort_by{|e| [e.state_sortable, e.rank_sortable, Canvas::ICU.collation_key(e.course.name)] } %> <% if enrollments.empty? %> <%= t('no_enrollments', 'no enrollments') %> <% else %> <% enrollments.each do |enrollment| %> <% end %>
<%= enrollment.course.name %> <%= enrollment.readable_type %>
<% end %>