%
# 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 %><%= t '#crumbs.groups', 'Groups' %><% end %>
<% add_crumb t('#crumbs.groups', 'Groups') %>
<% provide :right_side do %>
<% end %>
<% css_bundle :course_list %>
<%= t :heading_current_groups, 'Current Groups' %>
<% if @current_groups.empty? %>
<%= t(:no_groups, "No Groups") %>
<% else %>
<%= t ('Group') %> |
<%= t ('Course') %> |
<%= t ('Term') %> |
<% @current_groups.each do |group| %>
<%= link_to group.name, group_path(group) %>
|
<%= group.context.name %>
|
<% if group.context_type == 'Course' && !group.context.enrollment_term.default_term? %>
<%= group.context.enrollment_term.name %>
<% end %>
|
<% end %>
<% end %>
<%= t :heading_previous_groups, 'Previous Groups' %>
<% if @previous_groups.empty? %>
<%= t(:no_groups, "No Groups") %>
<% else %>
<%= t ('Group') %> |
<%= t ('Course') %> |
<%= t ('Term') %> |
<% @previous_groups.each do |group| %>
<%# Don't show the link if the user no longer has access to this concluded course %>
<% if group.context.grants_right?(@current_user, session, :read_roster) %>
<%= link_to group.name, group_path(group) %>
<% else %>
<%= group.name %>
<% end %>
|
<%= group.context.name %>
|
<% if group.context_type == 'Course' && !group.context.enrollment_term.default_term? %>
<%= group.context.enrollment_term.name %>
<% else %>
<%= group.context.enrollment_term.name %>
<% end %>
|
<% end %>
<% end %>