%
# 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 .
%>
<%
set_active_tab 'people'
add_crumb t('People'), context_url(@context, :context_users_url)
translated_title = @context.is_a?(Course) ? t('Course Roster') : t('Group Roster')
provide :page_title, join_title(translated_title, @context.name)
css_bundle :roster, :addpeople
is_teacher = can_do(@context, @current_user, :manage_students)
%>
<% if @context.is_a?(Course)%>
<% js_bundle :roster %>
<% js_env :canManageCourse => can_do(@context, @current_user, :manage) %>
<% else %>
<% if @context.is_a?(Group)%>
<% js_bundle :context_roster_groups %>
<% end %>
<%= @primary_users.keys.first %>
<% @primary_users[@primary_users.keys.first].each do |student| %>
-
<%= avatar(student, context_code: @context.asset_string, size: 30) %>
<% end %>
<% unless !@secondary_users || @secondary_users.empty? %>
<%= @secondary_users.keys.first %>
<% @secondary_users[@secondary_users.keys.first].each do |teacher| %>
-
<%= avatar(teacher, context_code: @context.context.asset_string, size: 30) %>
<% end %>
<% end %>
<% end %>