<% # 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 . %> <% provide :page_title do %><%= @user.short_name %><% end %> <% provide :right_side do %>
<%= t 'links.message_user', "Message %{user}", :user => context_user_name(@context, @user) %> <% if @domain_root_account.try_rescue(:enable_user_notes) and can_do(@user, @current_user, :read_user_notes) %> <%= t('buttons.faculty_journal_for', 'Faculty Journal for %{user}', :user => context_user_name(@context, @user)) %> <% end %> <% if @context_account.is_a?(Account) && @user.grants_right?(@current_user, :generate_observer_pairing_code) && @user.has_student_enrollment? && @context_account.root_account.self_registration? %>
<% end %>
<% end %>

<%= t(:page_header_title, "User Profile") %>

<% if @context_account.is_a?(Account) && @context_account.has_outcomes? %>
<%= t('see_outcomes', 'See Outcome Results for %{user}', :user => @user.short_name) %>
<% end %>

<%= @user.short_name %> <% if @user.pronouns %>(<%= @user.pronouns %>)<% end %>

<% css_bundle :roster_user, :context_list, :pairing_code %> <% @responsive_misc = @domain_root_account.feature_enabled?(:responsive_misc) %>
<%= render :partial => 'users/name' %> <%= render :partial => 'users/logins' %>
<%= t('enrollments', 'Enrollments') %> <% num_enrollments = 0 %>

<%= t('courses', 'Courses') %> <%= count_if_any(@enrollments.count) %>

    <% @enrollments.each do |enrollment| %> <% num_enrollments += 1 %> <%= render :partial => "enrollment", :object => enrollment %> <% end %>
<% if @user.adminable_accounts && !@user.adminable_accounts.empty? %>

<%= t('accounts', 'Accounts') %> <%= count_if_any(@user.adminable_accounts.count) %>

    <% @user.adminable_accounts.each do |account| %> <% num_enrollments += 1 %>
  • <%= account.name %>
  • <% end %>
<% end %> <% if !@group_memberships.empty? %>

<%= t('groups', 'Groups') %> <%= count_if_any(@group_memberships.count) %>

<% end %> <% if num_enrollments == 0 %>
<%= t('none_yet', 'None yet.') %>
<% end %>
<% if can_do(@user, @current_user, :view_statistics) && page_views_enabled? %>

<%= t('page_views', 'Page Views') %>

<%= render :partial => 'page_views/table' %> <% end %>
<% js_bundle :user %>